AzharMithani / License-Plate-Detection

A License Plate Recognition algorithm written in python using opencv
15 stars 6 forks source link

ValueError: not enough values to unpack (expected 3, got 2) #1

Open ashutoshSharma12 opened 5 years ago

ashutoshSharma12 commented 5 years ago

Ashutoshs-MacBook-Pro:License-Plate-Recognitiontest$ python3 Main.py Traceback (most recent call last): File "Main.py", line 134, in main() File "Main.py", line 38, in main listOfPossiblePlates = DetectPlates.detectPlatesInScene(imgOriginalScene) # detect plates File "/Users/test/Desktop/License-Plate-Detection/License-Plate-Recognition/DetectPlates.py", line 43, in detectPlatesInScene listOfPossibleCharsInScene = findPossibleCharsInScene(imgThreshScene) File "/Users/test/Desktop/License-Plate-Detection/License-Plate-Recognition/DetectPlates.py", line 131, in findPossibleCharsInScene imgContours, contours, npaHierarchy = cv2.findContours(imgThresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) # find all contours ValueError: not enough values to unpack (expected 3, got 2)`

linlinhlaing commented 3 years ago

It works in opencv-version==3.4.2.16.

Samarth-s99 commented 3 years ago

cv2.findContours returns 2 values in OpenCV(4<) it will work fine in OpenCV3