import cv2 # Read image img = cv2.imread('image.png', 0) # Perform binary thresholding on the image with T = 125 r, threshold = cv2.threshold(img, 125, 255, cv2.THRESH_BINARY) cv2_imshow(threshold)
import cv2 # Read image img = cv2.imread('image.png', 0) # Perform binary thresholding on the image with T = 125 r, threshold = cv2.threshold(img, 125, 255, cv2.THRESH_BINARY) cv2_imshow(threshold)