如果我有一个 CV_32SC1
类型的矩阵,我应该在函数 Mat::at
中使用什么类型名称?
例如
Mat X; // for example eye matrix of size 10,10,and type CV_32SC1
X.at<??????>(1,1)=5;
如何找到其他矩阵类型的类型名称?
最佳答案
OpenCV 中矩阵类型名称的一般规则是:
CV_<bit_depth>(S|U|F)C<number_of_channels>
S = Signed integer
U = Unsigned integer
F = Float
因此,根据之前的字母 (S,U,F) 中的哪一个,您将转换 <int>
, <unsigned integer>
或 <float>
.
关于c++ - 访问 opencv 矩阵 CV_32S 元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12785121/