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

Sistine.py in crash when I run it #12

Open
LolloMazzy opened this issue Jan 19, 2019 · 6 comments
Open

Sistine.py in crash when I run it #12

LolloMazzy opened this issue Jan 19, 2019 · 6 comments

Comments

@LolloMazzy
Copy link

I run with the command python2 sistine.py but the window with the picture of webcam, remains open for only 2 seconds.
In the terminal i can see this message:
Traceback (most recent call last): File "sistine.py", line 397, in <module> main() File "sistine.py", line 383, in main if not currStage(segmented, debugframe, options, ticks, drawframe, calib, state): File "sistine.py", line 223, in _calibration x, y, touch = find(segmented, debugframe=drawframe, options=options) File "sistine.py", line 152, in find _, cnts, _ = cv2.findContours(segmented_image.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) ValueError: need more than 2 values to unpack

@bijection
Copy link
Owner

Which version of OpenCV do you have?

@LolloMazzy
Copy link
Author

OpenCV 3
I have follow the instructions

@LolloMazzy
Copy link
Author

Can you help me ?

@ashok2ashok
Copy link

ashok2ashok commented Jun 27, 2019

I have a similar issue. Followed instructs in readme and when I run sistine.py, getting a ValueError.
I'm running MacOS Mojave v10.14.5.

$ python2 sistine.py  
Traceback (most recent call last):  
  File "sistine.py", line 397, in <module>  
    main()  
  File "sistine.py", line 383, in main  
    if not currStage(segmented, debugframe, options, ticks, drawframe, calib, state):  
  File "sistine.py", line 223, in _calibration  
    x, y, touch = find(segmented, debugframe=drawframe, options=options)  
  File "sistine.py", line 152, in find  
    _, cnts, _ = cv2.findContours(segmented_image.copy(), cv2.RETR_EXTERNAL,   cv2.CHAIN_APPROX_SIMPLE)  
ValueError: need more than 2 values to unpack 

@mark0425luke
Copy link

mark0425luke commented Jul 10, 2019

I've tried to change line152 to something like the below, and the sistine.py did not shut down

( cnts, _ )= cv2.findContours(segmented_image.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)

@void-robotics
Copy link

This worked for me too.

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

4 participants