March 2019
Intermediate to advanced
532 pages
13h 2m
English
In order to perform simple thresholding, OpenCV provides the cv2.threshold() function that was briefly introduced in the previous section. The signature for this method is as follows:
cv2.threshold(src, thresh, maxval, type, dst=None) -> retval, dst
The cv2.threshold() function applies a fixed-level thresholding to the src input array (multiple-channel, 8-bit or 32-bit floating point). The fixed level is adjusted by the thresh parameter, which sets the threshold value. The type parameter sets the thresholding type, which will be further explained in the next subsection.
Different types are as follows:
Read now
Unlock full access