void CV_FeatureDetectorTest::run( int /*start_from*/ )
{
- if( fdetector.empty() )
+ if( !fdetector )
{
ts->printf( cvtest::TS::LOG, "Feature detector is empty.\n" );
ts->set_failed_test_info( cvtest::TS::FAIL_INVALID_TEST_DATA );
void run(int)
{
createDescriptorExtractor();
- if( dextractor.empty() )
+ if( !dextractor )
{
ts->printf(cvtest::TS::LOG, "Descriptor extractor is empty.\n");
ts->set_failed_test_info( cvtest::TS::FAIL_INVALID_TEST_DATA );
void run(int)
{
Ptr<Feature2D> f = Algorithm::create<Feature2D>("Feature2D." + fname);
- if(f.empty())
+ if(!f)
return;
string path = string(ts->get_data_path()) + "detectors_descriptors_evaluation/planar/";
string imgname1 = path + "box.png";
FeatureDetectorUsingMaskTest(const Ptr<FeatureDetector>& featureDetector) :
featureDetector_(featureDetector)
{
- CV_Assert(!featureDetector_.empty());
+ CV_Assert(featureDetector_);
}
protected:
virtual void run(int)
{
cv::initModule_features2d();
- CV_Assert(!detector.empty());
+ CV_Assert(detector);
string imgFilename = string(ts->get_data_path()) + FEATURES2D_DIR + "/" + IMAGE_FILENAME;
// Read the test image.
minKeyPointMatchesRatio(_minKeyPointMatchesRatio),
minAngleInliersRatio(_minAngleInliersRatio)
{
- CV_Assert(!featureDetector.empty());
+ CV_Assert(featureDetector);
}
protected:
normType(_normType),
minDescInliersRatio(_minDescInliersRatio)
{
- CV_Assert(!featureDetector.empty());
- CV_Assert(!descriptorExtractor.empty());
+ CV_Assert(featureDetector);
+ CV_Assert(descriptorExtractor);
}
protected:
minKeyPointMatchesRatio(_minKeyPointMatchesRatio),
minScaleInliersRatio(_minScaleInliersRatio)
{
- CV_Assert(!featureDetector.empty());
+ CV_Assert(featureDetector);
}
protected:
normType(_normType),
minDescInliersRatio(_minDescInliersRatio)
{
- CV_Assert(!featureDetector.empty());
- CV_Assert(!descriptorExtractor.empty());
+ CV_Assert(featureDetector);
+ CV_Assert(descriptorExtractor);
}
protected: