cdcseacave / openMVS

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

Using image masks in openMVS #144

Open Jhfelectric opened 8 years ago

Jhfelectric commented 8 years ago

Bonjour Pierre & Cdc

Continuing my journey down the pipeline :)

Looking at various mesh-reconstructing programs, I found out that PMVS v2 could use image masks to accelerate the process. Is this something possible with openMVS ? Or did I miss something and masks applied in openMVG_main_ComputeMatches make their way to the end (in the bin or mvs file) ?

Thanks again for your help. Julien

pmoulon commented 8 years ago

Mask is not supported in OpenMVS. They can only be used in OpenMVG to filter out some keypoints (keypoints in black mask regions are removed).

cdcseacave commented 8 years ago

Actually masks are supported only in point-cloud densification module of OpenMVS, but are not enabled (there is no interface for setting them). Please feel free to add the missing interface (a way to load and set masks for each image).

Jhfelectric commented 8 years ago

Thank you Cdc. As far as I can follow and understand, masks are used in MapMatrix2ZigzagIdx. As a BitMatrix, zeros are used to exclude the relevant coords (right ?). So I need to get that BitMatrix in there. Fine :) First issue I am facing now is to recompile it all. I spent a few hours already gathering all prerequisites to openMVS. There are quite a lot... Would you happen to have (a link to) compiled binaries for all those dependencies ? Thanks, Julien

cdcseacave commented 8 years ago

if you use linux or mac, there is a detailed build step by step in the wiki, if you use windows, just compile all libraries as described on their website

Yes, that is the mask

Rixikso commented 7 years ago

Hi I am trying to add this interface for masks and I wonder if you could help me understand ? :D

What I think it is necessary to wake this monster :

  1. Implement reading Mask from file and converting them to BitMatrix
  2. Passing those masks to the function -> EstimateDepthMap(uint32_t idxImage)

Please correct me if I am wrong or you have some notes to this process :D

cdcseacave commented 7 years ago

Indeed, those are the steps. In function EstimateDepthMap() you have to pass the mask that you read to DepthEstimator::MapMatrix2ZigzagIdx(), which already supports a mask as input but right now it is empty.

Rixikso commented 7 years ago

Okey. So I guess I will try to do this :)

AndreaMonzini commented 6 years ago

Hello, could mask be useful using turntable ( or other photo set) and changing position of the same object ( 2 dataset ) and then using a single masked dataset to cover all sides ?

For now i have to use two separate dataset and merge manually the two 3D resulting objects.

tompollok commented 4 years ago

@cdcseacave @Rixikso has there been any work for supporting mask yet?

cdcseacave commented 4 years ago

no

roby23 commented 4 years ago

Hello, I am able to load the masks before calling DepthEstimator::MapMatrix2ZigzagIdx(), but the problem is that this function seems to be called just on the first image, hence the mask of the first image is applied to all the other images. How can I apply different masks on different images?

cdcseacave commented 4 years ago

I just added mask support in c618f43

w080707 commented 4 years ago

Hello, I am able to load the masks before calling DepthEstimator::MapMatrix2ZigzagIdx(), but the problem is that this function seems to be called just on the first image, hence the mask of the first image is applied to all the other images. How can I apply different masks on different images?

Have you solved this problem? Only the mask of the first image is applied.

wuge1880 commented 3 years ago

Hello, I have tested the lastest patch-match code implemented in CUDA, and found that it does not support the function of image mask as in c618f43. I am wondering whether the image mask support would be available in the CUDA version patch-match?

cdcseacave commented 3 years ago

I do not have time now for adding mask support; as a fast way to add such support is to simply mask out the estimated depth-maps before fusion

wuge1880 commented 3 years ago

I do not have time now for adding mask support; as a fast way to add such support is to simply mask out the estimated depth-maps before fusion

OK, I will try it. Thank you!

jzenn commented 2 years ago

Hi @cdcseacave, thank you for the great library! I was just wondering whether there might be some progress on this masking feature. Do you have any plans on integrating this feature at some time? Thank you in advance!

cdcseacave commented 2 years ago

yes, I plan adding it, but I do not have time right now, pls help if in hurry, either by directly coding it or making a donation to hire some help

apurvazaveri commented 2 years ago

Thanks, that would a very very helpful feature!

apurvazaveri commented 2 years ago

Does the mask feature work on CPU? If so how does one provide the mask to point cloud densification?