Open LolloMazzy opened 5 years ago
Which version of OpenCV do you have?
OpenCV 3 I have follow the instructions
Can you help me ?
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
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)
This worked for me too.
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