Pergunta

What's the difference between CvImage and IplImage?
I'm trying to integrate OpenCV with ARToolKit, but I'm getting an error here:

    CvImage *image;

The error is:

expected '=',',',';','ask',or '__atrribute__'before *token

Foi útil?

Solução

CvImage is a deprecated wrapper to IplImage, don't use it. Best thing to use is cv::Mat, and if you need to interface with old code, IplImage.

If you really need to use it: I assume you miss the legacy.hpp include. See the "legacy" module in current OpenCV.

Outras dicas

Wrong.

CvImage is used by cv_bridge to provide a Cv::Mat and the extra information of that is available in a sensor_msgs Image.

Take a look at the code in

http://mirror.umd.edu/roswiki/doc/electric/api/cv_bridge/html/c++/cv__bridge_8h_source.html

and the tutorial:

http://www.ros.org/wiki/cv_bridge/Tutorials/UsingCvBridgeToConvertBetweenROSImagesAndOpenCVImages
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top