My task is cephalometric landmark detection,I have images path with coordinates show in this data frame.
| filename | X1 | Y1 |
|---|---|---|
| /Images_data/binary0006.png | 89 | 80 |
| /Images_data/binary0008.png | 37 | 70 |
I'm working on a data augmentation and I try to rotate image and coordinate together.
Example of the data.
Image and Coordinate X1 Y1 (red point:

I try to rotate coordinate and image from this code below.
ox, oy = (x,y) # Coordinate point
px, py = 112,112 # Center point
angle = 45
qx = int(ox + math.cos(angle) * (px - ox) - math.sin(angle) * (py - oy))
qy = int(oy + math.sin(angle) * (px - ox) + math.cos(angle) * (py - oy))
rotated_image1 = Original_Image.rotate(45,center=(112,112))
plt.imshow(rotated_image1)
plt.scatter((qx),(qy), color='red', marker='o',s=30)
But images and coordinates don't have the same rotating axis. That means the output coordinate isn't true.

How can I solve this?