Main
Photo Portfolio
Baseball
ShutterSounds Blog
Projects
Resumé (pdf)
About

Exampe 4: Smooth hue transition interpolation

Smooth Hue Transition
Smooth Hue Transition

The human eye has the greatest response to light in the green spectrum; the Bayer pattern filter takes advantage of this by using twice as many green filters as red or green, to improve luminance response in a way that best matches human vision. Smooth hue transition takes advantage of this by treating the green channel as a luminance channel, and using relative intensities of blue and red to green to determine color intensity. Compared to bilinear interpolation, smooth hue transition produces noticeably less color artifacts and, as its name suggests, produces a smoother transition between color hues. Note that smooth hue transition still carries the same characteristic zipper pattern of non-adaptive algorithms.

Smooth Hue Transition resized 3x
(Resized 3x for clarity)

Algorithms

Choose an algorithm from the left. Feel free to send suggestions/links for new ones to thedailynathan at gmail.

Shown here is the original image for reference, and the simulated Bayer raw data which the different algoriths are run on. The simulated Bayer data is generated by taking only green, red, and blue values from the corresponding pixel in a 2x2 GRGB Bayer pattern. Assuming the image used is a 100% crop taken from an image with the top-left pixel (at position 0,0) being a first green photosite (G1), this should be a fairly accurate representation of the actual raw data (assuming of course, that a camera using a Bayer filter sensor was used, and ignoring any compression losses due to compression to 24-bit true color and possible JPEG lossy compression).

Note that this demo does not quite work as effectively with resized images (this demo resizes images greater than 300x300 for performance reasons), or images not generated from a camera using a Bayer sensor. In these cases, resolution can approach or exceed that of a Bayer sensor and anti-aliasing (AA) filter combination, and severe mosaicing artifacts should be expected to appear, no matter the algorithm.

Pixel-binned
Original image
Pixel-binned
Simulated Bayer raw data