Hello,
As part of a project using multiple camera rig of non-overlapping cameras, I'm trying to understand how the "source reference preselection" for the image matching works.
The motivation behind my effort is to find a way how not to match images, which are looking in the opposite directions.
For that I have done a simple experiment, which uses 4 geo-referenced frames, last of which, the frame3.jpg has reference yaw set to -90deg, while the other frames were set to 90deg.
The experiment was done as follows;
- Metashape project was created and images imported
- Attached script was run, which imports reference from csv and runs the image matching
As far as I understand, the script runs according to the manual.
The expected result is, that the frame3 will not be matched with frame0, frame1 and frame2. However as observed in the "Matches window" (screenshot attached), the frame3 is being matched with the other frames.
How can I achieve such results, or what am I missing? I'm attaching the script, as well as couple of screenshots, to illustrate the problem.
Thank you for any help,
Tomas
# import reference
chunk.importReference(ref_p, delimiter=",", columns="nxyzabc")
for cam in chunk.cameras:
cam.reference.rotation_enabled = True
print(f"{str(cam)} ref: {cam.reference.rotation}")
# capture distance (reference settings)
chunk.meta['subject_distance'] = '20'
# matching
task = ms.Tasks.MatchPhotos()
task.downscale = 1
task.generic_preselection = False
task.reference_preselection = True
task.reference_preselection_mode = ms.ReferencePreselectionMode.ReferencePreselectionSource
task.apply(chunk)
ms.app.document.save(path=prj_p)