I have a little project that should read VideosStream from rtsp camera to do some other tasks. I could run its original hc_yolo_all.py file without any issue. However, after making an executable file with pyinstaller --onefile hc_yolo_all.py
, it couldn't derive VideoStream and gave the error
Traceback (most recent call last):
File "hc_yolo_all.py", line 60, in <module>
cv2.error: OpenCV(3.4.3) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:4044: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
[7340] Failed to execute script hc_yolo_all.
It is seen that frame = cv2.resize(frame, (416,416))
, line 60, of hc_yolo_all.py is receiving an empty frame and therefore, output an error.
Where do you think the issue lies in?
I, to be honest, don't know whether it is related to opencv or rtsp or pyinstaller, so I've tagged those three.