Disable the removal of keypoints near borders with GridAdapter?
I am using the GridAdaptedFeatureDetector( ... )
with ORB
to have a better distribution of keypoints.
The bad thing is that when you apply a grid all the points near the grid will get eliminated (even tho they are fully immerse in the image)
Is there any way to disable this unwanted behaviour?
Sample:
Ptr<FeatureDetector> det = new OrbFeatureDetector();
Ptr<FeatureDetector> gridDet = new GridAdaptedFeatureDetector(det,totalKeyPointLimit,gridRows,gridCols);
The key part of this behaviour is line 246 and 247:
https://github.com/Itseez/opencv/blob/master/modules/features2d/src/detectors.cpp#L230
Where GridAdpaterFeatureDetectorInvoker builds the right mask. We should expand the mask to about 40-50 overlapping pixels.