Open ashutoshSharma12 opened 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)`
test$ python3 Main.py
It works in opencv-version==3.4.2.16.
cv2.findContours returns 2 values in OpenCV(4<) it will work fine in OpenCV3
Ashutoshs-MacBook-Pro:License-Plate-Recognition
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)`
test$ python3 Main.py
Traceback (most recent call last): File "Main.py", line 134, in