Masks

421 views
Skip to first unread message

david...@gmail.com

unread,
Aug 23, 2017, 2:49:12 PM8/23/17
to COLMAP
Looking at documentation for sift in opencv I see that it is possible to pass a mask to exclude parts of an image. Does colmap have this ability? For instance to exclude specular reflections?

Forgive me if the question is redundant or off topic. This is my second day since discovering SfM.


Johannes Schönberger

unread,
Aug 23, 2017, 2:56:45 PM8/23/17
to col...@googlegroups.com
Hi David,

Currently, there is no option to provide a mask in COLMAP but it should be relatively easy to implement. Alternatively, you can compute features using OpenCV and import those features into COLMAP, as described in the documentation. Since this came up before, I might consider implementing such a feature soon. I will keep track of it here https://github.com/colmap/colmap/issues/208

Thanks for the feedback and let me know if you have other questions. 

Best,
Johannes

On 23 Aug 2017, at 20:49, david...@gmail.com wrote:

Looking at documentation for sift in opencv I see that it is possible to pass a mask to exclude parts of an image. Does colmap have this ability? For instance to exclude specular reflections?

Forgive me if the question is redundant or off topic. This is my second day since discovering SfM.


--
You received this message because you are subscribed to the Google Groups "COLMAP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to colmap+un...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/colmap/ebf53a01-8428-4a85-a4dc-0909aa6b6aad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

david...@gmail.com

unread,
Oct 12, 2017, 10:30:46 PM10/12/17
to COLMAP
Hi Johannes,

Thanks for the speedy response!

I've had some fun implementing this feature myself. I'm not sure if my solution is what you had in mind. I made the changes as unobtrusive as possible, adding a separate data member to the Bitmap class, "alpha_", which contains a greyscale FIBitmapPtr for images that have alpha channels. Plus some extra functions to deal with that stuff, and a function in base/feature_extraction.cc to filter/resize the Keypoints vector and Descriptor matrix.

Seems to work :)

Johannes Schönberger

unread,
Oct 13, 2017, 2:34:59 AM10/13/17
to COLMAP
Hi David,

this sounds great. I am not sure if I am going to incorporate it and I might not get around looking at it for a while (due to other projects) but do you have the code online somewhere?

Thanks for the feedback.

Best,
Johannes
> To view this discussion on the web visit https://groups.google.com/d/msgid/colmap/38c952cc-93bb-4c4f-a172-ba42f78c9f6f%40googlegroups.com.

David DeWert

unread,
Oct 14, 2017, 12:56:15 PM10/14/17
to col...@googlegroups.com
Hi Johannes,

So I submitted a pull request but deleted it. Merge conflicts.

I guess the basic question is how useful is this, really? And is it worth making changes in basic classes like colmap::Bitmap? And is the best solution to remove SIFT features, or to tag them in some way?

It would be worth the trouble if there were good algorithms for identifying specular reflections in still images, but that seems to be a challenge (?)

This is interesting and uses SIFT, "Reflection Detection in Image Sequences":
http://www.mee.tcd.ie/~sigmedia/pmwiki/uploads/Misc.Icip2011/CVPR_new.pdf

david...@gmail.com

unread,
Oct 15, 2017, 8:12:27 PM10/15/17
to COLMAP
Okay here is the code, if you're interested:

https://github.com/colmap/colmap/compare/dev...ddewert:iss208


Johannes Schönberger

unread,
Oct 16, 2017, 6:08:55 AM10/16/17
to col...@googlegroups.com
Thanks David. I will try to have a look over the next days/weeks - I am currently a little busy with deadlines.

Cheers, Johannes

> On Oct 16, 2017, at 2:12 AM, david...@gmail.com wrote:
>
> Okay here is the code, if you're interested:
>
> https://github.com/colmap/colmap/compare/dev...ddewert:iss208
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "COLMAP" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to colmap+un...@googlegroups.com.
> To post to this group, send email to col...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/colmap/cfb07899-b439-4416-93af-c33227050c01%40googlegroups.com.

gus...@laserpanda.com

unread,
Nov 24, 2017, 10:31:41 AM11/24/17
to COLMAP
I would definitely find this useful, in fact it is a make or break functionality for me.

Roberto Colella

unread,
Feb 20, 2019, 7:04:48 AM2/20/19
to COLMAP
Hi,
Should mask_path be provided as a parameter or colmap looks for masks in the .png format in a folder at the same level as images one?

Roberto
Reply all
Reply to author
Forward
0 new messages