Confusion over sample code in camshiftdemo.cpp

asked 2013-09-15 08:03:11 -0600

AJW gravatar image

This should hopefully be a fairly simple question for someone who understands the relevant code. In the camshiftdemo.cpp file in the samples directory, on line 30 the code is:

selection &= Rect(0, 0, image.cols, image.rows);

and frankly, I have no idea what it's doing. Syntactically, I can see it's a bitwise AND of the cv::Rect called selection, and another cv::Rect, but I'm not sure what this achieves? Thanks in advance.

edit retag flag offensive close merge delete