c++ - Retrieve feature type from OpenCV FeatureDetector -
 In OpenCV, it is very common to name a   This is a factory pattern,   Then, given a variable type of     Feature2D.SURF     which is a human-readable form In general, this string is  algorithm-type .  Example-Name , although there is only one-word description in many things, for any feature detection algorithm, the  algorithm-type  prefix always  cv :: FeatureDetector  feature :   
 cv :: Ptr  cv :: FeatureDetector  is an abstract class.   cv :: Ptr  "SURF"  in my example.  class = "post-text" itemprop = "text">  name ()  gets the method which gives the algorithm name in the string. In the case of your surf detector,  named ()  returns   
 Feature2D < / code>. If you need an exact string match, you can parse it manually.   
 Auto Surf = CV :: Feature Detector :: Create ("Surf"); Auto en = surf-> Name (); Std :: cout & lt; & Lt; N & lt; & Lt; Std :: endl; // print "Feature 2D.SURF", without quote    
 
Comments
Post a Comment