Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

all feature2d classes return a Ptr<Feature2D> . if you don't use a smartpointer to catch it, you instance is already dead in line 1. so, it has to be:

cv::Ptr<cv::Feature2d> detector = cv::ORB::create();
CV_Assert( ! detector.empty() );

all feature2d classes return a Ptr<Feature2D> . from the create() method. if you don't use a smartpointer to catch it, you instance is already dead in line 1. so, it has to be:

cv::Ptr<cv::Feature2d> detector = cv::ORB::create();
CV_Assert( ! detector.empty() );

all feature2d classes return a Ptr<Feature2D> from the create() method. if you don't use a smartpointer to catch it, you instance is already dead in line 1. 1 (that is your segfault). so, it has to be:

cv::Ptr<cv::Feature2d> detector = cv::ORB::create();
CV_Assert( ! detector.empty() );

all feature2d classes return a Ptr<Feature2D>Ptr<Something> from the create() method. if you don't use a smartpointer to catch it, you instance is already dead in line 1 (that is your segfault). so, it has to be:

cv::Ptr<cv::Feature2d> cv::Ptr<cv::ORB> detector = cv::ORB::create();
CV_Assert( ! detector.empty() );

all feature2d classes return a Ptr<Something> from the create() method. if you don't use a smartpointer to catch it, you instance is already dead in line 1 (that is your segfault). segfault, it self-destroyed). so, it has to be:

cv::Ptr<cv::ORB> detector = cv::ORB::create();
CV_Assert( ! detector.empty() );