Python-OpenCV cv2 OpenCV Error: Assertion failed (scn == 3 || scn == 4) in unknown function, file ..\..\..\modules\imgproc\src\color.cpp

前端 未结 4 1241
半阙折子戏
半阙折子戏 2020-12-09 02:32

I am trying to learn contours in python using cv2.

I tried the following code given in a tutorial guide:

import cv2
import numpy as np
from matplotli         


        
4条回答
  •  庸人自扰
    2020-12-09 02:48

    If you are getting this error on a raspberry PI with PI camera, try running this command first:

    sudo modprobe bcm2835-v4l2
    

提交回复
热议问题