Hello, I am begginer with opencv c++ i have old code written in opencv 2 i want to change it .how can i change this cvConvert(Iplimage1, iplimage2); into new opencv c++ api.

asked 2019-11-13 02:28:36 -0500

Gilal Nauman gravatar image

updated 2019-11-13 02:29:42 -0500

kbarni gravatar image

here is the code

IplImage* frame_iamge=NULL;
cvMat* frame_mat=NULL;
cvConvert(frame_img, frame_mat);

how can i change it inot Mat and how to use cvConvert() in new opencv c++ api.

edit retag flag offensive close merge delete

Comments

1

in OpenCV 3 C++ you don't have IpImage, just cv.Mat variables...so you don't have to convert anything. (anyway, you can't really convert a NULL image).

kbarni gravatar imagekbarni ( 2019-11-13 02:31:50 -0500 )edit
1

please DO NOT TRY to convert that opencv1.0 code. it will be far too old to be useful anyway.

instead, use modern tutorials to write a modern program, that does what you want.

berak gravatar imageberak ( 2019-11-13 02:36:48 -0500 )edit
2

Here is link: tutorial

supra56 gravatar imagesupra56 ( 2019-11-13 06:40:01 -0500 )edit