Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

threshold cannot work normally

As the document of threshold

< @param src input array (multiple-channel, 8-bit or 32-bit floating point).

But why my this code cannot work??

Mat img = (Mat_<float>(1, 6) << 2, 948, 6, 77, 53, 500);
threshold(img, img, 0, 255, THRESH_OTSU);

Can anyone give me a reason?

threshold cannot work normally

As the document of threshold

< @param src input array array (multiple-channel, 8-bit or 32-bit 32-bit floating point).

But why my this code cannot work??

Mat img = (Mat_<float>(1, 6) << 2, 948, 6, 77, 53, 500);
threshold(img, img, 0, 255, THRESH_OTSU);

Can anyone give me a reason?

threshold cannot work normally

As the document of threshold

@param src input array (multiple-channel, 8-bit or 32-bit floating point).point).

But why my this code cannot work??

Mat img = (Mat_<float>(1, 6) << 2, 948, 6, 77, 53, 500);
threshold(img, img, 0, 255, THRESH_OTSU);

Can anyone give me a reason?