Ask Your Question

Revision history [back]

I guess the threshold algorithms proposed here could help you out:

http://docs.opencv.org/modules/imgproc/doc/miscellaneous_transformations.html

The threshold function applied twice could do exactly what you want. Just convert your 2D image structure to a single row vector first.