Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.

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); G*(CRb.*Rb+b); 
min3 = min(min(Rb)); // minimun in the Rb image
max3 = max(max(Rb)); // maximum in the Rb image

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.

image.