c++ - OpenCV 中 Mat 对象的 header 是什么意思?

标签 c++ opencv mat

我是 C++ 编程和 OpenCV 的新手。我正在浏览 this OpenCV 中的 Mat 类教程。它说“每个 Mat 对象都有自己的标题”并多次使用术语标题。我不确定标题在这种情况下是什么意思?

我尝试使用谷歌搜索并找到了 this页面上写着:“Mat 基本上是一个包含两个数据部分的类:矩阵头(包含矩阵的大小用于存储的方法等信息,位于矩阵存储在哪个地址等)…………”

现在我明白了大小是什么意思,但我有两个问题需要澄清:

  1. “用于存储的方法”指的是什么? Mat 类中的哪个成员表示这个?
  2. 地址是不是对应Mat类中的“datastart”成员?

谢谢!

最佳答案

根据 OpenCV documentation :

Mat is basically a class with two data parts: the matrix header (containing information such as the size of the matrix, the method used for storing, at which address is the matrix stored, and so on) and a pointer to the matrix containing the pixel values (taking any dimensionality depending on the method chosen for storing). The matrix header size is constant, however the size of the matrix itself may vary from image to image and usually is larger by orders of magnitude.

关于c++ - OpenCV 中 Mat 对象的 header 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31046805/

相关文章:

c++ - OpenCV 复制图像的一部分

c++ - 如何检测插入/插入Oculus触摸 Controller ?

image-processing - 如何检测图像中的热点

python - 从非常嘈杂的图像Opencv Python中获取矩形形状

python - 具有灰色世界假设的自动白平衡

c++ - 如何通过另一个具有位置的垫子访问opencv中的矩阵数据(索引)

opencv - 我如何在 opencv 中将一个小的 Mat 上传到一个更大的 GpuMat

c++ - 运行我的 C++ 代码给我一个空白的控制台

c++ - clang : error: cannot specify both '-fobjc-arc' and '-fobjc-gc' in Xcode 4. 6.3

c++ - 我在 C++ 中得到错误 Unresolved 重载函数类型