Function:DemosaicDFPD

From CUVI Wiki
Revision as of 08:14, 12 June 2014 by Jawad (talk | contribs) (Created page with "__NOTOC__ Restores an RGB image from a CFA image using DFPD Bayer algorithm. ''Directional Filtering with Posteriori Decision'' to restore the color image gives much better re...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Restores an RGB image from a CFA image using DFPD Bayer algorithm. Directional Filtering with Posteriori Decision to restore the color image gives much better results than demosaic (with bilinear interpolation) and remove artifacts.

Function

CuviStatus demosaicDFPD(const CuviImage& src,
                        CuviImage& dst,
                        const CuviBayerSeq sensorAlignment,
                        cosnt bool refineResults,
                        const CuviStream& stream = CuviStream());


Parameters

Name Type Description
src const CuviImage& Input Bayer Image
dst CuviImage& Output RGB Image
sensorAlignment CuviBayerSeq Sensor alignment of the bayer image
stream const CuviStream& GPU stream ID for execution

Image Type Support

Input Output
8u 8u
16u 16u

Sample

Input
Output
Input
Output

Example

//Example using C

CuviImage gimg = cuvi::io::loadImage(path,CUVI_LOAD_IMAGE_GRAYSCALE_KEEP_DEPTH), gout;


//Demosaic 
cuvi::colorOperations::demosaic(gimg,gout,CUVI_BAYER_BGGR);