Classes derived from cv::Algorithminherit a method name()that returns a string containing the name of the algorithm. In the case of your SURF detector, name()returns the string
Feature2D.SURF
. , algorithm-type.instance-name, . Feature2D. , .
auto surf = cv::FeatureDetector::create("SURF");
auto n = surf->name();
std::cout << n << std::endl;