Standard functions used by demosaicking algorithms. More...
#include "libAuxiliary.h"
Go to the source code of this file.
Functions | |
void | wxRgb2Yuv (float *r, float *g, float *b, float *y, float *u, float *v, int width, int height) |
RGV to YUV standard conversion. | |
void | wxYuv2Rgb (float *r, float *g, float *b, float *y, float *u, float *v, int width, int height) |
YUV to RGB standard conversion. | |
void | wxCopy (float *tpI, float *tpO, int ilength) |
Make a copy of float vector. | |
void | sFillLut (float *lut, int size) |
Tabulate Exp(-x). | |
float | sLUT (float dif, float *lut) |
Compute Exp(-x). | |
float | l2_distance_r1 (float *u0, int i0, int j0, int i1, int j1, int width) |
Compute Euclidean distance of a 3x3 patch centered at (i0,j0), (u1,j1) of the same image. | |
void | wxMedian (float *u, float *v, float fRadius, int inIter, int iWidth, int iHeight) |
Sliding window iterated median filter. | |
int | order_float_increasing (const void *a, const void *b) |
void | QuickSortFloat (float *arr, int ilength) |
Standard Quicksort. Orders float array in increasing order. |
Standard functions used by demosaicking algorithms.
Definition in file libAuxiliary.cpp.
float l2_distance_r1 | ( | float * | u0, | |
int | i0, | |||
int | j0, | |||
int | i1, | |||
int | j1, | |||
int | width | |||
) |
Compute Euclidean distance of a 3x3 patch centered at (i0,j0), (u1,j1) of the same image.
[in] | u0 | image |
[in] | (i0,j0) | center of first window |
[in] | (i1,j1) | center of second window |
[in] | width | width of the image |
Definition at line 171 of file libAuxiliary.cpp.
int order_float_increasing | ( | const void * | a, | |
const void * | b | |||
) |
void QuickSortFloat | ( | float * | arr, | |
int | ilength | |||
) |
Standard Quicksort. Orders float array in increasing order.
[in] | arr | input array |
[in] | ilength | length of the array |
[out] | arr | output array |
Definition at line 320 of file libAuxiliary.cpp.
void sFillLut | ( | float * | lut, | |
int | size | |||
) |
Tabulate Exp(-x).
[out] | lut | output table |
[in] | size | size of the table |
Definition at line 122 of file libAuxiliary.cpp.
float sLUT | ( | float | dif, | |
float * | lut | |||
) |
Compute Exp(-x).
[in] | dif | value of x |
[in] | lut | table of Exp(-x) |
Definition at line 142 of file libAuxiliary.cpp.
void wxCopy | ( | float * | tpI, | |
float * | tpO, | |||
int | ilength | |||
) |
Make a copy of float vector.
[in] | tpI | input vector |
[out] | tpO | copy |
[in] | ilength | length of the vector |
Definition at line 102 of file libAuxiliary.cpp.
void wxMedian | ( | float * | u, | |
float * | v, | |||
float | fRadius, | |||
int | inIter, | |||
int | iWidth, | |||
int | iHeight | |||
) |
Sliding window iterated median filter.
[in] | u | input image |
[out] | v | output image |
[in] | inIter | number of iterations |
[in] | fRadius | window of size (2*fRadius+1) x (2*fRadius+1) |
[in] | iWidth,iHeight | size of the image |
Definition at line 237 of file libAuxiliary.cpp.
void wxRgb2Yuv | ( | float * | r, | |
float * | g, | |||
float * | b, | |||
float * | y, | |||
float * | u, | |||
float * | v, | |||
int | width, | |||
int | height | |||
) |
RGV to YUV standard conversion.
Y = COEFF_YR * R + COEFF_YG * G + COEFF_YB * B
U = R - Y
V = B - Y
[in] | r,g,b | input image |
[out] | y,u,v | yuv coordinates |
[in] | width,height | size of the image |
Definition at line 50 of file libAuxiliary.cpp.
void wxYuv2Rgb | ( | float * | r, | |
float * | g, | |||
float * | b, | |||
float * | y, | |||
float * | u, | |||
float * | v, | |||
int | width, | |||
int | height | |||
) |
YUV to RGB standard conversion.
[in] | y,u,v | yuv coordinates |
[out] | r,g,b | ouput image |
[in] | width,height | size of the image |
Definition at line 75 of file libAuxiliary.cpp.