Image Demosaicking with Contour Stencils
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Typedefs | Enumerations | Functions
gen_mstencils.c File Reference
#include <stdio.h>
#include <string.h>
#include "basic.h"
#include "edge.h"
#include "temsub.h"
Include dependency graph for gen_mstencils.c:

Go to the source code of this file.

Macros

#define NUMSTENCILS   8
 Number of stencils. More...
 
#define WEIGHT_PI_8_FACTOR   3.847759065022573512
 The constant 1 + (cot(pi/6) - 1)/sqrt(2) More...
 

Typedefs

typedef edgelist mstencil
 A mosaiced contour stencil. More...
 

Enumerations

enum  cfa_color { COLOR_RED, COLOR_GREEN, COLOR_BLUE }
 

Functions

cfa_color GetBayerColor (int RedX, int RedY, int x, int y)
 Determine the Bayer CFA color at (x,y) More...
 
double EdgeLength (edge Edge)
 Compute the length of an edge. More...
 
double StencilArcSum (mstencil Stencil)
 Compute the arc length sum of a stencil. More...
 
void FreeStencils (mstencil *Stencils)
 Free an mstencil. More...
 
int StencilEquals (mstencil A, mstencil B)
 Test if two stencils are equal. More...
 
mstencilConstructMosaicedStencils (double Radius, cfa_color CenterPixel)
 Construct mosaiced stencils. More...
 
void WriteTVComputation (char **Str, mstencil *Stencils, int j)
 Write TV computation code for an mstencil. More...
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

#define NUMSTENCILS   8

Number of stencils.

Definition at line 25 of file gen_mstencils.c.

#define WEIGHT_PI_8_FACTOR   3.847759065022573512

The constant 1 + (cot(pi/6) - 1)/sqrt(2)

Definition at line 28 of file gen_mstencils.c.

Typedef Documentation

typedef edgelist mstencil

A mosaiced contour stencil.

Definition at line 34 of file gen_mstencils.c.

Enumeration Type Documentation

enum cfa_color
Enumerator
COLOR_RED 
COLOR_GREEN 
COLOR_BLUE 

Definition at line 31 of file gen_mstencils.c.

Function Documentation

mstencil* ConstructMosaicedStencils ( double  Radius,
cfa_color  CenterPixel 
)

Construct mosaiced stencils.

Parameters
Radiusthe radius of the neighborhood
CenterPixelcfa_color of the center pixel

Definition at line 129 of file gen_mstencils.c.

Here is the call graph for this function:

Here is the caller graph for this function:

double EdgeLength ( edge  Edge)

Compute the length of an edge.

Definition at line 69 of file gen_mstencils.c.

Here is the caller graph for this function:

void FreeStencils ( mstencil Stencils)

Free an mstencil.

Definition at line 91 of file gen_mstencils.c.

Here is the call graph for this function:

Here is the caller graph for this function:

cfa_color GetBayerColor ( int  RedX,
int  RedY,
int  x,
int  y 
)

Determine the Bayer CFA color at (x,y)

Definition at line 38 of file gen_mstencils.c.

int main ( int  argc,
char *  argv[] 
)

Definition at line 205 of file gen_mstencils.c.

Here is the call graph for this function:

double StencilArcSum ( mstencil  Stencil)

Compute the arc length sum of a stencil.

Definition at line 78 of file gen_mstencils.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int StencilEquals ( mstencil  A,
mstencil  B 
)

Test if two stencils are equal.

Definition at line 106 of file gen_mstencils.c.

Here is the caller graph for this function:

void WriteTVComputation ( char **  Str,
mstencil Stencils,
int  j 
)

Write TV computation code for an mstencil.

Parameters
Strthe string to which to append
Stencilsthe mstencil array
jindex of the mstencil to write

Writes code for computing the TV of Stencils[j].

Definition at line 188 of file gen_mstencils.c.

Here is the call graph for this function:

Here is the caller graph for this function: