本文首发于个人博客https://kezunlin.me/post/61d55ab4/,欢迎阅读! opencv mat for loop Series Part 1: compile opencv on ubuntu 16.04 Part 2: compile opencv with CUDA support on windows 10 Part 3: opencv mat for loop Part 4: speed up opencv image processing with openm
Mat数据结构 一开始OpenCV是基于C语言的,在比较早的教材例如<学习OpenCV>中,讲解的存储图像的数据结构还是IplImage,这样需要手动管理内存.现在存储图像的基本数据结构是Mat. Mat是opencv中保存图像数据的基本容器.其定义如下: class CV_EXPORTS Mat { public: // ... a lot of methods ... ... /*! includes several bit-fields: - the magic signature -