Closed ghost closed 6 years ago
you image and mask should be the same size, if you changed source images, you should also change mask size.
as you see https://github.com/creotiv/object_detection_projects/blob/master/opencv_traffic_counting/traffic.py#L27 current video shape size is SHAPE = (720, 1280) # h, w
Thanks
mask = cv2.bitwise_and(_img, _img, mask=exit_mask)
cv2.error: OpenCV(3.4.1) /tmp/opencv-20180307-60086-ryy1b3/opencv-3.4.1/modules/core/src/arithm.cpp:241: error: (-215) (mtype == 0 || mtype == 1) && _mask.sameSize(*psrc1) in function binary_op