I have a problem in my application.
I would like to take a picture then draw a mask on it, knowing tilt and inclination angle. In testing phase, I chose to work on a simple lens checker where I draw a mask with known real coordinates and I'm supposed to find same coordinates with code.
When tilt = 0 and inclinationAnle = 0 (default case) all works fine, the same when
tilt !=0.
The images are taken with same distance between camera lens and the lens checker's center.
This is the reference example:
Now with just applying a rotation and drawing the same mask, we get this:
Applying a simple rotation with -tilt angle get us the same eight points' coordinates as in the default case and it works fine.
The problem is when I change inclination angle like this:
I understood that it's a perspective transformation (or inverse) but I don't want to transform the image itself, I want from eight points' coordinates to retrieve the default case' coordinates. Like in a real case, I don't know the default case' coordinates, just the inclination angle. So a user takes a picture with the mask and i must retrieve mask coordinates as if the picture was taken without inclination or tilt. Here the points are in 2D (X,Y).
I'm sorry if this is duplicated somewhere, but I've looked everywhere, used OpenCV but couldn't get what I need.
Any needed infos will be provided and thanks for any help .