mertbozkurt commited on
Commit
86af741
·
1 Parent(s): 40cdd43

Update optic1.py

Browse files
Files changed (1) hide show
  1. optic1.py +2 -2
optic1.py CHANGED
@@ -72,9 +72,9 @@ def optic1(ans_txt,pathImage, save_images= True):
72
  matrix_2 = cv2.getPerspectiveTransform(pts1_2, pts2_2)
73
  imgWarpColored_2 = cv2.warpPerspective(img, matrix_2, (wrap_v, wrap_h))
74
  imgWarpGray_2 = cv2.cvtColor(imgWarpColored_2,cv2.COLOR_BGR2GRAY)
75
- imgThresh_2 = cv2.threshold(imgWarpGray_2, 170, 255,cv2.THRESH_BINARY_INV )[1]
76
  # imgWarpGray_2 = cv2.convertScaleAbs(imgWarpGray_2)
77
- #imgThresh_2 = cv2.threshold(imgWarpGray_2,0,255,cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)[1]
78
 
79
  #student id
80
  bubbles = functions.split_num(imgThresh_2, 10, 10)
 
72
  matrix_2 = cv2.getPerspectiveTransform(pts1_2, pts2_2)
73
  imgWarpColored_2 = cv2.warpPerspective(img, matrix_2, (wrap_v, wrap_h))
74
  imgWarpGray_2 = cv2.cvtColor(imgWarpColored_2,cv2.COLOR_BGR2GRAY)
75
+ #imgThresh_2 = cv2.threshold(imgWarpGray_2, 170, 255,cv2.THRESH_BINARY_INV )[1]
76
  # imgWarpGray_2 = cv2.convertScaleAbs(imgWarpGray_2)
77
+ imgThresh_2 = cv2.threshold(imgWarpGray_2,0,255,cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)[1]
78
 
79
  #student id
80
  bubbles = functions.split_num(imgThresh_2, 10, 10)