Forum

Author Topic: How to use optimizeCamera  (Read 2186 times)

benton

  • Newbie
  • *
  • Posts: 29
    • View Profile
How to use optimizeCamera
« on: September 14, 2017, 02:37:21 AM »
Hi,

I want to use optimizeCamera but it has thrown the following error;

2017-09-13 16:15:10 Traceback (most recent call last):
2017-09-13 16:15:10   File "E:/python_dev/create_project.py", line 44, in <module>
2017-09-13 16:15:10     chunk.optimizeCameras(fit_b1=True, fit_k1=True, fit_k2=True, fit_k3=True, fit_p1=True, fit_p2=True)
2017-09-13 16:15:10 TypeError: 'fit_p1' is an invalid keyword argument for this function

And this is the line of code that I used in my script;

Code: [Select]
chunk.optimizeCameras(fit_b1=True, fit_k1=True, fit_k2=True, fit_k3=True, fit_p1=True, fit_p2=True)
What have I done wrong?

Ben

Gall

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: How to use optimizeCamera
« Reply #1 on: September 14, 2017, 10:41:44 AM »
It sounds like you are not using the 1.3 branch of Photoscan.
If you are still using the version 1.2.x, the method signature is
Code: [Select]
optimizeCameras(fit_f=True, fit_cxcy=True, fit_b1=True, fit_b2=True, fit_k1k2k3=True, fit_p1p2=True, fit_k4=False, fit_p3=False, fit_p4=False)
You can refer to the documentation for the version 1.2 or, better, upgrade your installation to the latest version.

benton

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: How to use optimizeCamera
« Reply #2 on: September 15, 2017, 03:16:34 AM »
Thank You