When to use `image` and when to use `Matrix` in Emgu CV?

喜夏-厌秋 提交于 2019-12-11 04:07:32

问题


in openCV I regularly use cv::Mat for almost everything. Now, I need to use emgu CV and use the Matrix-object in stat, but some functions are not supported?!... may I use the image-class instead?

When to use image and when to use matrix in emgu CV?

P.S.: Currently I'm looking for a way to define a ROI on a matrix but didn't find a way without copying the data.

Version: Emgu.CV-2.4.2


回答1:


I know that in the latest version of OpenCV, the Mat object is prefered to iplImage for a lot of reasons.

In EmguCV, things are different. I think that the rule of thumbs is to use Image<> when the data itself is supposed to be an image and Mat<> when you need to work with a matrix. Work with what you need and the emguCV object should have the right contructor/function for your needs.

For the ROI, the comment by sumeet is very good.

Hope it helps!




回答2:


As of OpenCV 3.0, OpenCV is phasing out IplImage. EmguCV's Image<,> is a wrapper around IplImage, so Image<,> is being phased out of EmguCV.

Use Mat and CvInvoke wherever possible. Avoid Image<,> and its methods.



来源:https://stackoverflow.com/questions/19029424/when-to-use-image-and-when-to-use-matrix-in-emgu-cv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!