Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

it's a shortcut for 'threshold'

// result: binary Mat , where any pixel in the original > 50 is set to 255 (on),
//  all others to 0 (off)
m = m > 50;   

// same as:
threshold(m,m,50,255,0);

it's a shortcut for 'threshold'

// result: binary Mat , where any pixel in the original > 50 is set to 255 (on),
//  all others to 0 (off)
m = m > 50;   

// same as:
threshold(m,m,50,255,0);

cv::Mat has a lot of 'overloaded' operators, so you can write equations like:

Mat v = a * x + b;