Color curve operation with OpenCV: Increase contrast
Hi
With the Gimp image manipulation program, I frequently increase contrast by using the color curve tool. From this:
to this:
There is a small tutorial that talks about increasing contrast here: http://docs.opencv.org/doc/tutorials/core/basic_linear_transform/basic_linear_transform.html
Therefore, I assume this operation would give the desired effect:
image.convertTo(alpha: 1.3, beta: -20)
I would have to calculate the exact alpha and beta values in order to exactly represent the above color curve. Maybe anybody can comment on these assumptions or has suggestions?
Thank you very much.