Reduce feature search using the masks