Malvar-He-Cutler Linear Image Demosaicking
Functions

dmbilinear.c File Reference

Bilinear demosaicing. More...

#include "dmbilinear.h"
Include dependency graph for dmbilinear.c:

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.

Detailed Description

Bilinear demosaicing.

Author:
Pascal Getreuer <getreuer@gmail.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 dmbilinear.c.


Function Documentation

void BilinearDemosaic ( float *  Output,
const float *  Input,
int  Width,
int  Height,
int  RedX,
int  RedY 
)

Bilinear demosaicing.

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

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.

Here is the caller graph for this function:

void BilinearDifference ( float *  Output,
const float *  Diff,
int  Width,
int  Height,
int  RedX,
int  RedY 
)

Bilinearly interpolate (Red - Green) and (Blue - Green) differences.

Parameters:
Outputoutput image with the green channel already filled
Diff2D array of (Red - Green) and (Blue - Green) differences
Width,Heightthe image dimensions
RedX,RedYthe 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.

Parameters:
Flatthe output 2D array of size Width by Height
Inputthe input RGB image in planar row-major order
Width,Heightsize of the image
RedX,RedYthe coordinates of the upper-rightmost red pixel

Definition at line 26 of file dmbilinear.c.

Here is the caller graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines