1 | initial version |
There is ready function in OpenCV for that. In C++ it is cv::threshold
in Java it is imgproc.threshold
. There is reference manual for the C++ function here. Approximately the same description is added for Java version in OpenCV Javadoc.