Iplimage versus Mat

Source: Internet
Author: User

We may often face such confusion, Iplimage and mat, which data structures we should use.
Iplimage was in the OpenCV library from the beginning, and he came from Intel's other library, the Intel Image Processing Library (IPL), which is a very important data structure. In the classic book of the sample used basically is iplimage this data structure. But this is a C-style data structure, and you have to allocate and free memory for him.
Mat is a new data structure, and more and more people are using it because it is object-oriented. So we don't need to manage the memory for it ourselves. It is referenced by counting, and if it has a reference count of 0, it will automatically free up memory.
Honestly, I don't know what data structure to use. Because I think there are some methods, mat data structure is not available, and some methods can only use Iplimage.

Convert Iplimage to Mat
IplImage* ipl;Mat m = cvarrToMat(ipl);

Iplimage versus Mat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.