OpenDroneMap / ODM

A command line toolkit to generate maps, point clouds, 3D models and DEMs from drone, balloon or kite images. 📷
https://opendronemap.org
GNU Affero General Public License v3.0
4.72k stars 1.08k forks source link

"Walls" around generated models #373

Closed triceam closed 7 years ago

triceam commented 7 years ago

When I generate models, they're turning out pretty well, but they have large "walls" around the detailed area. Kind of like it generated a skybox, but it's part of the model & has no texture (just white).

From a conversation with @smathermather on gitter:

For now, manually remove. If they get in the way of ortho generation, you should be able to manually remove and then re-run orthos. This has to do with the mesh model trying to achieve water tightness.

Sample output:

image

image

dakotabenjamin commented 7 years ago

Gitter transcript:


Andrew Trice @triceam Sep 13 22:14 When I generate models, they're turning out pretty well, but they have large "walls" around the detailed area. Kind of like it generated a skybox, but it's part of the model & has no texture (just white). Are there tips to minimize this? Or should I manually remove them in a 3D program? blob For example: ^^

Stephen Mather @smathermather Sep 13 22:24 For now, manually remove. If they get in the way of ortho generation, you should be able to manually remove and then re-run orthos. This has to do with the mesh model trying to achieve water tightness. We have a lot of work to do on the meshing side of the house, once we get dense point clouds done (which should be soon).

Andrew Trice @triceam Sep 13 22:24 ok, thanks yeah, they do get in the way of orthos, so will have to re-run that ex: This message was deleted blob (sorry, much lower resolution this time)

Stephen Mather @smathermather Sep 13 22:28 :grinning: Yup. That's what I expected. Can you submit a bug report with those images on github? We'll add it to feature enhancements. I'll be interested to know how much help deleting the extra mesh and re-running will help.

Andrew Trice @triceam Sep 13 22:29 Sure, will have to try it tomorrow you think any kind of "hack" like making a texture transparent might help? submitted issue here: OpenDroneMap/OpenDroneMap#373

Stephen Mather @smathermather Sep 13 22:37 Thanks for the issue! Interesting question regarding transparency. Maybe! It's certainly worth a try in the mean time. If you need help finding the default texture, I can point you to that.

Andrew Trice @triceam Sep 13 22:37 that would be great i was just trying to find it i see "non_visible_faces_texture.jpg" in the generated output, but changing that didn't seem to help manually changing the .mtl to a transparent png results in this: blob

Stephen Mather @smathermather Sep 13 22:45 Nice. You got to it before I did. Manual editing it is then for now.

Andrew Trice @triceam Sep 13 22:46 ok, thx

Andrew Trice @triceam Sep 13 23:04 There we go... :grinning: blob deleted mesh 4 from the generated _geo.obj file just by opening it in a text editor and removing the offending mesh not perfect, but works for this

theincorrect @theincorrect 04:29 @smathermather We used an approach of removing isolated parts of the mesh and deleting every face that painted with the "non_visible_faces_texture.jpg". It solves the problem. The idea was to look for parts in a mesh (by splitting an array of vertex on several sub-arrays of connected verts), picking the largest one (which is the generated model itself) and discarding every other part (which were the artifacts). After that we removed faces with non-visible texture. It allowed to automate the process.

Andrew Trice @triceam 08:22 @theincorrect that's what I was planning to do also. Write a script to just remove all meshes using the non_visible_faces_texture texture. Good to hear that I'm not the first to try it.

Dakota Benjamin @dakotabenjamin 08:40 Do you get many holes in the mesh?

Andrew Trice @triceam 08:40 yes (see my screenshot above) not a prob for my use case right now, but i can see it as an issue in some cases

Dakota Benjamin @dakotabenjamin 08:42 I know other software (and meshlab) has a close holes function. Perhaps it could be applied as an option Also, can you give some background into the dataset you are working on? I'd like to know what is causing the "wall". How did you capture the photos? Did you do any pre-processing?

Andrew Trice @triceam 08:45 basically a collection of images captured by a dji phantom in POI orbit mode. no preprocessing captured from 2 different rotations, at different altitudes

Dakota Benjamin @dakotabenjamin 08:46 Are these nadir-facing photos?

Andrew Trice @triceam 08:55 the majority of them are. i think there were a few in the dataset that were close ups of specific areas, which probably were not. should i get rid of those for model generation?

Dakota Benjamin @dakotabenjamin 08:57 So I've had similar walling issues when I've tried to process imagery from kites. When there's any sky in the photo, the perspective can throw the SfM off

Andrew Trice @triceam 08:58 makes sense. there was definitely sky in the lower altitude photos

Dakota Benjamin @dakotabenjamin 09:00 I know the folks at mapillary (who make OpenSfM) have been working on semantic segmentation, which as I understand it is able to discriminate better between objects like sky and cars and things that move, so that those objects are not processed For now, it's best to avoid, or to remove the mesh in post

Andrew Trice @triceam 09:33 ok, thanks. i'll go that route. after model is generated, remove unwanted mesh, then generate ortho