你知道在哪里可以找到 cv::Mat 运算符的文档吗,比如 <
, <=
ETC?我目前的疑问是知道 <
是否运算符返回一个或 ~0
值(=255
用于 uint8_t 图像,=65535
用于 uint16_t 图像等等)。读书here , 这意味着预期的行为是由等效的 compare 给出的称呼。但我很难在 OpenCV 文档中找到引用。
我试着用谷歌搜索:
opencv mat operator documentation
最佳答案
正确的搜索词是 Matrix Epressions。
来自 OpenCV 2 Documentation :
Comparison:
A cmpop B
,A cmpop alpha
,alpha cmpop A
, wherecmpop
is one of :>
,>=
,==
,!=
,<=
,<
.The result of comparison is an 8-bit single channel mask whose elements are set to 255 (if the particular element or pair of elements satisfy the condition) or 0.
在 OpenCV 3 中,关于矩阵表达式的文档分散在页面 Operations on arrays 中.这里有一个矩阵表达式的集合,但是文档是空的!特别想知道什么<
运算符(operator)确实如此,必须检查 cv::compare
的文档:
When the comparison result is true, the corresponding element of output array is set to 255. The comparison operations can be replaced with the equivalent matrix expressions:
Mat dst1 = src1 >= src2; Mat dst2 = src1 < 8; ...
关于OpenCV Mat(比较)运算 rune 档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30030565/