FindContours support only 8uC1 and 32sC1 images

后端 未结 4 1132
独厮守ぢ
独厮守ぢ 2021-02-14 05:42

i hava problem in fire detection my code is :

ret, frame = cap.read()
lab_image = cv2.cvtColor(frame, cv2.COLOR_BGR2LAB)
L , a , b = cv2.split(lab_image)
ret,t         


        
4条回答
  •  攒了一身酷
    2021-02-14 05:58

    cv2.cvtColor(img, cv2.COLOR_BGR2GRAY);
    

    Use this line on the image you wish to find contours on and it should work, because it will convert your image to 8UC1 format (grayscale).

提交回复
热议问题