I have a rectangle which surrounds some points.. i now want to find the center of the rectangle ( and also the four corners but i havent included that here). I am trying the locateROI function but it works but seems to only add the circle at the top of the image rather than in the ROI....can anyone see where im going wrong??
newrectangle = Imgproc.boundingRect(points);
rectangle(mouthMat, newrectangle .tl(), newrectangle .br(), new Scalar(255, 0, 0), 1, 8, 0);
center = new Point(newrectangle .x * 0.5, newrectangle .y * 0.5 );
roiTmp.locateROI(image.size(), new Point(newrectangle .x, newrectangle .y));
circle(image, center, 1, new Scalar(255, 0, 0));