creating: find-books/
inflating: find-books/find_books.py
inflating: find-books/.DS_Store
inflating: find-books/example.jpg
user@msp430:~/work/opencv_python$ cd find-books/
user@msp430:~/work/opencv_python/find-books$ ls
example.jpg find_books.py
user@msp430:~/work/opencv_python/find-books$ python3 find_books.py
File "find_books.py", line 38
cv2.imwrite("output.jpg", image))
^
SyntaxError: invalid syntax
user@msp430:~/work/opencv_python/find-books$ vim find_books.py
user@msp430:~/work/opencv_python/find-books$ python3 find_books.py
File "find_books.py", line 38
cv2.imwrite("output.jpg", image))
^
SyntaxError: invalid syntax
user@msp430:~/work/opencv_python/find-books$ vim find_books.py
user@msp430:~/work/opencv_python/find-books$ python3 find_books.py
Traceback (most recent call last):
File "find_books.py", line 28, in <module>
peri = cv2.arcLength(c, True)
cv2.error: OpenCV(4.1.0) /io/opencv/modules/imgproc/src/shapedescr.cpp:239: error: (-215:Assertion failed) count >= 0 && (depth == CV_32F || depth == CV_32S) in function 'arcLength'
Там где invalid syntax убери лишнюю скобку
Обсуждают сегодня