@@ -43,7 +43,8 @@ def detectPlatesInScene(imgOriginalScene):
43
43
listOfPossibleCharsInScene = findPossibleCharsInScene (imgThreshScene )
44
44
45
45
if Main .showSteps == True : # show steps #######################################################
46
- print "step 2 - len(listOfPossibleCharsInScene) = " + str (len (listOfPossibleCharsInScene )) # 131 with MCLRNF1 image
46
+ print ("step 2 - len(listOfPossibleCharsInScene) = " + str (
47
+ len (listOfPossibleCharsInScene ))) # 131 with MCLRNF1 image
47
48
48
49
imgContours = np .zeros ((height , width , 3 ), np .uint8 )
49
50
@@ -62,7 +63,8 @@ def detectPlatesInScene(imgOriginalScene):
62
63
listOfListsOfMatchingCharsInScene = DetectChars .findListOfListsOfMatchingChars (listOfPossibleCharsInScene )
63
64
64
65
if Main .showSteps == True : # show steps #######################################################
65
- print "step 3 - listOfListsOfMatchingCharsInScene.Count = " + str (len (listOfListsOfMatchingCharsInScene )) # 13 with MCLRNF1 image
66
+ print ("step 3 - listOfListsOfMatchingCharsInScene.Count = " + str (
67
+ len (listOfListsOfMatchingCharsInScene ))) # 13 with MCLRNF1 image
66
68
67
69
imgContours = np .zeros ((height , width , 3 ), np .uint8 )
68
70
@@ -91,10 +93,10 @@ def detectPlatesInScene(imgOriginalScene):
91
93
# end if
92
94
# end for
93
95
94
- print "\n " + str (len (listOfPossiblePlates )) + " possible plates found" # 13 with MCLRNF1 image
96
+ print ( "\n " + str (len (listOfPossiblePlates )) + " possible plates found" ) # 13 with MCLRNF1 image
95
97
96
98
if Main .showSteps == True : # show steps #######################################################
97
- print "\n "
99
+ print ( "\n " )
98
100
cv2 .imshow ("4a" , imgContours )
99
101
100
102
for i in range (0 , len (listOfPossiblePlates )):
@@ -107,13 +109,13 @@ def detectPlatesInScene(imgOriginalScene):
107
109
108
110
cv2 .imshow ("4a" , imgContours )
109
111
110
- print "possible plate " + str (i ) + ", click on any image and press a key to continue . . ."
112
+ print ( "possible plate " + str (i ) + ", click on any image and press a key to continue . . ." )
111
113
112
114
cv2 .imshow ("4b" , listOfPossiblePlates [i ].imgPlate )
113
115
cv2 .waitKey (0 )
114
116
# end for
115
117
116
- print "\n plate detection complete, click on any image and press a key to begin char recognition . . .\n "
118
+ print ( "\n plate detection complete, click on any image and press a key to begin char recognition . . .\n " )
117
119
cv2 .waitKey (0 )
118
120
# end if # show steps #########################################################################
119
121
@@ -148,8 +150,8 @@ def findPossibleCharsInScene(imgThresh):
148
150
# end for
149
151
150
152
if Main .showSteps == True : # show steps #######################################################
151
- print "\n step 2 - len(contours) = " + str (len (contours )) # 2362 with MCLRNF1 image
152
- print "step 2 - intCountOfPossibleChars = " + str (intCountOfPossibleChars ) # 131 with MCLRNF1 image
153
+ print ( "\n step 2 - len(contours) = " + str (len (contours ))) # 2362 with MCLRNF1 image
154
+ print ( "step 2 - intCountOfPossibleChars = " + str (intCountOfPossibleChars )) # 131 with MCLRNF1 image
153
155
cv2 .imshow ("2a" , imgContours )
154
156
# end if # show steps #########################################################################
155
157
0 commit comments