OpenCV Mat(比较)运算符文档

OpenCV Mat (comparison) operators documentation

您知道在哪里可以找到 cv::Mat 运算符的文档,例如 <<= 等吗?我目前的疑问是想知道 < 运算符是否 returns 或 ~0 值(=255 用于 uint8_t 图像,=65535 用于 uint16_t 图片等等)。正在阅读here, it is implied that the expected behaviour is the one given by the equivalent compare 来电。但是我很难在 OpenCV 文档中找到参考。

我试过 google:

opencv mat operator documentation

正确的搜索词是 Matrix Epressions。

来自 OpenCV 2 Documentation:

Comparison: A cmpop B, A cmpop alpha, alpha cmpop A, where cmpop 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. There is a collection of Matrix Expression here, but with empty documentation! In particular to know what the < operator does, one has to check the documentation of 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;
...