avoid Ptr<> == NULL checks
This commit is contained in:
@@ -178,7 +178,7 @@ int main(int argc, char *argv[])
|
||||
vector<Rect> zone;
|
||||
vector<vector <Point> > region;
|
||||
Mat desc, result(img.rows, img.cols, CV_8UC3);
|
||||
if (b.dynamicCast<SimpleBlobDetector>() != NULL)
|
||||
if (b.dynamicCast<SimpleBlobDetector>().get())
|
||||
{
|
||||
Ptr<SimpleBlobDetector> sbd = b.dynamicCast<SimpleBlobDetector>();
|
||||
sbd->detect(img, keyImg, Mat());
|
||||
|
||||
@@ -500,7 +500,7 @@ int main(int argc, char *argv[])
|
||||
vector<vector <Point> > region;
|
||||
Mat desc;
|
||||
|
||||
if (b.dynamicCast<MSER>() != NULL)
|
||||
if (b.dynamicCast<MSER>().get())
|
||||
{
|
||||
Ptr<MSER> sbd = b.dynamicCast<MSER>();
|
||||
sbd->detectRegions(img, region, zone);
|
||||
|
||||
Reference in New Issue
Block a user