23 typedef unsigned char uchar;
26 uchar
GetPixel(uchar *im,
int width,
int height,
int x,
int y,
int channel);
27 void SetPixel(uchar *im,
int width,
int height,
int x,
int y,
const uchar val,
int channel);
29 void LabelImage(uchar *res,
int width,
int height,
int** labels,
int regCount);
30 int range_distance(uchar* image,
int width,
int height,
int x1,
int y1,
int x2,
int y2 );
31 uchar *
ConvertRGB2LUV(uchar * input,
int width,
int height,
int nchannel);
32 uchar *
ConvertLUV2RGB(uchar * origin,
int width,
int height,
int nchannel);
uchar * ConvertRGB2LUV(uchar *rgb, int width, int height, int nchannel)
Function ConvertRGB2LUV convert RGB image to LUV.
Definition: image.cpp:241
void LabelImage(uchar *image, int width, int height, int **labels, int regCount)
Function LabelImage in RGB colors.
Definition: image.cpp:76
float color_distance(const float *a, const float *b)
Function color_distance calculate color distance between the two pixels.
Definition: image.cpp:343
uchar * AllocateUcharImage(int width, int height, int nchannel)
Allocate space for the uchar image,.
Definition: image.cpp:29
uchar * ConvertLUV2RGB(uchar *luv, int width, int height, int nchannel)
Function ConvertLUV2RGB converts input image image from LUV to RGB color space.
Definition: image.cpp:271
void SetPixel(uchar *im, int width, int height, int x, int y, const uchar val, int nchannel)
Set Pixel at channel component of image at postition given with x and y.
Definition: image.cpp:300
int ** GenerateLabels(int width, int height)
Generate labels for clustering.
Definition: image.cpp:42
vector< int > GenerateRandomNumbers(int count)
Function generate random numbers.
Definition: image.cpp:58
int range_distance(uchar *image, int width, int height, int x1, int y1, int x2, int y2)
Function range_distance calculate range distance between two pixels.
Definition: image.cpp:329
uchar GetPixel(uchar *im, int width, int height, int x, int y, int nchannel)
Get Pixel at channel component of image at postition given with x and y.
Definition: image.cpp:314