sistine icon indicating copy to clipboard operation
sistine copied to clipboard

Sistine.py in crash when I run it

Open LolloMazzy opened this issue 6 years ago • 6 comments

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

LolloMazzy avatar Jan 19 '19 20:01 LolloMazzy

Which version of OpenCV do you have?

bijection avatar Jan 24 '19 19:01 bijection

OpenCV 3 I have follow the instructions

LolloMazzy avatar Jan 24 '19 22:01 LolloMazzy

Can you help me ?

LolloMazzy avatar Feb 09 '19 20:02 LolloMazzy

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 

ashok2ashok avatar Jun 27 '19 20:06 ashok2ashok

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)

mark0425luke avatar Jul 10 '19 16:07 mark0425luke

This worked for me too.

void-robotics avatar Jul 31 '19 14:07 void-robotics