I want to translate the following matlab code into OpenCV. What functions to use?
//Matlab Code //G and b are constant //Rb, CRb and Rb_final are the images
Rb = G*(CRb.*Rb+b);
min3 = min(min(Rb)); // minimun in the Rb image
max3 = max(max(Rb)); // maximum in the Rb image
Rb_final = uint8(255*(Rb-min3)/(max3-min3)); // This function is to scale the image into 0 ~ 255 using maximum and minimum value in the image.
add a comment