Hi,
I have image data to be demosaicked which I figured out how to do with OpenCV using cv::cuda::demosaicing().
After that, I adjust brightness and contrast with a quick hack I found on the Internet. This involves creating a new Mat and then conversion with alpha and beta constants:
double alpha = 17.5; /*< Simple contrast control */
int beta = 100; /*< Simple brightness control */
cv::cuda::GpuMat new_image(dst.size(), dst.type());
dst.convertTo(new_image, -1, alpha, beta);
This looks reasonable after demosaicing, however there is a matrix of values to somehow apply to the image which is from a C6440 sensor.
1.32 -0.46 0.14
-0.36 1.25 0.11
0.08 -1.96 1.88
It seems like I have to convert the type (unsigned 16 bit int) to a float first, then apply these color corrections. I’m not sure how to do that, does anyone know how this can be done? (And what these values are?)
Thanks for any help,