I'm trying to discover opencv library at the moment, but it seems a bit messy with the data structures. so there's cv::Mat
, cvMat
and IpImage
, and different examples to each.
I understand that there has been a migration for opencv from C to C++, and then major changes done to version 2.4.
So which one of these data structure is recommended, and generally are there any documentation like an opencv programmers guide explaining the recommended data structure and how this code migration happened (I'm not asking about the code api or the tutorials page)
Many thanks
cv::Mat is the c++ version of cvMat , they are identical and if you look through the code you will see that the c++ version just goes to the c code. If you use C++ use cv::Mat . C doesn't have namespaces so you have the kludge of putting cv in front of each function name so it doesn't clash with other library.
We can check the Data Type of a cv::Mat using “type()” method. This is a method you can use for checking the type of an cv::Mat.
The IplImage is taken from the Intel Image Processing Library, in which the format is native. OpenCV only supports a subset of possible IplImage formats, as outlined in the parameter list above. In addition to the above restrictions, OpenCV handles ROIs differently.
The Mat class of OpenCV library is used to store the values of an image. It represents an n-dimensional array and is used to store image data of grayscale or color images, voxel volumes, vector fields, point clouds, tensors, histograms, etc.
cv::Mat
is the c++ version of cvMat
, they are identical and if you look through the code you will see that the c++ version just goes to the c code. If you use C++ use cv::Mat
.
C doesn't have namespaces so you have the kludge of putting cv in front of each function name so it doesn't clash with other library
IpImage
is the old Intel IPP compatible image format. You should never need to use it, but if you are working with some other old library there are function to convert between them.
Start at Welcome to opencv documentation for the new documentation
(OpenCV has been through a few re-orgs and the old websites have all stayed up confusing matters. From now on hopefully everything is under http://opencv.org/)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With