Giter Site home page Giter Site logo

color-demosaicing's Introduction

Color-Demosaicing

Problem Definition:

Most digital color cameras today are equipped with a single sensor array (CMOS or CCD) whose surface is covered by a color flter array (CFA). Each unit of CFA contains a spectrally selective flter so that it samples only one of the three primary colors (red, green and blue).

Project1_Description

Original Image:

toronto_original

Task 1: Implemented a simulated Bayer CFA. Use it to sample color images.

Result:

toronto_bayer

Task 2: Reconstruct the image based on CFA data using bilinear interpolation.

Result:

toronto_bilinear

Observation:

The perceptual quality is acceptable. If we look close enough, several artifacts are observed:

  1. The main body of CN Tower has several color fringes.
  2. False color is created on the surface of the buildings.
  3. The output image is blurry due to loss of sharpness.

Potential Cause:

This simple interpolation algorithm performs well on surface with homogeneous colors. On area with high spatial frequency where two colors separated by a sharp transition (details of edges & borders), false colors are generated. Basically, the bilinear interpolation is operating spatial averaging like a 2-dimensional low pass flter. Therefore, it will also result in blurry image.

Task 3: The Adaptive Color Plane Interpolation (Hamilton and Adams.) method is chosen to overcome the problems addressed in bilinear interpolation.

Result:

toronto_gradient

Pros:

  1. The right image is apparently much sharper and contrasty and contains more edge details.
  2. From the main body of the CN Tower, we can clearly see that the color fringes are absent.
  3. If we focus on the high frequency area (the surface of buildings), we could observed that the false color generated by bilinear interpolation is largely reduced.

Cons:

  1. There are noticeably many red noise pixels on the black areas and yellow & green noise pixels on the white areas. (They can be easily removed by noise reduction tools)
  2. If we look at the small building on the right, we could capture absurd repetitive patterns in transition areas (zipper efect).

Conclusion:

From the comparison above. We could conclude that the Hamilton and Adams method for interpolation outperforms its bilinear counterpart both perceptually and statistically. In principle, Adaptive Color Plane Interpolation uses classifers to estimate the gradient in horizontal, vertical and diagonal directions such that the high spacial frequency information is better realized upon the preferred orientation. However zipper efect and noise pixels are noticeable, which leads to the future improvements.

color-demosaicing's People

Contributors

eason-sun avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.