Forum

Author Topic: How to use Quick_layout.py?  (Read 5406 times)

captcook42

  • Newbie
  • *
  • Posts: 10
    • View Profile
How to use Quick_layout.py?
« on: August 21, 2023, 06:34:25 PM »
Hi all,

I am relatively new to Python coding, but I am attempting to use 'quick_layout.py' to align photos I have over water that will not align otherwise. As such, I  am a bit unfamiliar with how to properly use this script. When I attempt to run the script [I downloaded the proper script version which should work with my current Agisoft version 1.8], I get repeated 'failures' in the processing window but I do not get any read outs of what errors the script encountered. I am therefore uncertain of what errors it is running into, and I am unsure if I have done proper pre-processing prior to attempting to run the script. Any help on how to perform this processing would be very much appreciated.

A bit more detail about the nature of my images: I have a mapping mission of Mavic Pro images, which have associated GPS and yaw/pitch information, over a river mouth extending out into a lake. Due to the relatively featureless nature of the water (as has been discussed in several other forum posts), I cannot get alignment of photos over deeper (and darker/featureless) water. As such I would really be interested in trying out 'quick_layout.py'. If someone could please help me perform this task I would very much appreciate it. I provided a couple screen grabs as attachments - one showing the failure in the processing window, another showing the extent of unaligned images along with the image information as shown in the Reference pane.

Thank you,
Chris Cook
« Last Edit: August 21, 2023, 06:37:12 PM by captcook42 »

captcook42

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: How to use Quick_layout.py?
« Reply #1 on: August 21, 2023, 06:36:10 PM »
Second screengrab attached (would not fit on first post)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15321
    • View Profile
Re: How to use Quick_layout.py?
« Reply #2 on: August 22, 2023, 02:46:39 PM »
Hello Chris,

Can you please try to run the script in local mode (without sending to the network processing server) and provide the output from the Console?

If you are using Metashape Pro 1.8, then you need to access the older script version from 1.8 thread:
https://github.com/agisoft-llc/metashape-scripts/blob/1.8/src/quick_layout.py
Best regards,
Alexey Pasumansky,
Agisoft LLC

captcook42

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: How to use Quick_layout.py?
« Reply #3 on: August 22, 2023, 04:38:12 PM »
Hi Alexey,

Thanks for your response. After running in local mode (w/o network processing) and going to 'Custom Menu' and 'Apply Vertical Camera alignment', the script appears to have worked (screengrab attached).

Am I correct to assume that the photos that were originally aligned (~145/344) are not re-aligned during this process?

Since I am interested in building an orthomosaic, are my next steps the more conventional ones (build dense cloud -> build mesh -> build DEM -> build orthomosaic) or do I need to do anything special?

Thanks,
Chris

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15321
    • View Profile
Re: How to use Quick_layout.py?
« Reply #4 on: August 22, 2023, 05:29:33 PM »
Hello Chris,

According to the latest screenshot all previously not aligned cameras have been positioned according to the source reference values.

Before building DEM, make sure that the bounding box includes all the required area, also you may want to enable Extrapolated option when building DEM to avoid any holes in the elevation model.
Best regards,
Alexey Pasumansky,
Agisoft LLC

captcook42

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: How to use Quick_layout.py?
« Reply #5 on: August 22, 2023, 09:12:33 PM »
Hi Alexey,

I attempted to Build DEM, allowing 'Extrapolated' interpolation and making sure that the boundaries in the 'Region' settings extended beyond the full flight area. Unfortunately the resultant DEM appears mostly limited to the region with the original successful alignment (shallow areas - see screengrab attached to this reply). The DEM and ortho does extend a bit further into the lake relative to the first attempt (prior to running the script), but the output DEM and Orthomosaic don't appear to cover the full extent of the flight area.

Do you think I am doing everything correctly? Do you have any thoughts as to if I might be able to extend the DEM and ortho further into the lake?

Thank you,
Chris

captcook42

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: How to use Quick_layout.py?
« Reply #6 on: August 23, 2023, 11:14:30 PM »
Hi Alexey,

I apologize for my misunderstanding. I realize now that I had to change the bounding box as this was limiting the extent of the Build DEM and Build Orthomosaic processes. After expanding the size of the bounding box (using the interactive tools in the toolbar) I was able to get a DEM and Orthomosaic that covered the entirety of the surveyed area. For not having a fine alignment on these photos I think that the results (attached) are surprisingly good.

Thanks again for your help,
Chris