1 | initial version |
locateRoi overwrites your arguments
2 | No.2 Revision |
locateRoi overwrites your argumentsarguments. you should rather use it like:
Size s = new Size();
Point p = new Point();
roiTmp.locateROI(s, p);
3 | No.3 Revision |
locateRoi overwrites your arguments. you should rather use it like:
Size s = new Size();
Point p = new Point();
roiTmp.locateROI(s, p);
// now, s is the size of the enclosing image,
// and p the top-left position of the roi
4 | No.4 Revision |
locateRoi overwrites your arguments. you should rather use it like:
Size s = new Size();
Point p = new Point();
roiTmp.locateROI(s, p);
// now, s is the size of the enclosing image,
// and p the top-left position of the roi
also, please be careful here:
newrectangle = Imgproc.boundingRect(points);
rectangle(roiTmp, newrectangle .tl(), newrectangle .br(), new Scalar(255, 0, 0), 1, 8, 0);
i guess, that points
is a contour, if you took that on the original image (not on the roi)
you have to offset your rectangle by the negative pos of the roi.