OpenCV3 threshold question (cv2.THRESH_BINARY_INV | cv2.THRESH_OTSU)[1]

asked 2018-05-28 22:25:48 -0500

kzmn gravatar image

updated 2018-05-29 00:06:13 -0500

berak gravatar image

Hi... I am using OpenCV3 with Python and want to know what exactly happens when I use:

thresh = cv2.threshold(frame,100, 255, cv2.THRESH_BINARY_INV | cv2.THRESH_OTSU)[1]

to threshold frames of a video, one at a time. What does OR mean here? (does it mean binary inverse will be applied to some frames and OTSU will be applied to other frames? on what basis?) Thanks.

edit retag flag offensive close merge delete


berak gravatar imageberak ( 2018-05-29 00:08:21 -0500 )edit