I am trying to extract features from a rectangle image. But I want to ignore certain part of the image, so that no features are extracted from the these areas inside the image. I can think of two approaches.
a) Get features from the entire image and using keypoints discard the ones that lie within the ignored areas. But this approach is not preferred as I have put a limit on the maximum number of features to be extracted from the image and discarding later on won't help in getting constant number of features.
b) Make the pixels on that part of the image as numpy zero. But I think SIFT/ORB or other feature extraction algorithm might detect this as a black rectangle and create features wrongly at the edge part of this blackened box. Although not sure about this.
Can someone confirm the best approach for the problem statement?


