Zhang-Wu Directional LMMSE Image Demosaicking
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions
dmzhangwu.h File Reference

Zhang-Wu LMMSE Image Demosaicking. More...

This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

Zhang-Wu LMMSE Image Demosaicking.

Author
Pascal Getreuer getre.nosp@m.uer@.nosp@m.gmail.nosp@m..com

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.

Function Documentation

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.

Parameters
Outputpointer to memory to store the demosaiced image
Inputthe input image as a flattened 2D array
Width,Heightthe image dimensions
RedX,RedYthe coordinates of the upper-rightmost red pixel
UseZhangCodeEstflag 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.

Here is the call graph for this function:

Here is the caller graph for this function: