1

In a function like this

void ipl_in_ipl_out(IplImage* src, IplImage* dst) {
    cv::Mat src_mat(src);
    dst = cvCloneImage(&(IplImage) src_mat);
}

when out the function, there is no data in dst. And how to deep copy from cv::Mat to IplImage? I want to use cv::Mat to process, but in and out of a function should be IplImage*.

I've also tried to make src_mat as a Class member, but failed. And tried methods in Converting cv::Mat to IplImage*.

So how to deal with this problem? Thanks!

Community
  • 1
  • 1
Quker
  • 11
  • 2
  • 1
    please avoid using deprecated IplImages in the first place. – berak May 10 '15 at 07:10
  • 1
    @Quker I think my question to you is _why_ to use deep copy from cv::Mat to IplImage. You can most certainly avoid it. – a-Jays May 10 '15 at 18:49
  • 1
    may be this will help http://stackoverflow.com/questions/4664187/converting-cvmat-to-iplimage- As suggested above, unless you are using a legacy library which needs `IplImage` as input paramter, please avoid the same. – kiranpradeep May 11 '15 at 05:07
  • 1
    Thank you all, this is a legacy library. And I must use IplImage* as input and output. – Quker May 13 '15 at 05:06

0 Answers0