wai572 commited on
Commit
f98fb78
·
1 Parent(s): 7e908e1
Files changed (1) hide show
  1. identify_cards.py +1 -1
identify_cards.py CHANGED
@@ -304,7 +304,7 @@ def get_not_white_mask(img):
304
  l_channel = lab_patch[:, :, 0]
305
  a_channel = lab_patch[:, :, 1]
306
  b_channel = lab_patch[:, :, 2]
307
- mask_l = cv2.threshold(l_channel, 160, 255, cv2.THRESH_BINARY_INV)[1]
308
  mask_a = cv2.threshold(a_channel, 120, 255, cv2.THRESH_BINARY)[1]
309
  mask_b = cv2.threshold(b_channel, 120, 255, cv2.THRESH_BINARY)[1]
310
  mask_ab = cv2.bitwise_or(mask_a, mask_b)
 
304
  l_channel = lab_patch[:, :, 0]
305
  a_channel = lab_patch[:, :, 1]
306
  b_channel = lab_patch[:, :, 2]
307
+ mask_l = cv2.threshold(l_channel, 165, 255, cv2.THRESH_BINARY_INV)[1]
308
  mask_a = cv2.threshold(a_channel, 120, 255, cv2.THRESH_BINARY)[1]
309
  mask_b = cv2.threshold(b_channel, 120, 255, cv2.THRESH_BINARY)[1]
310
  mask_ab = cv2.bitwise_or(mask_a, mask_b)