cdcseacave / openMVS

open Multi-View Stereo reconstruction library
http://cdcseacave.github.io
GNU Affero General Public License v3.0
3.37k stars 911 forks source link

Hole filling in TextureMesh #143

Open saedrna opened 7 years ago

saedrna commented 7 years ago

I have played with both TextureMesh and the original algorithm mvs-texturing and found out that OpenMVS handles the outliers better.

But I think the hole filling part for invisible triangles, which is added after the paper, is still a good idea to be considered. I have looked into the code, and found that the it searched for neighbor triangles of the invisible ones, and then did something similar to image inpainting and generate a new texture patch for the invisible triangles.

Is this feature able to be considered in OpenMVS?

Thanks,

Han

cdcseacave commented 7 years ago

Thanks for your suggestion and constructive contribution. I didn't look at MVE project since more than a year, so I do not know about this hole filling addition. Could you point me to it? Also, please feel free to implement it yourself in OpenMVS, the project is open to everybody.

saedrna commented 7 years ago

Please find the function fill_hole in this file as below.

bool fill_hole(std::vector<std::size_t> const & hole, UniGraph const & graph,
    mve::TriangleMesh::ConstPtr mesh, mve::MeshInfo const & mesh_info,
    std::vector<std::vector<VertexProjectionInfo> > * vertex_projection_infos,
    std::vector<TexturePatch::Ptr> * texture_patches)

I'm now stuck in a lunar project, and when I finish my job, I hope I'll get some time to reimplement this in OpenMVS.

cdcseacave commented 7 years ago

Great, thx. Is this lunar project also related to photogrammetry? Could you share more details about it?

saedrna commented 7 years ago

Yes, about photogrammetry, but just a job for food.

cdcseacave commented 7 years ago

I tell you something: add the hole filling functionality to OpenMVS in the next 12h and we can speak about a serious job in photogrammetry for you, not only for food, but for fun too.

tftangming commented 4 years ago

@saedrna hello! I plan to achieve the hole-filling in the openMVS, can you give me some help about it and whether there are some impossible problem? Thanks!

manalihiremath30 commented 2 years ago

Please find the function fill_hole in this file as below.

bool fill_hole(std::vector<std::size_t> const & hole, UniGraph const & graph,
    mve::TriangleMesh::ConstPtr mesh, mve::MeshInfo const & mesh_info,
    std::vector<std::vector<VertexProjectionInfo> > * vertex_projection_infos,
    std::vector<TexturePatch::Ptr> * texture_patches)

I'm now stuck in a lunar project, and when I finish my job, I hope I'll get some time to reimplement this in OpenMVS.

Please find the function fill_hole in this file as below.

bool fill_hole(std::vector<std::size_t> const & hole, UniGraph const & graph,
    mve::TriangleMesh::ConstPtr mesh, mve::MeshInfo const & mesh_info,
    std::vector<std::vector<VertexProjectionInfo> > * vertex_projection_infos,
    std::vector<TexturePatch::Ptr> * texture_patches)

Hey can u please explain what exactly they have done in this code like step wise. As i am wroking on it and i am not much familiar with c++ code. It would be veryyy helpful to me

guyuezuntinggithub commented 2 years ago

I am stuck in this problem too, I use the original algorithm https://github.com/nmoehrle/mvs-texturing/issues/59 and get some big texture holes and the fill_hole fuction just fill manifold hole, but there many nonmanifold texture holes.