I’ve been working on a simple script for locating a point based on the intersection of two lines. The use case is where you’re tracking a corner and it goes outside of frame or is obscured by something in the scene.
I was working a markerless shot where many of my points were corners of paving tiles, the scene also had foreground elements which frequently passed in front of these corners. I tried to figure out if the inaccuracy of guessing where they were was acceptable and realized a computer could “guess” them extremely accurately.
It’s broken into two parts, one to automatically create reference points with the required naming system and one to do the calculation.
The procedure is to select the point you want to locate, run the Create points for intersection script, place the created points on lines which intersect your initial point (A1 & A2 on one line, B1 & B2 on the other), select your first point and run Update point from intersection.
If you want to repeat the procedure on additional frames just place the reference points again and repeat the Update point from intersection script.
To counter lens distortion the script will undistort the reference points, run the calculation and then redistort the resulting point so it’s ready for use in 3D calculation (the reference points are set to not calculate by default).
Planned future updates include the option of doing the process over a selected frame range, and maybe eventually a suite of tools for other geometric calculations involving ellipses, parallelograms etc.
Shoutout to Giovanni di Grezia (www.xgiovio.com) whose scripts I read to help learn the 3DE/Python interface.