Hello,
I know that the discrete image coordsystem has is origin at the mid of the upper-left pixel of an image. As far as i know it does not depend on the precision, also working with subPixel coors, the coord system has its origin at the mid of that pixel (correct me if I'm wrong).
So my question is: If I have a look at the image at Rect_<int>(0, 0, 1, 1), then it contains the upper left pixel because "OpenCV assumes that the top and left boundary of the rectangle are inclusive, while the right and bottom boundaries are not" (https://docs.opencv.org/3.1.0/d2/d44/classcv_1_1Rect__.html). In Contrast, if I have a look at the image with sub pixel precision at Rect_<float>(0, 0, 1, 1), which pixel lay inside the rect then? From what I understand, the rect would have its center between pixel 0 and 1 at (0.5, 0.5), so the rectangle would contain a quarter of each of the four adjacent pixels.
So am I correct in assuming that it is necessary to shift a sub pixel precision rectangle (Rect_<float>) by (-0.5, -0.5) to obtain the identical part of image like with a Rect_<int> ?
Greetings