Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 2088

why do i get this error

$
0
0
masked = cv2.bitwise_and(img,img,mask=mask[:,:,2]) cv2_imshow(masked) cv2.waitKey(0) # Cleanup after any key is pressed cv2.destroyAllWindows() This is my code 👆🏽 error Traceback (most recent call last) in () 1 #layer 2 is the red layer. Rememeber (B,G,R) ----> 2 masked = cv2.bitwise_and(img,img,mask=mask[:,:,2]) 3 cv2_imshow(masked) 4 5 cv2.waitKey(0) # Cleanup after any key is pressed error: OpenCV(4.1.2) /io/opencv/modules/core/src/arithm.cpp:245: error: (-215:Assertion failed) (mtype == CV_8U || mtype == CV_8S) && _mask.sameSize(*psrc1) in function 'binary_op' And the error 👆🏽 P.S. I am using Google Colaboratory

Viewing all articles
Browse latest Browse all 2088

Trending Articles