Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce interdependency DEM and ortho generation, or document clearly #51

Open
russelldj opened this issue Jun 17, 2024 · 2 comments
Open

Comments

@russelldj
Copy link
Contributor

I noticed that the DEM/DSM and orthomosaic computation are tightly coupled in build_dem_orthomosaic. My understanding is this is because metashape does not allow granular control over which geometry source is used, only whether it is elevation or mesh. So the only way to control this is to have the intended surface be the last one generated.

The way the code is structured now, orthomosaic creation will be silently skipped if you disable the DEM stage, except if it is just the mesh based ortho. I encountered this issue because my process died in the middle of the orthomosaic stage and I wanted to restart just that step.

This is entirely speculative, but I wonder if we could check for the requested elevation data (DSM/DTM) and then try to "activate" it before running the ortho step. This would decouple the process. If something like this is not possible, I would update the documentation to clearly state that the desired elevation source must be computed specifically in that run and cannot be loaded from a previous project.

@youngdjn
Copy link
Collaborator

Great catch, I agree this should be a priority. The Metashape GUI displays the existence of multiple DEMs in a project (not just the last generated) -- so it is clear that multiple can be stored. This indeed will hinge on us finding a way to "activate" the DEM that we want to be used for ortho generation. (The GUI-based ortho generation menu does not have an option for this). Perhaps this could be a good early task for @asidhu0 . I just posted on the Agisoft forum requesting guidance.

@russelldj
Copy link
Contributor Author

Some takeaways from our discussion.

  • When a DEM is created, the active elevation.label should be set to the type of surface that was used to create it
  • When the ortho is created, it will have to run through the requested surfaces. For each requested surface, it must activate the appropriate DEM. If not available, an automate-metashape error should be raised. If present, it should build the ortho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants