Image Demosaicking with Contour Stencils
|
Mosaiced contour stencils. More...
#include <math.h>
Go to the source code of this file.
Macros | |
#define | TVEDGE(x1, y1, x2, y2) |
Compute the absolute difference between (x1,y1) and (x2,y2) More... | |
#define | NUMSTENCILS 8 |
Number of contour stencils. More... | |
#define | NEIGHRADIUS 2 |
Radius of the stencil neighborhood. More... | |
#define | WEIGHT_AXIAL 4.545454545454546e-02 |
#define | WEIGHT_PI_8 1.181325147609750e-02 |
#define | WEIGHT_GREEN_MU 1.111167799007432e+00 |
#define | WEIGHT_GREEN_DIAGONAL 5.050762722761053e-02 |
#define | WEIGHT_REDBLUE_MU 1.111167799007432e+00 |
#define | WEIGHT_REDBLUE_DIAGONAL 5.050762722761053e-02 |
Functions | |
void | FitMosaicedStencils (int *Stencil, const float *Input, int Width, int Height, int RedX, int RedY) |
Estimate the contour orientations of a mosaiced image. More... | |
Mosaiced contour stencils.
Definition in file mstencils.c.
#define NEIGHRADIUS 2 |
Radius of the stencil neighborhood.
Definition at line 20 of file mstencils.c.
#define NUMSTENCILS 8 |
Number of contour stencils.
Definition at line 17 of file mstencils.c.
#define TVEDGE | ( | x1, | |
y1, | |||
x2, | |||
y2 | |||
) |
Compute the absolute difference between (x1,y1) and (x2,y2)
Definition at line 12 of file mstencils.c.
#define WEIGHT_AXIAL 4.545454545454546e-02 |
Definition at line 23 of file mstencils.c.
#define WEIGHT_GREEN_DIAGONAL 5.050762722761053e-02 |
Definition at line 26 of file mstencils.c.
#define WEIGHT_GREEN_MU 1.111167799007432e+00 |
Definition at line 25 of file mstencils.c.
#define WEIGHT_PI_8 1.181325147609750e-02 |
Definition at line 24 of file mstencils.c.
#define WEIGHT_REDBLUE_DIAGONAL 5.050762722761053e-02 |
Definition at line 28 of file mstencils.c.
#define WEIGHT_REDBLUE_MU 1.111167799007432e+00 |
Definition at line 27 of file mstencils.c.
void FitMosaicedStencils | ( | int * | Stencil, |
const float * | Input, | ||
int | Width, | ||
int | Height, | ||
int | RedX, | ||
int | RedY | ||
) |
Estimate the contour orientations of a mosaiced image.
Stencil | array to store the selected stencils |
Input | the mosaiced image |
Width,Height | dimensions of the image |
RedX,RedY | the coordinates of the upper-leftmost red pixel |
Mosaiced contour stencils are applied to estimate the contour orientation at each pixel. The output array Stencil holds the index of the selected stencil at each point. The orientation estimate at the ith pixel is Stencil[i]*M_PI/8 radians:
5 4 3 6, | ,2 7 `, | ,` 1 0-----+-----0 Orientations described by Stencil[i]
The same enumeration of orientations is used internally for the TV array.
Definition at line 51 of file mstencils.c.