added Ptr::operator==

This commit is contained in:
Anatoly Baksheev
2012-12-15 22:09:21 +04:00
parent aabb40e34d
commit 94c310fc14
6 changed files with 12 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ PERF_TEST_P(fast, detect, testing::Combine(
declare.in(frame);
Ptr<FeatureDetector> fd = Algorithm::create<FeatureDetector>("Feature2D.FAST");
ASSERT_FALSE( fd == 0 );
ASSERT_FALSE( fd.empty() );
fd->set("threshold", 20);
fd->set("nonmaxSuppression", true);
fd->set("type", type);

View File

@@ -531,7 +531,7 @@ void FlannBasedMatcher::train()
void FlannBasedMatcher::read( const FileNode& fn)
{
if (indexParams == 0)
if (indexParams.empty())
indexParams = new flann::IndexParams();
FileNode ip = fn["indexParams"];
@@ -570,7 +570,7 @@ void FlannBasedMatcher::read( const FileNode& fn)
};
}
if (searchParams == 0)
if (searchParams.empty())
searchParams = new flann::SearchParams();
FileNode sp = fn["searchParams"];