Ask Your Question
0

OpenCV 3.0.0 support for IPLimage format?

asked 2015-01-09 01:26:57 -0600

Eva Li gravatar image

updated 2020-10-24 03:28:19 -0600

I change my OpenCV version from 2.4.4 to 3.0.0.

then,I can't proclaim Iplimage format.

What should I do ?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
2

answered 2015-01-09 01:52:09 -0600

berak gravatar image

opencv moved to a c++ api using cv::Mat instead in 2010 already, and you should do so, too.

if you must use the outdated c-api in opencv3.0, you will have to include different headers:

#include <opencv2/core.hpp> // c++
#include <opencv2/core/core_c.h> // c

#include <opencv2/imgproc.hpp> // c++
#include <opencv2/imgproc/imgproc_c.h> // c

... and so on..

again, seriously consider re-writing your code in c++ !

edit flag offensive delete link more

Comments

Thanks for your advice. I'd included these headers into my code but still can't use IplImage. Any other methods? Trying not to re-write the code as I've only limited time to complete my task.

Eva Li gravatar imageEva Li ( 2015-01-09 02:10:00 -0600 )edit

so, what's your error ? (and sorry, should have asked that before..)

berak gravatar imageberak ( 2015-01-09 02:29:26 -0600 )edit
1

I'd misunderstood your comment. I just included C++ header instead of C header just now. Now it works. Thanks for your help =)

Eva Li gravatar imageEva Li ( 2015-01-09 02:48:27 -0600 )edit

Actually once you include the C++ headers, then the C headers are still automatically included afaik. However they will get removed from those C++ headers once all compatibility issues are resolved. As @berak said, staying in an old and depricated API will only yield more and more problems... before you know you will have done weeks of work and decide to move altogether so better translate it now.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-09 03:02:49 -0600 )edit
2

^^ no, that was the case in 2.4, but no more not in 3.0.

berak gravatar imageberak ( 2015-01-09 07:51:30 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-01-09 01:26:57 -0600

Seen: 1,581 times

Last updated: Jan 09 '15