What is the fastest way of ignoring MSER responses within a mask ?

1 view (last 30 days)
Hello,
For a given image IM, the MSER regions can be obtained by using detectMSERFeatures function. Now Suppose, there is a masked region in IM, and I would like to ignore all those MSER regions whose elliptical supports intersect with that masked region. Suppose I have a mask M of that region.
My question is : What is the fastest way to ignore all such MSER regions whose elliptical supports intersect with M(M>0) ?
My attempt : My attempt has been very basic but I could not think of a faster way.
I iterate through all MSER regions in the MSERregions object and for each object, I construct its elliptical mask and check if that mask overlaps with M(M>0). If it does, I reject that MSER region.
It is a very inefficient method because, if 2000 MSER regions are detected in a single image (with many of them having concentric elliptical supports), I end up doing iteration over all the regions, creating their corresponding elliptical masks, and doing intersect operation with M(M>0).
My apprehension : Suppose instead of checking intersection through elliptical masks, I simply check using PixelList field of each MSER region. But I am not sure if that is the right approach, since I am suspecting that it might happen that PixelList field does not overlap with M(M>0), but the corresponding ellipse (with the same second order moments as the PixelList members does. However I did not find any mathematical work which could justify or reject this apprehension.
Could anyone tell me of a better way ?
  1 Comment
Walter Roberson
Walter Roberson on 11 Aug 2015
Perhaps
[features, validpoints] = extractFeatures(~IM, MSERobject)
? They will have been filtered to the locations that are in the negation of IM, thus discarding what is selected in IM

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!