Introduction - If you have any usage issues, please Google them yourself
Create a program to read and display an image
allows the user to select a rectangular area in the image, and then hold down the mouse to draw a rectangle. When the mouse is released, the highlighted rectangle in memory to retain a copy of the original image, to prevent modify the image to change the original image data. The next time you click the mouse button to restore the image and re-start the rectangle
in a separate window, using the drawing functions to draw a chart, said selected number of pixels of each color blue, green and red, respectively. This is the color histogram of the selected area. x coordinate system which means that the pixel value range the 0-31,32-63 ...... ,223-255, y coordinates corresponding to the number of pixels in the selected area. For each color channel (BGR)