Open edgarriba opened 8 years ago
I've never seen a textured model that bad...
caliterra On 1 Dec 2015 21:03, "Dakota Benjamin" notifications@github.com wrote:
Which dataset is that again? pacifica?
— Reply to this email directly or view it on GitHub https://github.com/edgarriba/OpenDroneMap/issues/8#issuecomment-161079682 .
It's funny you brought this up because for the first time today I ran into this same issue:
I was working in a mostly clean build except I am testing some texture blending updates (which didn't even run, so there are probably other factors that could lead to this).
Can you post the odm_texturing log? This is mine:
Bundle path was set to: /vagrant_data/aukerman/texturingtest/pmvs/bundle.rd.out
Images path was set to: /vagrant_data/aukerman/
Images list path was set to: /vagrant_data/aukerman/texturingtest/odm_texturing/image_list.txt
Input model path was set to: /vagrant_data/aukerman/texturingtest-results/odm_mesh-0000.ply
Output folder path was set to: /vagrant_data/aukerman/texturingtest-results/odm_texturing/
The texture resolution was set to: 4096
The resized resolution used in bundler was set to: 1600
The resolution to texture with was set to: 3600
Blending will be performed.
Log file path was set to: /vagrant_data/aukerman/texturingtest/odm_texturing/odm_texturing_log.txt
Path for storage of blended images was not provided. Will use image path: /vagrant_data/aukerman/
Successfully loaded 199849 polygons from file.
Successfully read the bundle file.
Successfully read the image list file.
Unable to run blending due to bad OpenCV version. Required modules are nonfree and stitching.
Visible faces: 195662
Occluded faces: 4187
Faces sorted into 27 textures.
Saved texture_0.jpg to file.
Saved texture_1.jpg to file.
Saved texture_2.jpg to file.
Saved texture_3.jpg to file.
Saved texture_4.jpg to file.
Saved texture_5.jpg to file.
Saved texture_6.jpg to file.
Saved texture_7.jpg to file.
Saved texture_8.jpg to file.
Saved texture_9.jpg to file.
Saved texture_10.jpg to file.
Saved texture_11.jpg to file.
Saved texture_12.jpg to file.
Saved texture_13.jpg to file.
Saved texture_14.jpg to file.
Saved texture_15.jpg to file.
Saved texture_16.jpg to file.
Saved texture_17.jpg to file.
Saved texture_18.jpg to file.
Saved texture_19.jpg to file.
Saved texture_20.jpg to file.
Saved texture_21.jpg to file.
Saved texture_22.jpg to file.
Saved texture_23.jpg to file.
Saved texture_24.jpg to file.
Saved texture_25.jpg to file.
Saved texture_26.jpg to file.
Saved non_visible_faces_texture.jpg to file.
odm_textured_model.obj successfully saved.
This is my log for caliterra
Bundle path was set to: /home/vagrant/datasets/odm_data/caliterra/opensfm/bundle_r000.out
Images list path was set to: /home/vagrant/datasets/odm_data/caliterra/opensfm/image_list.txt
Input model path was set to: /home/vagrant/datasets/odm_data/caliterra/odm_meshing /odm_mesh.ply
Output folder path was set to: /home/vagrant/datasets/odm_data/caliterra/odm_texturing/
The texture resolution was set to: 4096
The resized resolution used in bundler was set to: 2400
The resolution to texture with was set to: 3600
Log file path was set to: /home/vagrant/datasets/odm_data/caliterra/odm_texturing/odm_texturing_log.txt
Successfully loaded 199908 polygons from file.
Successfully read the bundle file.
Successfully read the image list file.
Visible faces: 173058
Occluded faces: 26850
Faces sorted into 9 textures.
Saved texture_0.jpg to file.
Saved texture_1.jpg to file.
Saved texture_2.jpg to file.
Saved texture_3.jpg to file.
Saved texture_4.jpg to file.
Saved texture_5.jpg to file.
Saved texture_6.jpg to file.
Saved texture_7.jpg to file.
Saved texture_8.jpg to file.
Saved non_visible_faces_texture.jpg to file.
odm_textured_model.obj successfully saved.
As I see in your case you didn't build opencv with stitching and nonfree
That's related to the blending addition I'm working on- I need to build opencv 2.4.11 into odm.
I would say that this problem comes from calibration stuff. Not sure yet
@dakotabenjamin finally made it working, but with some bad stitching patches. I attach you the a screenshot.
The patches are due to a lack of blending in the texturing code, which I am working on implementing right now.
need help?
Probably. I am waiting on some info from the folks we contracted to do the bulk of the work on blending.
What did you do to get the stitching to work?
Yeah, that would be great. I've pushed the changes to the odm_texturing
branch on the main repo.
is it working the blending in this branch?
No not yet. It was hastily put together and I'm running into memory issues.
Checkout the working addition here.
Blending is disabled by default, so you'll have to use --odm_texturing-performBlending
to enable it.
cool! we have to think how to integrate everything with the new cmake branch
Here's a copy of the updated files before I added them to the git repo: https://www.dropbox.com/s/zqvbgu50vxej9hv/delivery_151214.zip?dl=0
So we won't have to sort through the commit history to add the update. Once I can get a working version going, I will work hard on testing and updating this branch.
I'll test this code! Do you have any result to compare?
Working on that now. So far I'm getting weird results but I can't find what to attribute it to.
Current:
new:
I see, not good results at all. I will revise the code to see if there's any improvement to do. The ideal thing to do here is find a paper with a proper method that solves this problem.
Note that the texturing code was built to be added to commit bafcb76. It works differently, but I can't pinpoint why.
@paulinus any idea on how to improve that?
I'm assuming that sfm, stereo, and meshing did work and that the problem is blending.
I just had a look at the blending function. It seems to be using the stitching pipeline of OpenCV. That is supposed to work for panoramas only. It uses a rotation only model to register the images, which should not work if the camera moves. Not sure how it would work for drone imagery. Is the method explained somewhere @dakotabenjamin ?
You are totally right, don't think OpenCV here is the solution. Maybe we can start to think in use OpenMVS here. https://github.com/cdcseacave/openMVS
@edgarriba for now I think I would hold on incorporating this blending feature into the code. @smathermather and I need to meet with the Spotscale folks to understand the methods better
@paulinus thanks for the info. This is news to me. I will try to get more information soon.
@edgarriba We discussed OpenMVS, but have reservations about the licensing.
OpenMVS has an AGPL which works similar to GPL (PMVS)
The way I interpret AGPL (corrections welcome) is that as long as we firewall the OpenMVS compiled binary portions of the toolchain and continue to control with a python script (no binary compilation), any changes / improvements to a hosted version of OpenMVS/ODM would require the sharing of the OpenMVS changes, but not the rest of the toolchain. If this is true, than this is acceptable.
As I understand if ODM is completely dependent of an AGPL lib, then it must be released with a AGPL licence. Additionally, the source code of OpenMVS must be provided. Then you are right, if we do a modification in OpenMVS we must provide the source code of that modified version.
Check this link: http://programmers.stackexchange.com/questions/142012/using-an-agpl-3-0-licensed-library-for-extra-functionality-in-an-ios-app
Besides, I haven't tried OpenMVS yet. Probably the bottleneck will be export OpenSfM data to OpenMVS format. Maybe @paulinus could help with that?
@dakotabenjamin got the following mesh from odm_texturing. Have you ever seen similar output?