I've been considering how to use Blender to extract depth information from a pair of images of the same subject (Whitby Abbey) but would appreciate some help in getting started. I've found a couple of previous questions that didn't seem to have a suitable answer (eg, Generate Z-Depth map from Stereo Image-Pair (just like nuke occula)).
My thinking is to use the pattern matching of the Motion Tracker to match up points from one image to the other and measure the parallax and calculate the depth to eventually generate a mesh.
I'm thinking what I need to know is can the motion tracker be used to match sections from one image to another and how could I go about this? What I want to do is to use Python to pick a point on one image and create a marker with specific dimensions and search area and get it to match it up to a point on the second image and return the coordinates of each.
Has anyone done anything similar? Any ideas, hints, tips, good starting points?
EDIT : The goal is to be able to sample hundreds (perhaps thousands) of points and to use the resultant measurements to build a mesh which could then have the original images projected onto it to produce a 3d representation of the original scene.
EDIT2 : What I really want to know is the following :
1) How can I use Python to create a Motion Tracking Marker - including setting its parameters such as size, search area, etc. 2) How can I use Python to position the marker on a specific frame 3) How can I use Python to trigger the marker to search for a matching pattern in the subsequent frame. 4) How do I get back the resultant offset between its location in one frame and the next.
I do have some limited experience of running Python within Blender and using bpy - and the maths involved (I'll be ignoring any complications such as camera distortion) - I'm just a bit lost in how to get started with interacting with the motion tracker.
Obviously, once I've got this part working I'll then need to start looking at how to use that information to programmatically create a mesh and potentially look to create an add-on - but that's another question.