fixed samples compilation
This commit is contained in:
parent
2508d8e2b4
commit
680eeecc3b
@ -535,7 +535,7 @@ void DetectorQualityEvaluator::readAlgorithm ()
|
||||
{
|
||||
defaultDetector = FeatureDetector::create( algName );
|
||||
specificDetector = FeatureDetector::create( algName );
|
||||
if( defaultDetector == 0 )
|
||||
if( defaultDetector.empty() )
|
||||
{
|
||||
printf( "Algorithm can not be read\n" );
|
||||
exit(-1);
|
||||
@ -769,14 +769,14 @@ void DescriptorQualityEvaluator::readAlgorithm( )
|
||||
defaultDescMatcher = GenericDescriptorMatcher::create( algName );
|
||||
specificDescMatcher = GenericDescriptorMatcher::create( algName );
|
||||
|
||||
if( defaultDescMatcher == 0 )
|
||||
if( defaultDescMatcher.empty() )
|
||||
{
|
||||
Ptr<DescriptorExtractor> extractor = DescriptorExtractor::create( algName );
|
||||
Ptr<DescriptorMatcher> matcher = DescriptorMatcher::create( matcherName );
|
||||
defaultDescMatcher = new VectorDescriptorMatch( extractor, matcher );
|
||||
specificDescMatcher = new VectorDescriptorMatch( extractor, matcher );
|
||||
|
||||
if( extractor == 0 || matcher == 0 )
|
||||
if( extractor.empty() || matcher.empty() )
|
||||
{
|
||||
printf("Algorithm can not be read\n");
|
||||
exit(-1);
|
||||
|
@ -32,7 +32,7 @@ int main(int argc, char** argv)
|
||||
std::string params_filename = std::string(argv[4]);
|
||||
|
||||
Ptr<GenericDescriptorMatcher> descriptorMatcher = GenericDescriptorMatcher::create(alg_name, params_filename);
|
||||
if( descriptorMatcher == 0 )
|
||||
if( descriptorMatcher.empty() )
|
||||
{
|
||||
printf ("Cannot create descriptor\n");
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user