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;
2 | No.2 Revision |
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;