Ask Your Question

Revision history [back]

Why converting an image from CV_8UC3 to CV_32FC1 still seems the same?

I first read an image with:

imread("imgFile.jpg", cv::IMREAD_UNCHANGED)

The image type is CV_8UC3.

After I convert the image into floats with

img.convertTo(f_img, CV_32FC1, 1/255.0);

When I use imshow for both images, they are both displayed with color.

imshow("Original Image", img); imshow("Converted Image", f_img);

This will both displayed as the same.