File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 22from glob import glob
33import cv2
44
5-
65def barcode (decoded , image ):
76 imge = cv2 .rectangle (image , (decoded .rect .left ,
8- decoded .rect .top ), (decoded .rect .left + decoded .rect .width ,
9- decoded .rect .top +
10- decoded .rect .height ),
11- color = (0 , 255 , 0 ), thickness = 5 )
7+ decoded .rect .top ), (decoded .rect .left + decoded .rect .width ,
8+ decoded .rect .top + decoded .rect .height ),
9+ color = (0 , 255 , 0 ), thickness = 5 )
1210 return imge
1311
14-
1512def scan (image ):
1613 dcode = decode (image )
1714 for obj in dcode :
@@ -23,9 +20,9 @@ def scan(image):
2320 return image
2421
2522
26- dat = input ("Enter the path of the barcode" )
27- data = glob (dat )
28- for code in data :
23+ data = input ("Enter the path of the barcode" )
24+ dat = glob (data )
25+ for code in dat :
2926 img = cv2 .imread (code )
3027 img = scan (img )
3128 cv2 .imshow ("img" , img )
You can’t perform that action at this time.
0 commit comments