Zhang-Wu Directional LMMSE Image Demosaicking
|
Zhang-Wu LMMSE Image Demosaicking. More...
Go to the source code of this file.
Functions | |
int | ZhangWuDemosaic (float *Output, const float *Input, int Width, int Height, int RedX, int RedY, int UseZhangCodeEst) |
Demosaicing using the LMMSE method of Zhang et al. More... | |
Zhang-Wu LMMSE Image Demosaicking.
Copyright (c) 2010-2011, Pascal Getreuer All rights reserved.
This program is free software: you can use, modify and/or redistribute it under the terms of the simplified BSD License. You should have received a copy of this license along this program. If not, see http://www.opensource.org/licenses/bsd-license.html.
Definition in file dmzhangwu.h.
int ZhangWuDemosaic | ( | float * | Output, |
const float * | Input, | ||
int | Width, | ||
int | Height, | ||
int | RedX, | ||
int | RedY, | ||
int | UseZhangCodeEst | ||
) |
Demosaicing using the LMMSE method of Zhang et al.
Output | pointer to memory to store the demosaiced image |
Input | the input image as a flattened 2D array |
Width,Height | the image dimensions |
RedX,RedY | the coordinates of the upper-rightmost red pixel |
UseZhangCodeEst | flag to determine how to estimate local signal mean |
The Input image is a 2D float array of the input RGB values of size Width*Height in row-major order. RedX, RedY are the coordinates of the upper-rightmost red pixel to specify the CFA pattern.
If UseZhangCodeEst is zero, then LMMSE is performed as described in Zhang and Wu's paper. If it is nonzero, then LMMSE is performed consistently with Zhang's reference MATLAB implementation
http://www4.comp.polyu.edu.hk/~cslzhang/code/dlmmse.m
The difference is in the estimation of the local signal mean.
In the paper, the denoising estimates the signal mean as the value of the smoothed signal averaged over a window. In the MATLAB code, the smoothed signal is used directly as the estimate of the signal mean.
Definition at line 60 of file dmzhangwu.c.