Introduction - If you have any usage issues, please Google them yourself
In order to avoid image processing directly on the rgb color distortion occurs, often the color image from the rgb space into hsv space to complete the appropriate treatment, and then inverse transform to the rgb space.