PowerPoint File for Presentation:
Bayer Color Filter Array Demosaicing.ppt
Algorithm Implementations:
You can download them seperately, or download all my codes in a zip file
function IMG_Bilinear = BilinearInterpolate( IMG );
Bilinear interpolation that avearage existing adjacent pixel to fill in the missing
color information.
function IMG_DDT = DDTriangulate( IMG );
Data-Dependent Triangulation[1].
function [IMG_ED, EdgDet_map] = EdgDirInterpolate( IMG )
Edge Directed Interpolation. Using the variance of the surrounding pixels to reconstruct
the missing color information[2]. EdgDet_map is the debug information that shows the
pixels classified as an edge.
function IMG_HQL = HiQualLinearInterpolate( IMG );
High quality linear interpolation[3]. Involved some gradient idea to help refine the bilinear
interpolation result.
function IMG_TwoLine = TwoLineInterpolate( IMG )
TwoLineInterpolate uses only 1 line buffer to implement the interpolation. It uses the R/G
and B/G ratio to help determine the local gradient and recover the missing color information[4].
Other Functions:
A script running all algorithms. Set the algorithm variable to 1/0 and it will be
excuted/disabled. Loaded test image can be changed by reassigning "filename",
"filefmt" at line 19,20.
Recover the gray image (MxNx3) from a CFA image (MxN). Used to reconstruct specific
test patterns.
function [DIFF, ERROR_DIST_IMG] = ImgComp( Input, Ref, Method);
ImgComp compares 2 input images "Input", "Ref" according to "Method" and returns the result
value and the error distribution map.
Two sub functions used by two-line interpolation.
function [Result_1D, Result_3D] = RGB2CFA(Img_RGB)
RGB2CFA downsamples the input image to a CFA image using RGGB format (The 1st pixel in the 1st line is R)
Both 1-channel image and 3-channel image are available.
< Home >