Forum

Author Topic: rolling shutter compensation via API  (Read 1609 times)

fran.garcia

  • Newbie
  • *
  • Posts: 7
    • View Profile
rolling shutter compensation via API
« on: March 12, 2023, 09:22:37 PM »
Hi i need to activate rolling shutter compensation in phyton, i know how to check if it´s enabled but not how to Enable. Thanks¡¡¡

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: rolling shutter compensation via API
« Reply #1 on: March 13, 2023, 02:33:14 PM »
Hello Fran,

The following code shows how to enable certain type of rolling shutter compensation via Python for the first sensor (calibration group) in the active chunk:

Code: [Select]
chunk = Metashape.app.document
sensor = chunk.sensors[0]
sensor.rolling_shutter = Metashape.Shutter.Model.Full
sensor.rolling_shutter = Metashape.Shutter.Model.Regularized
sensor.rolling_shutter = Metashape.Shutter.Model.Disabled
Best regards,
Alexey Pasumansky,
Agisoft LLC

fran.garcia

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: rolling shutter compensation via API
« Reply #2 on: March 14, 2023, 10:07:00 PM »
Thanks so much Alex¡¡
And one more thing because i am having a lot of problems with an script,
i like to aling 20 groups of frames but in pairs, i mean, 1-2 after the aligment disable group 1 and enable group 3 and aling, after disable 2 , enable 4 and aling......
The problem is that when i run manually selecting the groups and enableing and disabeling is working but if i run
Code: [Select]
enabled_cameras = []
        for camera in chunk.cameras:
            if camera.enabled:
                enabled_cameras.append(camera)
        chunk.matchPhotos(cameras=enabled_cameras, downscale=1, generic_preselection=True, keypoint_limit=50000, tiepoint_limit=15000)       
        chunk.alignCameras()
the first pair is working but when i disable the 1 and enable the 3 the ouput is
Warning: Can't resume matching without keypoints
Keep key points is enables
version is 1.84 but the same problem in all the versions

What can i do?

Thanks for the help

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: rolling shutter compensation via API
« Reply #3 on: March 15, 2023, 12:22:19 PM »
Hello Fran,

Does it help, if you add keep_keypoints=True argument to matchPhotos task?
Best regards,
Alexey Pasumansky,
Agisoft LLC