问题
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