Part of the content is from the cimg reference manual or the cimg doxygen Manual
1. Macro cimg_usage (usage): it can be used to describe the purpose and usage of a program. It is usually inserted after the definition of int main (INT argc, char ** argv.
Parameter: Usage: a string that describes the purpose and usage of the program.
Preconditions: the variables argc and argv must be correctly defined for functions using cimg_usage.
2. cimg <unsigned char> image ("lean.jpg"), visu (500,400, 1, 3, 0 );
Create two instances of images with unsigned char pixels. The first image is initialized by reading an image file from the disk. Lena.jpg must be in the same directory as the current program. The second image visu is initialized as a black color image. It's big and trivial dx = 500 (long), Dy = 400 (WIDE), DZ = 1 (deep) (here, it is a 2D image, not a 3D image), and DV = 3 (each pixel has 3 'vector 'channels R, G, B ). The last parameter in the constructor defines the default value of the pixel value (here it is 0, that is, visu will be initialized to black ).
3. Macro cimg_option (name, default, usage): used to retrieve an option value from the command line.
Parameter: Name: name of the option to be retrieved from the command line;
Default: if the option name is not specified when running the program, the default value returned by this macro;
Usage: a brief description of the options. If usage = 0, this option is not displayed in the option list when the program runs with the-H or-HELP parameter (hide this option ).
Return Value: cimg_option () returns an object of the same type with the default value default. The returned value is the same as the one specified in the command line. If an option is not specified, the returned value is equal to the default value default.
Preconditions: The functions using cimg_option must correctly define the argc and argv variables.
4. cimg get_norm_pointwise (): return the scalar image of vector norms, when dealing with Vector-Valued Images (I. E images with dimv ()> 1), this function computes the L1, L2 or linf norm of each vector-valued pixel.
5. cimg normalize (): Linear normalization of the pixel values between A and B.
6. cimg resize (): resize an image.
7. cimgdisplay main_disp (image, "click a point ");
Create a display window for the image. By default, cimgdisplay processes events (from the mouse, keyboard. On Windows, you can create a full screen display.
8. Const unsigned char red [] = {255, 0, 0}, green [] = {0,255, 0 };
Two different colors are defined, each of which is a const unsigned char array.
9. cimg dimx (): return the number of columns of the Instance image (size along the X-axis, I. e image width ).
10. cimg: Dialog (): display a dialog box, where a user can click standard buttons.
11. cimg: basename (): Compute the basename of a filename.
12. cimg get_resize (): return a resized image.
13. cimgdisplay is_closed: closed state of the window.
14. cimgdisplay key: key value if pressed.
15. cimgdisplay wait (cimgdisplay & disp1, cimgdisplay & disp2): Wait for any event occuring either on the display disp1 or disp2.
16. cimg get_gradientxy (): return a list of images, corresponding to the XY-gradients of an image.
17. cimg blur (): blur the image with a canny-deriche filter.
18. cimg fill (VAL): fill an image by a value Val.
19. cimg display (cimgdisplay & disp): display an image into a cimgdisplay window.