如何阅读 OpenCV 文档代码或方程式

How to read OpenCV documentation codes or equations

我在阅读 OpenCV 文档时需要帮助: 你能告诉我如何阅读下面给出的这些类型的代码吗?意思是这些 \ 是什么意思? 我如何将其转换为可读形式,如

g(i,j)=alpha.f(i,j)+beta

或类似的东西

\[g(x) = \alpha f(x) + \beta\] 

一些我无法阅读或理解的示例:

\[g(i,j) = \alpha \cdot f(i,j) + \beta\] 
\((i_0,...,i_{M.dims-1})\), where \(0\leq i_k<M.size[k]\), is computed as:

\[addr(M_{i_0,...,i_{M.dims-1}}) = M.data + M.step[0]*i_0 + M.step[1]*i_1 + ... + M.step[M.dims-1]*i_{M.dims-1}\] 

这只是 latex 显示数学方程式的标记。例如,参见 here

What do they mean?


带常数的乘法和加法

\[g(x) = \alpha f(x) + \beta\] 
\[g(i,j) = \alpha \cdot f(i,j) + \beta\] 

通常用于 changing the contrast and brightness of an image:


内存中的数据布局

\((i_0,...,i_{M.dims-1})\), where \(0\leq i_k<M.size[k]\), is computed as:
\[addr(M_{i_0,...,i_{M.dims-1}}) = M.data + M.step[0]*i_0 + M.step[1]*i_1 + ... + M.step[M.dims-1]*i_{M.dims-1}\]

这是数据在 Mat:

中的存储方式

数组 is defined by the array M.step[], so that the address of element , where 的数据布局计算如下:

如果是二维数组,上面的公式简化为: