First of all, this is a perfectly viable Python program THAT I got from somewhere else.
This is the error:
============ RESTART: G:\fansPOV\beiyong\bbPOV-P-main\API\sender.py ============
Exception in thread Thread-1:
Traceback (most recent call last):
File “C:\Users\wt165\AppData\Local\Programs\Python\Python39\lib\threading.py”, line 973, in _bootstrap_inner
self.run()
File “C:\Users\wt165\AppData\Local\Programs\Python\Python39\lib\threading.py”, line 910, in run
self._target(*self._args, **self._kwargs)
File “G:\fansPOV\beiyong\bbPOV-P-main\API\sender.py”, line 76, in capture
polarConv(frame)
File “G:\fansPOV\beiyong\bbPOV-P-main\API\sender.py”, line 59, in polarConv
ret,img_encode = cv2.imencode(‘.jpg’,polar_image,[int(cv2.IMWRITE_JPEG_QUALITY), 50]+[int(cv2.IMWRITE_JPEG_OPTIMIZE), True])
cv2.error: OpenCV(3.4.17) error: (-5:Bad argument) in function ‘imencode’Overload resolution failed:
- Can’t parse ‘params’. Sequence item with index 3 has a wrong type
- Can’t parse ‘params’. Sequence item with index 3 has a wrong type
**
i think this is the part of the program that reported the error
ret,img_encode = cv2.imencode(‘.jpg’,polar_image,[int(cv2.IMWRITE_JPEG_QUALITY), 50]+[int(cv2.IMWRITE_JPEG_OPTIMIZE), True])
**
I think this is an Opencv-Python version issue,
Does anyone know which version I should download