I am manually selecting points on an image and drawing a circle at those points. However, the circles are not drawn at the point I click on the image, but above it. I'm not sure what's going wrong.
int radius = 4;
int thickness = 2;
int lineType = 7;
int shift = 0;
void mouseEventOne(int event, int x, int y, int, void* param){
if(event == EVENT_LBUTTONDOWN) {
Point2f* pt = (Point2f*)param;
pt->x =x;
pt->y =y;
if (imageFlag == 1 && one.size() < NUM_POINTS) {
if (pt->x != 0 && pt->y != 0) {
one.push_back(Point2f(pt->x, pt->y));
circle(imageOne,
Point2f(pt->x, pt->y),
radius,
Scalar(rng.uniform(0, 255), rng.uniform(0, 255), rng.uniform(0, 255)),
thickness,
lineType,
shift);
}
}
}
}