Unsure if this is the right network to post this, but maybe someone can help...
I'm working on a personal project where, with the help of AI, I want to automatically estimate the perspective of a given image.
I've been able to programatically estimate and draw the position of the horizon, as seen below. This is based on how "quickly" cars farther away shrink in the image.
Not sure the above is useful, but now I want to draw a grid on the plane. Something like:
This is where it's getting too complicated for me. I have no idea how to solve this. Not the drawing per se, but the mathematics behind it. Any ideas?