I want to get features from non-region of interest area. I know how to define ROI in Mat
format, however, I also need the rest of the area for negative image features.
Thanks in advance.
Asked
Active
Viewed 321 times
0

Angie Quijano
- 4,167
- 3
- 25
- 30

garnettburak
- 143
- 1
- 9
1 Answers
2
You could use the mask to define any region you want to get features. However, it requires the called function to support mask.
For example:
void ORB::operator()(InputArray image, InputArray mask, vector<KeyPoint>& keypoints, OutputArray descriptors, bool useProvidedKeypoints=false ) const
mask – The operation mask.
If the functions do not support mask. There are two tricks to get the features in non-ROI:
Get the features of whole image, then filter the result manually.
Split the non-ROI into ROI's (as following), then pass the ROI's into the function.
For example:
|-----------------|
| 1 |
|----|-------|----|
| 2 | | 3 |
|----|-------|----|
| 4 |
|-----------------|

maxint
- 1,005
- 8
- 12
-
This might work better because when I apply a mask, the ROI will be black and this causes irrelevant keypoints on the edges of ROI. – garnettburak Mar 20 '14 at 21:42