Otsu's thresholding
gray = cv2.cvtColor(shifted, cv2.COLOR_BGR2GRAY) thresh = cv2.threshold(gray, 0, 255,cv2.THRESH_BINARY | cv2.THRESH_OTSU)[1]
In the end, there's [1] written what does it mean? I am trying to use automatic threshold.
1 | initial version |
gray = cv2.cvtColor(shifted, cv2.COLOR_BGR2GRAY) thresh = cv2.threshold(gray, 0, 255,cv2.THRESH_BINARY | cv2.THRESH_OTSU)[1]
In the end, there's [1] written what does it mean? I am trying to use automatic threshold.
2 | No.2 Revision |
What is the difference between In the end, there's [1] written what does it mean? I am trying to use automatic threshold.cv2.threshold(gray, 0, 255,cv2.THRESH_BINARY |
cv2.THRESH_OTSU) cv2.THRESH_OTSU) and cv2.threshold(gray, 0, 255,cv2.THRESH_BINARY +
cv2.THRESH_OTSU)? Otsu's thresholding
cv2.THRESH_OTSU) ?
gray = cv2.cvtColor(shifted, cv2.COLOR_BGR2GRAY)
thresh = cv2.threshold(gray, 0, 255,cv2.THRESH_BINARY | # Otsu's thresholding
cv2.THRESH_OTSU)[1]cv2.THRESH_OTSU)**[1]**