wangzhibo
2022-03-23 42107c75fc28284b6e4c9c5b6149886b2e5d6c67
debug/2_check_video_digits.py
@@ -68,7 +68,7 @@
    gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
    thresh = cv2.threshold(gray, 0, 255,
                           cv2.THRESH_BINARY_INV | cv2.THRESH_OTSU)[1]
    kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (6, 6))
    kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (5, 5))
    counter = cv2.morphologyEx(thresh.copy(), cv2.MORPH_OPEN, kernel)
    image_h = image.shape[0]
    contours, hierarchy = cv2.findContours(
@@ -127,7 +127,7 @@
        cv2.waitKey(0)
cap = cv2.VideoCapture("new.mp4")  # for testing
cap = cv2.VideoCapture("video.mp4")  # for testing
total_frame = 0 
while(cap.isOpened()):
    ret, frame = cap.read()