I use the following function to create a GFTT keypoint detector:
poKpDetector1 = FeatureDetector::create( "GFTT" );
Then call the following function to adjust desired values for it's input parameters:
void FuncSet_GFTT_InpParams( Ptr<FeatureDetector>& poKpDetector1 )
{
poKpDetector1->set( "nfeatures" , MyInpParamsStruct.nKpDet_GFTT1_MaxCornerNo );
poKpDetector1->set( "qualityLevel" , MyInpParamsStruct.dKpDet_GFTT1_QualityLevel );
poKpDetector1->set( "minDistance" , MyInpParamsStruct.dKpDet_GFTT1_MinDistance );
poKpDetector1->set( "useHarrisDetector" , MyInpParamsStruct.bKpDet_GFTT1_UseHarrisDetector );
poKpDetector1->set( "k" , MyInpParamsStruct.dKpDet_GFTT1_HarrisDetectorK );
}
Looking in features2d_init.cpp I was unable to find how can I use "set" function (having a pointer to FeatureDetector type) to adjust "blockSize" parameter for GFTT.
The following two tries fails:
poKpDetector1->set( "blocksize", MyInpParamsStruct.nKpDet_GFTT1_BlockSize );
or
(*((cv::GFTTDetector*)((poKpDetector1).obj))).blockSize = MyInpParamsStruct.nKpDet_GFTT1_BlockSize;
Is there a way to adjust blocksize parameter of GFTT using only the pointer returned by FeatureDetector::create function? Thank you in advance for any help.