2

I am trying to convert this c api to c++

IplImage* hbm0 = cvCreateImage(cvSize(hbmp->width,hbmp->height),hbmp->depth, hbmp->nChannels );

I tried doing like this,

cv::Mat hbm0 = cv::Mat(hbmp.cols,hbmp.rows,hbmp.depth(), hbmp.channels() )

since mat constuctor doesnot seem to have parameters for depth and channels

Mat (int rows, int cols, int type, void *data, size_t step=AUTO_STEP)

what could be the best way to convert,as i am not directly using channels they are in a Mat object itself. Thanks

0 Answers0