For the mat which stores images, it is easy to show it using imshow
.But if the data type of the Mat is CV_32FC1, how can I display this mat ?
I tried i
If image
is a Mat of type CV_32F, If the image is 32-bit floating-point, imshow() multiplies the pixel values by 255 - that is, the value range [0,1] is mapped to [0,255].
So your floating point image has to have a range 0 .. 1.
This will display a CV32F image, no matter what the range is:
cv::Mat dst
cv::normalize(image, dst, 0, 1, cv::NORM_MINMAX);
cv::imshow("test", dst);
cv::waitKey(0);