1 | initial version |
When cropping image you should provide only one Rect. You are trying to provide vector of Rect. This won't compile (even if you know for sure that there only single Rect in your vector). You should use something like this:
Mat imgroi;
if (rects.size() == 1)
imgroi = image(rects[0]);