public static InterestPointDetector createDetector( int detect , Class imageType ) {
Class derivType = GImageDerivativeOps.getDerivativeType(imageType);
GeneralFeatureDetector general;
switch( detect ) {
case DETECT_FH:
return FactoryInterestPoint.fastHessian(confDetectFH());
case DETECT_SIFT:
return FactoryInterestPoint.sift(null,confDetectSift(),imageType);
case DETECT_SHITOMASI:
general = FactoryDetectPoint.createShiTomasi(confCorner(),false,derivType);
break;
case DETECT_HARRIS:
general = FactoryDetectPoint.createHarris(confCorner(), false, derivType);
break;
case DETECT_FAST:
general = FactoryDetectPoint.createFast(new ConfigFastCorner(20,9),new ConfigGeneralDetector(150,3,20), imageType);
break;
default:
throw new RuntimeException("Unknown detector");
}
return FactoryInterestPoint.wrapPoint(general,1.0,imageType,derivType);
}