creotiv / object_detection_projects

My public projects about object detection algorithms
350 stars 225 forks source link

CV2.VideoCapture("rtsp://... vs skvideo.io.vreader #23

Closed radeberger closed 4 years ago

radeberger commented 4 years ago

Hello! Help me, please. Try to use cv2 with rtsp, but receiving errors:

Traceback (most recent call last): File "C:/Users/usr6243828/PycharmProjects/traffic-count/traffic.py", line 120, in main() File "C:/Users/usr6243828/PycharmProjects/traffic-count/traffic.py", line 109, in main pipeline.run() File "C:\Users\usr6243828\PycharmProjects\traffic-count\pipeline.py", line 57, in run self.context = p(self.context) File "C:\Users\usr6243828\PycharmProjects\traffic-count\pipeline.py", line 379, in call frame = self.draw_ui(frame, vehicle_count, exit_masks) File "C:\Users\usr6243828\PycharmProjects\traffic-count\pipeline.py", line 363, in draw_ui mask = cv2.bitwise_and(_img, _img, mask=exit_mask) cv2.error: OpenCV(4.3.0) C:\projects\opencv-python\opencv\modules\core\src\arithm.cpp:250: error: (-215:Assertion failed) (mtype == CV_8U || mtype == CV_8S) && _mask.sameSize(*psrc1) in function 'cv::binary_op'

licuiguo commented 4 years ago

hey,bro! Have you slove this problem

radeberger commented 4 years ago

hey,bro! Have you slove this problem

yes, but i dont remember how) it seems reinstalled software