Missing cv::Mat constructor from IplImage* in OpenCV 3.0.0 (git master HEAD)? (Bug #3356)


Added by Jose Luis Blanco over 11 years ago. Updated over 11 years ago.


Status:Cancelled Start date:2013-11-02
Priority:Normal Due date:
Assignee:Roman Donchenko % Done:

0%

Category:core
Target version:3.0 Estimated time:0.50 hour
Affected version:branch 'master' (3.0-dev) Operating System:Any
Difficulty:Easy HW Platform:Any
Pull request:

Description

As described in http://answers.opencv.org/question/23440/any-way-to-convert-iplimage-to-cvmat-in-opencv-300/ , the following code was working for all previous OpenCV 2.*.* versions:

IplImage * ipl;
// ...
cv::Mat m = ipl;

but fails to build with the current git master. Trying with an explicit constructor didn't help.

So: was this intentional, or a mistake?

Thanks.


Associated revisions

Revision 1692801f
Added by Vadim Pisarevsky over 10 years ago

Merge pull request #3356 from jet47:ctest-support

History

Updated by Jose Luis Blanco over 11 years ago

Looking at core/src/matrix.cpp, it seems that indeed that constructor was removed.

But there exists an alternative way:

cv::Mat m = cvarrToMat(ipl, false /*don't copy*/);

so that's not so bad.

Anyway, I'll leave this issue open just in case the removal of the cv::Mat(IplImage*) constructor wasn't intentional.

Updated by Dinar Ahmatnurov over 11 years ago

Roman, please have a look

  • Assignee changed from Vadim Pisarevsky to Roman Donchenko
  • Status changed from New to Open

Updated by Roman Donchenko over 11 years ago

It is, in fact, intentional - the intention being to remove the dependency of the C++ API on the C API.

  • Status changed from Open to Cancelled

Also available in: Atom PDF