Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

if you really got [0..1] data in a short array, you won't see any difference in imshow(). try:

imshow("image",image * 1000);

or similar. in general, binary images in opencv are 0 or ~0 (255 for uchar, (2^16)-1 for short)

if you really got [0..1] data in a short array, you won't see any difference in imshow(). try:

imshow("image",image * 1000);

or similar. in general, binary images in opencv are 0 or ~0 (255 for uchar, (2^16)-1 for short)

also, unsigned short (CV_16U) might be a better choice for binary