How to fill Matrix with zeros in OpenCV?

前端 未结 8 984
-上瘾入骨i
-上瘾入骨i 2020-12-15 03:36

The code below causes an exception. Why?

#include 
#include 

using namespace cv;
using namespace std;

void mai         


        
8条回答
  •  -上瘾入骨i
    2020-12-15 04:34

    Mat img;

    img=Mat::zeros(size of image,CV_8UC3);

    if you want it to be of an image img1

    img=Mat::zeros(img1.size,CV_8UC3);

提交回复
热议问题