Malvar-He-Cutler Linear Image Demosaicking
|
Bilinear demosaicing. More...
#include "dmbilinear.h"
Go to the source code of this file.
Functions | |
void | CfaFlatten (float *Flat, const float *Input, int Width, int Height, int RedX, int RedY) |
Flatten a CFA-filtered image to a 2D array. | |
void | BilinearDifference (float *Output, const float *Diff, int Width, int Height, int RedX, int RedY) |
Bilinearly interpolate (Red - Green) and (Blue - Green) differences. | |
void | BilinearDemosaic (float *Output, const float *Input, int Width, int Height, int RedX, int RedY) |
Bilinear demosaicing. |
Bilinear demosaicing.
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 dmbilinear.c.
void BilinearDemosaic | ( | float * | Output, |
const float * | Input, | ||
int | Width, | ||
int | Height, | ||
int | RedX, | ||
int | RedY | ||
) |
Bilinear demosaicing.
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 |
Bilinear demosaicing is considered to be the simplest demosaicing method and is used as a baseline for comparing more sophisticated methods.
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.
Definition at line 184 of file dmbilinear.c.
void BilinearDifference | ( | float * | Output, |
const float * | Diff, | ||
int | Width, | ||
int | Height, | ||
int | RedX, | ||
int | RedY | ||
) |
Bilinearly interpolate (Red - Green) and (Blue - Green) differences.
Output | output image with the green channel already filled |
Diff | 2D array of (Red - Green) and (Blue - Green) differences |
Width,Height | the image dimensions |
RedX,RedY | the coordinates of the upper-rightmost red pixel |
Definition at line 56 of file dmbilinear.c.
void CfaFlatten | ( | float * | Flat, |
const float * | Input, | ||
int | Width, | ||
int | Height, | ||
int | RedX, | ||
int | RedY | ||
) |
Flatten a CFA-filtered image to a 2D array.
Flat | the output 2D array of size Width by Height |
Input | the input RGB image in planar row-major order |
Width,Height | size of the image |
RedX,RedY | the coordinates of the upper-rightmost red pixel |
Definition at line 26 of file dmbilinear.c.