I want to translate the following matlab code into OpenCV. What functions to use?

asked 2019-04-22 08:28:42 -0500

hua gravatar image

updated 2019-04-22 08:47:12 -0500

//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.
edit retag flag offensive close merge delete