Forum

Author Topic: Multi view stereo with known cameras aligment.  (Read 803 times)

Vadim3D

  • Newbie
  • *
  • Posts: 11
    • View Profile
Multi view stereo with known cameras aligment.
« on: February 07, 2019, 11:22:07 AM »
Hi,
I am wondering if I can use Agisof for only Multi-view-stereo?
What I mean is to bypass the cameras alignment step.

Suppose I have a synthetic data that contains synthetic images and the true locations and orientation of the simulated cameras. Now I need to reconstruct the synthetic scene.
Right now, I use the import reference option to load the true location and orientation of the cameras, but Agisoft changes the true location and direction of the cameras, It means that it does the camera alignment and then reconstructs the scene.
It is just an initial guess for the alignment.

As I siad, I know the exact locations and rotations of my cameras. How to import this information such that Agisoft jump over the cameras alignment step and will perform only the multi-view stereo steps?

I know that there is an option to import cameras.xml file that describes cameras geometry. In this case, I need to prepare a synthetic cameras.xml file. I don't know how to do that since the cameras.xml file has a complex form.

Do you have experience with this? or any suggestions?


Many thanks,
Vadim

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 11089
    • View Profile
Re: Multi view stereo with known cameras aligment.
« Reply #1 on: February 07, 2019, 08:10:00 PM »
Hello Vadim,

There's importCameras() function that allows to load the EO/IO data for the images, thus allowing to skip alignCameras stage, however, it is still required to match images, if you are interested in generating depth maps, dense cloud, mesh after importing the cameras.
So workflow in this case  would be:
addPhotos
matchPhotos
importCameras
buildPoints

The latter two substitutes alignCameras operation assumed by common workflow.

Instead of using Import Cameras operation, for example, if you have some custom date format, you can "manually" using Python form the 4x4 transformation matrix for each camera according to it's location and orientation and load the calibration information to the corresponding sensor instances. Then match photos and build points.

Import Reference does not substitute alignment / import cameras, it just loads the reference information for cameras and markers to be used for the model referencing. However, you can use this data to form mentioned transformation matrices.
Best regards,
Alexey Pasumansky,
AgiSoft LLC

Vadim3D

  • Newbie
  • *
  • Posts: 11
    • View Profile
Q2
« Reply #2 on: February 07, 2019, 10:42:55 PM »
Hi Alexey,
Thank you very much for your response.

Can you please explain to me what is the role of matchPhotos operation when it's after the addPhotos and before the importCameras?

Regarding the alternative  of using Import Cameras operation:
Do you have a code example/sample of "manually using Python form the 4x4 transformation matrix for each camera according to it's location and orientation"?
That what I thought to do, but I don't know how to write it in python using Agisoft framework.

Many thanks,
Vadin

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 11089
    • View Profile
Re: Multi view stereo with known cameras aligment.
« Reply #3 on: February 08, 2019, 01:16:00 PM »
Hello Vadim,

Match Photos operation detects the feature points and find the corresponding points between the photos (tie points). This operation doesn't require to have known EO/IO for cameras. In general workflow it is the first part of Align Photos operation started from GUI.

I think you can use the following script as a reference that is used to position the cameras according to the source values for the coordinates and orientation angles in the Reference pane:
https://github.com/agisoft-llc/metashape-scripts/blob/master/src/quick_layout.py
Best regards,
Alexey Pasumansky,
AgiSoft LLC

Vadim3D

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Multi view stereo with known cameras aligment.
« Reply #4 on: February 10, 2019, 10:36:10 PM »
Hi Alexey,
Thank you very much for your response.
I am trying to use it.

xabierr

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Re: Multi view stereo with known cameras aligment.
« Reply #5 on: December 18, 2019, 02:09:40 AM »
Hi there,

I have used the quick layout script to align images with known location and orientation. Given that my site has minimum texture (open water), Im wondering what would be the best approach to match the photos and build points? Is there a way to "force" this in order to mosaic the images?

cheers,

Javier 

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 11089
    • View Profile
Re: Multi view stereo with known cameras aligment.
« Reply #6 on: December 18, 2019, 05:12:56 PM »
Hello Javier,

If you have all the cameras oriented according to the Reference information, then you should only extend the bounding box size to the area of interest, generate the surface (DEM or mesh) using Extrapolated option and then start orthomosaic generation operation as usual.
Best regards,
Alexey Pasumansky,
AgiSoft LLC

xabierr

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Re: Multi view stereo with known cameras aligment.
« Reply #7 on: December 19, 2019, 12:33:36 AM »
Thanks Alexey. Getting empty DEM/mesh due to only a handful of tie points. Any way I can "force" tie points using the camera location/orientation?

cheers,

Javier
   
« Last Edit: January 14, 2020, 10:13:14 PM by xabierr »

xabierr

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Re: Multi view stereo with known cameras aligment.
« Reply #8 on: January 14, 2020, 10:14:49 PM »
Anyone has been able to align texture-less images (water) based only on high-precision location/orientation?