Ask Your Question

Franrupa's profile - activity

2019-10-23 04:38:07 -0600 received badge  Notable Question (source)
2018-03-22 10:00:47 -0600 received badge  Popular Question (source)
2013-05-11 03:09:11 -0600 asked a question Problem with c++ and cv::resize

Hi! Forgive the question. I am new to c + + and using opencv. I have a problem. I have the following code, and I think it should work.

  using cv;
....

      int CImageProcessor::DoProcess(IplImage** image) {
            CvMat c1;
            CvMat & imag4=c1;
            if(!image || !*image) return(EINVALID_PARAMETER);
            img=*image;
            dst_mat = cvGetMat(img, &stub, 0, 0);
            resize(dst_mat,imag4,0,0.75,0.75,INTER_LINEAR); 
            return(SUCCESS);
        }

But it shows me the following error.

image_processing.cpp: In member function ‘int CImageProcessor::DoProcess(IplImage**)’:
image_processing.cpp:30: error: invalid initialization of reference of type ‘cv::Mat&’ from expression of type ‘CvMat’
../opencv-2.x.x/include/opencv/cv.hpp:320: error: in passing argument 2 of ‘void cv::resize(const cv::Mat&, cv::Mat&, cv::Size, double, double, int)’

What is my problem? I'm sorry, I think it will be a silly, but I've been days trying to make it work, and I get nothing. thanks