cv::Mat
is the new type introduce in OpenCV2.X while the IplImage*
is the “legacy” image structure.
Although, cv::Mat
does support the usage of IplImage
in the constructor parameters, the default library does not provide function for the other way. You will need to extract the image header information manually. (Do remember that you need to allocate the IplImage structure, which is lack in your example).