Open nomanbahoo opened 5 years ago
Same Error I got too
Change these lines in detectPlate.py Line no: 133-----
contours, npaHierarchy = cv2.findContours(imgThreshCopy, cv2.RETR_CCOMP,
cv2.CHAIN_APPROX_SIMPLE) # find all contours
detectChars.py Line no: 239-----
contours, npaHierarchy = cv2.findContours(imgThreshCopy, cv2.RETR_CCOMP,
cv2.CHAIN_APPROX_SIMPLE)
for contour in contours: # for each contour
possibleChar = PossibleChar.PossibleChar(contour)
thanks sir its working for me ... i really appreciate you ...kindly you can tell me how can i use this project for Pakistani car number plates ?????
I had same errors but after changing the above mentioned lines code worked. Thank you so much . Its my MCA project .
Interesting, neither change worked for me in Python3, but the adding [-2:] at the end of the original findContours() worked.
main() listOfPossiblePlates = DetectPlates.detectPlatesInScene(imgOriginalScene) # detect plates listOfPossibleCharsInScene = findPossibleCharsInScene(imgThreshScene) imgContours, contours, hierarchy = cv2.findContours(imgThreshCopy, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) # find all contours ValueError: not enough values to unpack (expected 3, got 2)