wangzhibo
2022-03-23 69b8cbd754284a2071d06149f0c92d9fe50a744e
debug/2_check_frame_digits.py
@@ -73,9 +73,10 @@
    contours, hierarchy = cv2.findContours(counter,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
    contours_count = 0
    return_numbers = []
    image_h = image.shape[0]
    for c in contours:
        x, y, w, h = cv2.boundingRect(c)
        if hierarchy[0][contours_count][3] ==0 :
        if hierarchy[0][contours_count][3] ==0 and h > image_h * 0.3:
        #if image_h*0.98 > h > image_h * 0.6:
            print((x, y, w, h))
            cv2.rectangle(image, (x, y), (x+w, y+h), (0, 255, 0), 2)