Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

value error #18

Open
Shubham191297 opened this issue Aug 6, 2019 · 4 comments
Open

value error #18

Shubham191297 opened this issue Aug 6, 2019 · 4 comments

Comments

@Shubham191297
Copy link

File "C:\Users\Shubham.000\Desktop\OpenCV_3_License_Plate_Recognition_Python-master\DetectPlates.py", line 133, in findPossibleCharsInScene
imgContours, contours, npaHierarchy = cv2.findContours(imgThreshCopy, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) # find all contours

ValueError: need more than 2 values to unpack

@pristis
Copy link

pristis commented Sep 16, 2019

Same issue here.

python Main.py Traceback (most recent call last): File "Main.py", line 134, in <module> main() File "Main.py", line 38, in main listOfPossiblePlates = DetectPlates.detectPlatesInScene(imgOriginalScene) # detect plates File "/home/martin/Documents/Plate/OpenCV_3_License_Plate_Recognition_Python-master/DetectPlates.py", line 43, in detectPlatesInScene listOfPossibleCharsInScene = findPossibleCharsInScene(imgThreshScene) File "/home/martin/Documents/Plate/OpenCV_3_License_Plate_Recognition_Python-master/DetectPlates.py", line 133, in findPossibleCharsInScene imgContours, contours, npaHierarchy = cv2.findContours(imgThreshCopy, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) # find all contours ValueError: need more than 2 values to unpack

@techieph
Copy link

techieph commented Oct 26, 2019

the function cv2.findContours() has been changed to return only the two parameters, here in this context contours, npaHierarchy
you should change it to:
contours, npaHierarchy = cv2.findContours(imgThreshCopy, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) # find all contours in Line:133 in DetectPlates.py,
contours, npaHierarchy = cv2.findContours(imgThreshCopy, cv2.RETR_CCOMP, cv2.CHAIN_APPROX_SIMPLE) in Line:239 in DetectPlates.py.
Ping me back if it works!

@Mayank2504
Copy link

@techieph yes it worked

@iNusz
Copy link

iNusz commented Dec 9, 2019

@techieph it works well!!

but in 7 line you should change word
DetectPlates.py -> DetectChars.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants