3DEqualizer Point from Intersect Script

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.

UseCase

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.

example

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.

Get it on Bitbucket here. Or on 3DEqualizer website here and here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s