Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

that's a bug. (imshow can only handle uchar images in the version you have)

please download the latest opencv master branch and rebuild again, in the meantime, convert your image manually:

img.convertTo(img, CV_8U, 1.0/255); //for float images
imshow("I", img);

that's a bug. an internal bug. (imshow can only handle uchar images in the version you have)

please download the latest opencv master branch and rebuild again, in the meantime, convert your image manually:

img.convertTo(img, CV_8U, 1.0/255); //for float images
imshow("I", img);

that's an internal bug. (imshow can only handle uchar images in the version you have)

please download the latest opencv master branch and rebuild again, in the meantime, convert your image manually:

img.convertTo(img, CV_8U, 1.0/255); 255); //for float images
imshow("I", img);

edit:

the conversion factor ofc. has to be 255 to go from float -> uchar, but 1.0/255 when coming from ushort.