Forum

Author Topic: Define individual fixed parameters for calibration  (Read 3837 times)

saduka

  • Newbie
  • *
  • Posts: 33
    • View Profile
Define individual fixed parameters for calibration
« on: April 05, 2019, 01:46:44 PM »
Halo
I tried to import a part of calibration by a dict from laboratory precalibration. But when I double check it with graphic interface, I found all parameters are set. Then I tried remove sensor.fixed=True, no parameters are fixed. Isn't that sensor.fixed_params alone can determine the fixed parameters?

Code: [Select]
for s,sc in zip(doc.chunk.sensors, cali):
            calib=Metashape.Calibration()
            sc=cali[sc]
            intrinsic_p=sc["intrinsic_p"]
            calib.f=intrinsic_p["f"]
            calib.b1=intrinsic_p["b1"]
            calib.b2=intrinsic_p["b2"]
            calib.cx=intrinsic_p["cx"]
            calib.cy=intrinsic_p["cy"]
            distortion_p=sc["distortion_p"]
            calib.k1=distortion_p["k1"]
            calib.k2=distortion_p["k2"]
            calib.k3=distortion_p["k3"]
            calib.p1=distortion_p["p1"]
            calib.p2=distortion_p["p2"]     
            s.user_calib=calib
            s.fixed_params=["f","cx","cy","k1","k2","k3","p1","p2"]
            s.fixed=True
            doc.save()


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15163
    • View Profile
Re: Define individual fixed parameters for calibration
« Reply #1 on: April 07, 2019, 07:03:52 PM »
Hello saduka,

Using sensor.fixed call will fix or unfix all parameters at once.

Proper way of fixing the certain parameters would be:
Code: [Select]
s.fixed_params=["F","Cx","Cy","K1","K2","K3","P1","P2"]Note that values here are case sensitive.
Best regards,
Alexey Pasumansky,
Agisoft LLC

mtbouchard

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Define individual fixed parameters for calibration
« Reply #2 on: January 14, 2022, 05:09:09 AM »
Does this include extrinsics?