Forum

Author Topic: alignCameras() not working  (Read 1618 times)

StormingPython

  • Guest
alignCameras() not working
« on: March 07, 2022, 04:07:41 AM »
When I add a new image to an already aligned model that I have, the Camera of the new image in the Reference section has no "projection" nor "error" properties i.e. they're empty. In order to fix this issue, I realign the entire model. To do this, I go to Workflow -> Align photos, I check the "Reset current alignment" box, then I run it. When the process is completed, those sections are no longer empty

I now have to implement this using Python. I know that there is an alignCameras() function with a reset_alignment parameter, but for some reason, when I run it, it does not get updated.

What could possibly be causing this?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14971
    • View Profile
Re: alignCameras() not working
« Reply #1 on: March 07, 2022, 02:47:37 PM »
Hello StormingPython,

If you want to follow the incremental image alignment approach and align newly added photos to the existing camera alignment, you should have kept the key points for initial alignment, then run matchPhotos operation for the newly added cameras and then use alignCameras command.
Best regards,
Alexey Pasumansky,
Agisoft LLC

StormingPython

  • Guest
Re: alignCameras() not working
« Reply #2 on: March 28, 2022, 12:22:05 AM »
Hello StormingPython,

If you want to follow the incremental image alignment approach and align newly added photos to the existing camera alignment, you should have kept the key points for initial alignment, then run matchPhotos operation for the newly added cameras and then use alignCameras command.

When I do it this way, the sections are still empty. For reference, I do the following:

chunk.addPhotos([imagePath])
for c in chunk.cameras:
    if c.label == cameraName:
        addedCam = c
        break

chunk.matchPhotos()
chunk.alignCameras()

Am I missing something?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14971
    • View Profile
Re: alignCameras() not working
« Reply #3 on: March 29, 2022, 08:49:46 PM »
Hello StormingPython,

Do you have key points saved for the initial alignment?

You should use keep_keypoints=True parameter for matchPhotos() task both for initial alignment and when adding to photos to the existing alignment.
Best regards,
Alexey Pasumansky,
Agisoft LLC