OpenCV Mat array access, which way is the fastest for and why?

后端 未结 4 671
慢半拍i
慢半拍i 2021-01-13 05:39

I am wondering about the way of accessing data in Mat in OpenCV. As you know, we can access to get data in many ways. I want to store image (Width x Height x 1-depth) in Mat

4条回答
  •  心在旅途
    2021-01-13 06:29

    You can find information here in the documentation: the basic image container and how to scan images.

    I advice you to practice with at (here) if you are not experienced with OpenCV or with C language types hell. But the fastest way is ptr as Nolwenn answer because you avoid the type checking.

提交回复
热议问题