Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Your last 2 checks look rather strange. Just do

if (roi_.width + 10 < img.cols) 
    roi_.width += 10;

if (roi_.height + 10 < img.rows) 
    roi_.height += 10;
click to hide/show revision 2
No.2 Revision

updated 2014-02-17 16:48:27 -0600

berak gravatar image

Your last 2 checks look rather strange. Just do

if (roi_.width (roi_.x + roi_.width + 10 < img.cols) 
    roi_.width += 10;

if (roi_.height (roi_.y + roi_.height + 10 < img.rows) 
    roi_.height += 10;