How to change contrast of image?
Hello! I have a problem . I decided to write a function to change the contrast of the image. Original image : RGB 8-bit 1920x1080. Processor of computer , which I use for processing is AMD Phenom II 810 2.6 GHz. To compile in Visual Studio (c + +) I use configuration Release x64. If the algorithm is used as here : http://docs.opencv.org/doc/tutorials/core/basic_linear_transform/basic_linear_transform.html, then the image processing takes 340ms , that's a lot . Next, I decided to write the code in the likeness http://habrahabr.ru/post/139428/ ( taking remarks in the comments ) , the processing time became 240ms , it is lot. Then I tried to use to calculate the "buf ( see article from http://habrahabr.ru/post/139428/) using a thumbnail image of the original ( somewhere in the 10 times ) , the processing time was reduced to 100 ms , but still a lot.
Google doesn't give results about image contrast changing fast algorithm.
Have you tried reaching the pixels with this method? http://docs.opencv.org/doc/tutorials/core/how_to_scan_images/how_to_scan_images.html#the-efficient-way