Forum

Author Topic: How to get optimized camera position  (Read 5405 times)

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
How to get optimized camera position
« on: September 16, 2022, 03:50:54 PM »
Hello
When we add geo tag image in the metashape and run Align Photos process Camera position is optimized.  If possible How to get the optimized camera position after alignment?

That will be helpful. I would like to compare the geolocation before and after optimization. 

Thanks

ppant

« Last Edit: September 16, 2022, 04:01:26 PM by ppant »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15420
    • View Profile
Re: How to get optimized camera position
« Reply #1 on: October 13, 2022, 08:22:51 PM »
Hello ppant,

You can use the following script to access and save, if necessary, estimated camera locations:
https://github.com/agisoft-llc/metashape-scripts/blob/master/src/save_estimated_reference.py

If you would like to compare the coordinates before and after the optimization, you need to save the estimated coordinates twice, or store the list of the estimated camera coordinates before alignment and then compare them to the values adjusted during the optimization.
Best regards,
Alexey Pasumansky,
Agisoft LLC

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: How to get optimized camera position
« Reply #2 on: October 14, 2022, 10:04:10 PM »
Alexey 
Thanks for this,  this one is beneficial.
I have gone through the script, in the script you are saving these along with others parameters.
Code: [Select]
self.estimated_location = None
self.estimated_rotation = None
self.reference_location = None
self.reference_rotation = None

I have a question. Here you are saving reference location and estimate location.  For example, If I access the stats after these processes in sequential order load the image > match photos (align, optimize) > dense point cloud.

I think I am getting the original camera position (reference location ) and the final camera location. (estimated location). If I want to get after estimated location after alignment I need to call again before optimizing?

Thanks
PPant
[/size]