#include <camellia.h>
Public Member Functions | |
CamImage () | |
Default non-allocating constructor. | |
CamImage (int width, int height, int depth=CAM_DEPTH_8U, int colormodel=0) | |
Allocating constructor (1 to 16 bits, signed/unsigned, G/RGB/RGBA/YUV). | |
CamImage (const CamImage &image) | |
Copy constructor. | |
~CamImage () | |
Default destructor. Free any allocated memory. | |
CamImage & | operator= (const CamImage &image) |
Operator= redefinition. | |
CamImage * | clone () const |
Clone image (using camClone() function). | |
CamImage * | copy () const |
Copy (not clone). Takes into account ROI and masks. C++ wrapping for camCopy() function. | |
bool | copy (CamImage &dest) const |
Copy (not clone). Takes into account ROI and masks. C++ wrapping for camCopy() function. | |
bool | allocated () const |
Check whether the image is allocated or not. | |
bool | alloc (int width, int height, int depth=CAM_DEPTH_8U, int colormodel=0) |
Image allocation (1 to 16 bits, signed/unsigned, G/RGB/RGBA/YUV). | |
bool | dealloc () |
Deallocate image (C++ wrapping for camDeallocateImae() function). | |
bool | alloc_rgb (int width, int height) |
RGB image allocation (8 bits, pixel oriented). | |
bool | alloc_rgba (int width, int height) |
RGBA image allocation (8 bits, pixel oriented, alpha channel). | |
bool | alloc_yuv (int width, int height) |
YUV image allocation (8 bits, planar oriented). | |
bool | load_pgm (const char *filename) |
C++ wrapping for camLoadPGM() function. | |
bool | save_pgm (const char *filename) const |
C++ wrapping for camSavePGM() function. | |
bool | load_bmp (const char *filename) |
C++ wrapping for camLoadPGM() function. | |
bool | save_bmp (const char *filename) const |
C++ wrapping for camSavePGM() function. | |
bool | set_roi (const CamROI &roi) |
C++ wrapping for camSetROI() function. | |
void | get_pixels (char **result, int *len) const |
Fills an char array allocated with C++ operator new. len is filled with the length of the array. Used for mapping Ruby to_s member. | |
bool | set_pixels (const char *pixels, int sz) |
Set pixels of the picture, from a byte array. | |
void | inspect (char **result, int *len) const |
Returns some textual information about the image. | |
bool | view () const |
View the picture. | |
bool | set (int color) |
C++ wrapping for camSet() function. | |
bool | alpha_composite (const CamImage &source2, CamImage &dest) const |
C++ wrapping for camAlphaComposite() function. | |
int | erode_square3 () |
C++ wrapping for camErodeSquare3() function. | |
int | erode_square3 (CamImage &dest) const |
C++ wrapping for camErodeSquare3() function. | |
int | erode_circle5 () |
C++ wrapping for camErodeCircle5() function. | |
int | erode_circle5 (CamImage &dest) const |
C++ wrapping for camErodeCircle5() function. | |
int | erode_circle7 () |
C++ wrapping for camErodeCircle7() function. | |
int | erode_circle7 (CamImage &dest) const |
C++ wrapping for camErodeCircle7() function. | |
int | dilate_square3 () |
C++ wrapping for camDilateSquare3() function. | |
int | dilate_square3 (CamImage &dest) const |
C++ wrapping for camDilateSquare3() function. | |
int | dilate_circle5 () |
C++ wrapping for camDilateCircle5() function. | |
int | dilate_circle5 (CamImage &dest) const |
C++ wrapping for camDilateCircle5() function. | |
int | dilate_circle7 () |
C++ wrapping for camDilateCircle7() function. | |
int | dilate_circle7 (CamImage &dest) const |
C++ wrapping for camDilateCircle7() function. | |
int | morpho_gradient_square3 () |
C++ wrapping for camMorphoGradientSquare3() function. | |
int | morpho_gradient_square3 (CamImage &dest) const |
C++ wrapping for camMorphoGradientSquare3() function. | |
int | morpho_gradient_circle5 () |
C++ wrapping for camMorphoGradientCircle5() function. | |
int | morpho_gradient_circle5 (CamImage &dest) const |
C++ wrapping for camMorphoGradientCircle5() function. | |
int | morpho_gradient_circle7 () |
C++ wrapping for camMorphoGradientCircle7() function. | |
int | morpho_gradient_circle7 (CamImage &dest) const |
C++ wrapping for camMorphoGradientCircle7() function. | |
int | morpho_maths (const CamMorphoMathsKernel &ker) |
C++ wrapping for camMorphoMaths() function. | |
int | morpho_maths (CamImage &dest, const CamMorphoMathsKernel &ker) const |
C++ wrapping for camMorphoMaths() function. | |
int | erode_3x3 (const CamMorphoMathsKernel &ker) |
C++ wrapping for camErode3x3() function. | |
int | erode_3x3 (CamImage &dest, const CamMorphoMathsKernel &ker) const |
C++ wrapping for camErode3x3() function. | |
int | dilate_3x3 (const CamMorphoMathsKernel &ker) |
C++ wrapping for camDilate3x3() function. | |
int | dilate_3x3 (CamImage &dest, const CamMorphoMathsKernel &ker) const |
C++ wrapping for camDilate3x3() function. | |
int | erode_5x5 (const CamMorphoMathsKernel &ker) |
C++ wrapping for camErode5x5() function. | |
int | erode_5x5 (CamImage &dest, const CamMorphoMathsKernel &ker) const |
C++ wrapping for camErode5x5() function. | |
int | dilate_5x5 (const CamMorphoMathsKernel &ker) |
C++ wrapping for camDilate5x5() function. | |
int | dilate_5x5 (CamImage &dest, const CamMorphoMathsKernel &ker) const |
C++ wrapping for camDilate5x5() function. | |
int | erode_7x7 (const CamMorphoMathsKernel &ker) |
C++ wrapping for camErode7x7() function. | |
int | erode_7x7 (CamImage &dest, const CamMorphoMathsKernel &ker) const |
C++ wrapping for camErode7x7() function. | |
int | dilate_7x7 (const CamMorphoMathsKernel &ker) |
C++ wrapping for camDilate7x7() function. | |
int | dilate_7x7 (CamImage &dest, const CamMorphoMathsKernel &ker) const |
C++ wrapping for camDilate7x7() function. | |
int | linear_filter_3x3 (const CamLinearFilterKernel &ker) |
C++ wrapping for camLinearFilter3x3() function. | |
int | linear_filter_3x3 (CamImage &dest, const CamLinearFilterKernel &k) const |
C++ wrapping for camLinearFilter3x3() function. | |
int | linear_filter_5x5 (const CamLinearFilterKernel &ker) |
C++ wrapping for camLinearFilter5x5() function. | |
int | linear_filter_5x5 (CamImage &dest, const CamLinearFilterKernel &k) const |
C++ wrapping for camLinearFilter5x5() function. | |
int | linear_filter_abs_3x3 (const CamLinearFilterKernel &ker) |
C++ wrapping for camLinearFilterAbs3x3() function. | |
int | linear_filter_abs_3x3 (CamImage &dest, const CamLinearFilterKernel &k) const |
C++ wrapping for camLinearFilterAbs3x3() function. | |
int | linear_filter_abs_5x5 (const CamLinearFilterKernel &ker) |
C++ wrapping for camLinearFilterAbs5x5() function. | |
int | linear_filter_abs_5x5 (CamImage &dest, const CamLinearFilterKernel &k) const |
C++ wrapping for camLinearFilterAbs5x5() function. | |
bool | sobel_v () |
C++ wrapping for camSobelV() function. | |
bool | sobel_h () |
C++ wrapping for camSobelH() function. | |
bool | sobel_v_abs () |
C++ wrapping for camSobelVAbs() function. | |
bool | sobel_h_abs () |
C++ wrapping for camSobelHAbs() function. | |
bool | sobel_v (CamImage &dest) const |
C++ wrapping for camSobelV() function. | |
bool | sobel_h (CamImage &dest) const |
C++ wrapping for camSobelH() function. | |
bool | sobel_v_abs (CamImage &dest) const |
C++ wrapping for camSobelVAbs() function. | |
bool | sobel_h_abs (CamImage &dest) const |
C++ wrapping for camSobelHAbs() function. | |
int | sep_filter_3x3 (const CamSepFilterKernel &ker) |
C++ wrapping for camSepFilter3x3() function. | |
int | sep_filter_3x3 (CamImage &dest, const CamSepFilterKernel &k) const |
C++ wrapping for camSepFilter3x3() function. | |
int | sep_filter_5x5 (const CamSepFilterKernel &ker) |
C++ wrapping for camSepFilter5x5() function. | |
int | sep_filter_5x5 (CamImage &dest, const CamSepFilterKernel &k) const |
C++ wrapping for camSepFilter5x5() function. | |
int | sep_filter_7x7 (const CamSepFilterKernel &ker) |
C++ wrapping for camSepFilter7x7() function. | |
int | sep_filter_7x7 (CamImage &dest, const CamSepFilterKernel &k) const |
C++ wrapping for camSepFilter7x7() function. | |
int | sep_filter_abs_3x3 (const CamSepFilterKernel &ker) |
C++ wrapping for camSepFilterAbs3x3() function. | |
int | sep_filter_abs_3x3 (CamImage &dest, const CamSepFilterKernel &k) const |
C++ wrapping for camSepFilterAbs3x3() function. | |
int | sep_filter_abs_5x5 (const CamSepFilterKernel &ker) |
C++ wrapping for camSepFilterAbs5x5() function. | |
int | sep_filter_abs_5x5 (CamImage &dest, const CamSepFilterKernel &k) const |
C++ wrapping for camSepFilterAbs5x5() function. | |
int | sep_filter_abs_7x7 (const CamSepFilterKernel &ker) |
C++ wrapping for camSepFilterAbs7x7() function. | |
int | sep_filter_abs_7x7 (CamImage &dest, const CamSepFilterKernel &k) const |
C++ wrapping for camSepFilterAbs7x7() function. | |
bool | fixed_filter (CamImage &dest, int filter) const |
C++ wrapping for camFixedFilter() function. | |
bool | fixed_filter (int filter) |
C++ wrapping for camFixedFilter() function. | |
bool | draw_line (int x1, int y1, int x2, int y2, int color) |
C++ wrapping for camDrawLine() function. | |
bool | accumulate_line (int x1, int y1, int x2, int y2, int acc) |
C++ wrapping for camAccumulateLine() function. | |
bool | draw_rectangle (int x1, int y1, int x2, int y2, int color) |
C++ wrapping for camDrawRectangle() function. | |
bool | draw_text_16s (const char *text, int x, int y, int cwidth, int cheight, int orientation, int color) |
C++ wrapping for camDrawText16s() function. | |
bool | draw_text_bitmap (const char *text, int x, int y, const CamBitmapFont &font) |
C++ wrapping for camDrawTextBitmap() function. | |
bool | draw_circle (int x, int y, int r, int color) |
C++ wrapping for camDrawCircle() function. | |
bool | draw_ellipse (int x, int y, int rx, int ry, int color) |
C++ wrapping for camDrawEllipse() function. | |
bool | plot (int x, int y, int color, int kind=CAM_POINT) |
C++ wrapping for camPlot() function. | |
int | fill_color (int x, int y, int fillcolor, int tolerance=-1) |
C++ wrapping for camFillColor() function. | |
bool | scale (CamImage &dest) const |
C++ wrapping for camScale() function. | |
bool | set_mask (const CamRLEImage &mask) |
C++ wrapping for camSetRLEMask() function. | |
bool | set_mask (const CamImage &mask) |
C++ wrapping for camSetMask() function. | |
bool | apply_lut (const CamTable &lut) |
C++ wrapping for camApplyLUT() function. | |
bool | apply_lut (CamImage &dest, const CamTable &lut) const |
C++ wrapping for camApplyLUT() function. | |
CamImage * | to_yuv () const |
C++ wrapping for camRGB2YUV() function. | |
bool | to_yuv (CamImage &dest) const |
C++ wrapping for camRGB2YUV() function. | |
CamImage * | to_rgb () const |
C++ wrapping for camYUV2RGB() function. | |
bool | to_rgb (CamImage &dest) const |
C++ wrapping for camYUV2RGB() function. | |
CamRLEImage * | encode () const |
C++ wrapping for camRLEEncode() function. | |
CamRLEImage * | encode_lut (const CamTable &LUT) const |
C++ wrapping for camRLEEncodeLUT() function. | |
CamRLEImage * | encode_threshold (int threshold) const |
C++ wrapping for camRLEEncodeThreshold() function. | |
CamRLEImage * | encode_threshold_inv (int threshold) const |
C++ wrapping for camRLEEncodeThresholdInv() function. | |
CamRLEImage * | encode_color (const CamTable &clusters) const |
C++ wrapping for camRLEEncodeColor() function. | |
bool | encode (CamRLEImage &dest) const |
C++ wrapping for camRLEEncode() function. | |
bool | encode_lut (CamRLEImage &dest, const CamTable &LUT) const |
C++ wrapping for camRLEEncodeLUT() function. | |
bool | encode_threshold (CamRLEImage &dest, int threshold) const |
C++ wrapping for camRLEEncodeThreshold() function. | |
bool | encode_threshold_inv (CamRLEImage &dest, int threshold) const |
C++ wrapping for camRLEEncodeThresholdInv() function. | |
int | threshold (CamImage &dest, int threshold) const |
C++ wrapping for camThreshold() function. | |
int | threshold_inv (CamImage &dest, int threshold) const |
C++ wrapping for camThresholdInv() function. | |
int | abs (CamImage &dest) const |
C++ wrapping for camAbs() function. | |
int | threshold (int threshold) |
C++ wrapping for camThreshold() function. | |
int | threshold_inv (int threshold) |
C++ wrapping for camThresholdInv() function. | |
int | abs () |
C++ wrapping for camAbs() function. | |
int | arithm (int operation, int c1=0, int c2=0, int c3=0) |
C++ wrapping for camMonadicArithm() function. | |
int | arithm (CamImage &dest, int operation, int c1=0, int c2=0, int c3=0) const |
C++ wrapping for camMonadicArithm() function. | |
int | arithm (const CamImage &source2, CamImage &dest, int operation, int c1=0, int c2=0, int c3=0, int c4=0) const |
C++ wrapping for camDyadicArithm() function. | |
CamMeasuresResults | measures () const |
C++ wrapping for camMeasures() function. | |
float | average_deviation (int average=0) const |
C++ wrapping for camMeasureAverageDeviation() function. | |
bool | sum_hv (CamTable &hsum, CamTable &vsum) const |
C++ wrapping for camSumHV() function. | |
bool | sum_h (CamTable &sum) const |
C++ wrapping for camSumH() function. | |
bool | sum_v (CamTable &sum) const |
C++ wrapping for camSumV() function. | |
bool | histogram (CamTable &histo) const |
C++ wrapping for camHistogram() function. | |
bool | histogram_2_channels (int ch1, int ch2, CamImage &result, int size=1) const |
C++ wrapping for camHistogram2Channels() function. | |
int | find_threshold (int percent) const |
C++ wrapping for camFindThreshold() function. | |
int | hough_circle (int percent, int rmin, int rmax, int &xc, int &yc, int &rc) const |
C++ wrapping for camHoughCircle() function. | |
int | hierarchical_watershed (CamImage &watershed, CamTableOfBasins &tob) const |
C++ wrapping for camHierarchicalWatershed() function. | |
int | hierarchical_watershed_contours (CamImage &ws, CamTableOfBasins &tob) const |
C++ wrapping for camHierarchicalWatershedContours() function. | |
int | hierarchical_watershed_regions (const CamTableOfBasins &tob) |
C++ wrapping for camHierarchicalWatershedRegions() function. | |
Data Fields | |
int | nSize |
Size of CamImage struct. | |
int | id |
Frame Id (user dependant). | |
int | nChannels |
Number of channels in the image (generally 1,3 or 4). | |
int | alphaChannel |
Alpha channel number (0 if there is no alpha channel in the image). | |
int | depth |
Bit depth of pixels. | |
char | colorModel [4] |
A four-character string describing the color model: "RGB", "GRAY", "HLS", etc. | |
char | channelSeq [4] |
The sequence of color channels. | |
int | dataOrder |
CAM_DATA_ORDER_PIXEL or CAM_DATA_ORDER_PLANE. | |
int | origin |
The origin of the image. Can only be CAM_ORIGIN_TL (top left). | |
int | align |
Alignment of image data : 4 (CAM_ALIGN_DWORD) or 8 (CAM_ALIGN_QWORD) byte align. | |
int | width |
Width of the image in pixels. | |
int | height |
Height of the image in pixels. | |
CamROI * | roi |
Pointer to a ROI (Region of interest) structure. | |
void * | mask |
Pointer to the header of another image that specifies the mask ROI. Pointer to mask image. | |
void * | imageId |
The image ID Free for user application. | |
void * | misc |
Free for user application (information on tiling in IplImage structure). | |
int | imageSize |
Useful size in bytes. | |
unsigned char * | imageData |
Pointer to aligned image. | |
int | widthStep |
The size of aligned line in bytes. | |
int | borderMode [4] |
The top, bottom, left and right border mode. | |
int | borderConst [4] |
Constants for the top, bottom, left and right border. | |
unsigned char * | imageDataOrigin |
Pointer to full, nonaligned image. A NULL value indicates that the image is not owned by the structure. |
This structure originally comes from IPL (Image Processing Library) by Intel. This standard structure is also used in OpenCV (Open Source Computer Vision Libary). The IplImage structure is the preferred structure for image processing with RT-Maps (Real-Time "des Mines" Automotive Prototyping System).
|
The sequence of color channels. Can be one of the following: "G", "GREY", "BGR", "BGRA", "RGB", "RGBA", "HSV", "HLS", "XYZ", "YUV", "YCr", "YCC", "LUV". |
|
Bit depth of pixels. Can be one of CAM_DEPTH_1U, CAM_DEPTH_8U, CAM_DEPTH_8S, CAM_DEPTH_10U, CAM_DEPTH_10S, CAM_DEPTH_12U, CAM_DEPTH_12S, CAM_DEPTH_16U, CAM_DEPTH_16S. |
|
The image ID Free for user application. Field reserved for the use of the application to identify the image. |
|
Pointer to the header of another image that specifies the mask ROI. Pointer to mask image. This argument can be NULL, which indicates that no mask ROI is used. A pixel is processed if the corresponding mask pixel is not 0, and is not processed if the mask pixel is 0. At the moment, only RLE encoded masks are supported (CamRLEImage structure) |
|
Pointer to a ROI (Region of interest) structure. This argument can be NULL, which implies that a region of interest comprises all channels and the entire image area. |