Forum

Author Topic: Alignment results different from API vs. GUI  (Read 949 times)

michael.baltazar

  • Newbie
  • *
  • Posts: 2
    • View Profile
Alignment results different from API vs. GUI
« on: May 01, 2024, 10:03:31 PM »
Hi - a message from one of our developers:
 
I am trying to use the python API to do the following steps:

  • Unlock transforms:
Code: [Select]
for point_cloud in chunk.point_clouds:
    point_cloud.crs = None
  • Reset chunk transforms:
Code: [Select]
chunk.crs = None
chunk.transform.matrix = None
  • Reset alignment:
Code: [Select]
for camera in chunk_.cameras:
    camera.transform = None
  • Align laser scans:
Code: [Select]
chunk_.matchPhotos(
    downscale=1,
    keypoint_limit=10000000,
    tiepoint_limit=0,
    generic_preselection=True,
    reference_preselection=False
)
chunk_.alignCameras(
    min_image=2,
    adaptive_fitting=False,
    reset_alignment=True
)

    But the results are very different if I run the process via code or if I use the GUI.
    Specially during the "reset alignment" step, with the GUI my cameras and points are going to disappear from the Model View and the group will then say (Laser Scans (0/6 aligned)), which is what we want.

    (image 1)

    By code, I'll just see a "NA" next to the point cloud's photo (not the point cloud).

    (image 2)

    I have been looking for a while a way to reproduce the "reset alignment" step using python but I have been unsuccessful so far. Any help would be much appreciated. Thanks!