Forum

Author Topic: Orthomosaic creation advanced cylindrical projection with axis  (Read 3852 times)

noodlez

  • Newbie
  • *
  • Posts: 12
    • View Profile
Orthomosaic creation advanced cylindrical projection with axis
« on: September 11, 2023, 02:27:58 PM »
I came across tasks where i reconstructed a rock wall along a railroad from UAV images.
For this purpose i use metashape to create a vertical orthomosaic facing towards the rocks via a cylindrical projection.
It works okayish when the rock wall can be described as an cylindrical shape. It's stil a pain to set up an ideal solution for the projection cylinder since there is no exact visual feedback, when using the current region option. Setting up markers for the cylindrical projections seems to be a bit more precise. However, since the radius is mostly realy huge, markers would be outside of modeled area and hence couldn't be set in the model view.

Setting up the cylinder through manually adjusting the region is a bit imprecise specially when the radius needs to be huge like in the attached screenshot.
It would be great if it's possible to use an imported shape (circle) that could be easily prepared in GIS, or have a code snippet that uses a shape to modify the region along X, Y axis leaving only the Z axis and height for manually adjustment.

Furthermore for even more flexibility it would be awesome to make use of an polyline feature that resembles for example a railroad and use that to approximate multiple cylinders for cylindrical projections that gets composed to a single orthomosaic with minimal distortions for each part of the polyline. CC is able to do exactly this with a point cloud, however having this feature for orthomosaic creation within metashape would be great.

Any ideas for that or code snippets to get closer are highly appreciated.

Thanks.



« Last Edit: September 14, 2023, 05:17:32 PM by noodlez »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14927
    • View Profile
Re: Orthomosaic creation advanced cylindrical projection with axis
« Reply #1 on: September 14, 2023, 05:12:41 PM »
Hello noodlez,

You can try to use the attached script. The projection surface should be defined by the shape drawn along the mesh for which you would like to generate orthomosaic. Originally the script has been created to generate a kind of orthomosaic for the medieval fortress walls.

Let me know, if it works as expected or if there are any problems using this script or with the results.
Best regards,
Alexey Pasumansky,
Agisoft LLC

noodlez

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Orthomosaic creation advanced cylindrical projection with axis
« Reply #2 on: September 18, 2023, 03:26:37 PM »
Hello Alexey, thank you for providing the script. It seems like it could do the right thing. However, the created model from the script is set off from the region.
It was lying far below the model wich leads to no texture at all. I guess z min and max from model or region might not be properly read out by the script. I tried to check it myself but did not get it to work. Maybe that is something that somebody could look into.

If the region is manually moved to be above the model then the created model from the script could be forced to cover the model region and textures get transfered to the model.
However, there still remains a problem with the texture itself as it is blurry for most of the model, wich i think is way worst than it should be judging from the textured reference model.
Is there any clue why that is or how it could be improved?

Thank You.
« Last Edit: September 19, 2023, 10:43:16 AM by noodlez »

noodlez

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Orthomosaic creation advanced cylindrical projection with axis
« Reply #3 on: September 18, 2023, 03:27:51 PM »
further screenshots to visualize the above post...

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14927
    • View Profile
Re: Orthomosaic creation advanced cylindrical projection with axis
« Reply #4 on: September 27, 2023, 12:16:24 PM »
Hello noodlez,

Can you please send the copy of the project only with the aligned cameras, mesh surface and shape used for the projection plane definition to support@agisoft.com (PSX file + corresponding .files folder), so that we could check, what might be wrong with the script?
Also please provide the PDF report exported from the original project.
Best regards,
Alexey Pasumansky,
Agisoft LLC

noodlez

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Orthomosaic creation advanced cylindrical projection with axis
« Reply #5 on: October 19, 2023, 01:12:37 PM »
@Alexey I've sent the project to the support mail address...

e.spiridonova

  • Agisoft Technical Support
  • Newbie
  • *****
  • Posts: 38
    • View Profile
Re: Orthomosaic creation advanced cylindrical projection with axis
« Reply #6 on: October 25, 2023, 01:44:21 PM »
Dear noodlez,

We modified the script. Now a shape is taken from the layer with the name - base (or Base, or BASE).
Left-to-right shape parameter - it is necessary to remove the checkbox when the shape is drawn from right to left.
Use hard normals parameter - for sharp corners (for example, for buildings), for smooth curves it is necessary to disable (in your case it is better to disable).

Best regards,
Elizaveta Spiridonova,
Agisoft LLC