Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Unhandled exception at using detect function(ORB)

Hi, i'm trying to get the keypoints in a image using the detector ORB but always gets an exception, my code is the next one.

vector < KeyPoint > kp;

int nfeatures = 500;
float scaleFactor = 1.2f;
int nlevels = 8;
int edgeThreshold = 15;
int firstLevel = 0;
int WTA_K = 2;
int scoreType = ORB::HARRIS_SCORE;
int patchSize = 31;
int fastThreshold = 20;

Ptr < ORB > detector = ORB::create(
    nfeatures,
    scaleFactor,
    nlevels,
    edgeThreshold,
    firstLevel,
    WTA_K,
    scoreType,
    patchSize,
    fastThreshold );

detector->detect(img, kp);
cout << "Found " << kp.size() << " Keypoints " << std::endl;

Mat out;
drawKeypoints(img, kp, out, Scalar::all(255));

imshow("Kpts", out);

img is declared early, the problem is when do detector->detect(img, kp); and i don't know what problem is, i'm trying other form of do it but all crash in the call of detect().

Sorry for my english and thanks for the answer.

Unhandled exception at using detect function(ORB)

Hi, i'm trying to get the keypoints in a image using the detector ORB but always gets an exception, my code is the next one.

vector < KeyPoint > kp;

int nfeatures = 500;
float scaleFactor = 1.2f;
int nlevels = 8;
int edgeThreshold = 15;
int firstLevel = 0;
int WTA_K = 2;
int scoreType = ORB::HARRIS_SCORE;
int patchSize = 31;
int fastThreshold = 20;

Ptr < ORB > detector = ORB::create(
    nfeatures,
    scaleFactor,
    nlevels,
    edgeThreshold,
    firstLevel,
    WTA_K,
    scoreType,
    patchSize,
    fastThreshold );

detector->detect(img, kp);
cout << "Found " << kp.size() << " Keypoints " << std::endl;

Mat out;
drawKeypoints(img, kp, out, Scalar::all(255));

imshow("Kpts", out);

img is declared early, the problem is when do detector->detect(img, kp); and i don't know what problem is, i'm trying other form of do it but all crash in the call of detect().

edit:

I try to do with BRISK and de problem is the same in the call of detect crash. With brisk i did the next one:

Ptr < BRISK > detector = BRISK::create();
vector <KeyPoint> kp;
detector->detect(img,kp);

Mat descriptor;
detector->compute(img,kp,descriptor);

This is turning exasperating.

Sorry for my english and thanks for the answer.

Unhandled exception at using detect function(ORB)

Hi, i'm trying to get the keypoints in a image using the detector ORB but always gets an exception, my code is the next one.

vector < KeyPoint > kp;

int nfeatures = 500;
float scaleFactor = 1.2f;
int nlevels = 8;
int edgeThreshold = 15;
int firstLevel = 0;
int WTA_K = 2;
int scoreType = ORB::HARRIS_SCORE;
int patchSize = 31;
int fastThreshold = 20;

Ptr < ORB > detector = ORB::create(
    nfeatures,
    scaleFactor,
    nlevels,
    edgeThreshold,
    firstLevel,
    WTA_K,
    scoreType,
    patchSize,
    fastThreshold );

detector->detect(img, kp);
cout << "Found " << kp.size() << " Keypoints " << std::endl;

Mat out;
drawKeypoints(img, kp, out, Scalar::all(255));

imshow("Kpts", out);

img is declared early, the problem is when do detector->detect(img, kp); and i don't know what problem is, i'm trying other form of do it but all crash in the call of detect().

edit:

I try to do with BRISK and de problem is the same in the call of detect crash. With brisk i did the next one:

Ptr < BRISK > detector = BRISK::create();
vector <KeyPoint> kp;
detector->detect(img,kp);

Mat descriptor;
detector->compute(img,kp,descriptor);

This is turning exasperating.

Sorry for my english and thanks for the answer.

Unhandled exception at using detect function(ORB)

Hi, i'm trying to get the keypoints in a image using the detector ORB but always gets an exception, my code is the next one.

vector < KeyPoint > kp;

int nfeatures = 500;
float scaleFactor = 1.2f;
int nlevels = 8;
int edgeThreshold = 15;
int firstLevel = 0;
int WTA_K = 2;
int scoreType = ORB::HARRIS_SCORE;
int patchSize = 31;
int fastThreshold = 20;

Ptr < ORB > detector = ORB::create(
    nfeatures,
    scaleFactor,
    nlevels,
    edgeThreshold,
    firstLevel,
    WTA_K,
    scoreType,
    patchSize,
    fastThreshold );

detector->detect(img, kp);
cout << "Found " << kp.size() << " Keypoints " << std::endl;

Mat out;
drawKeypoints(img, kp, out, Scalar::all(255));

imshow("Kpts", out);

img is declared early, the problem is when do detector->detect(img, kp); and i don't know what problem is, i'm trying other form of do it but all crash in the call of detect().

edit:

I try to do with BRISK and de the problem is the same in the call of detect crash. With brisk i did the next one:

Ptr < BRISK > detector = BRISK::create();
vector <KeyPoint> kp;
detector->detect(img,kp);

This is turning exasperating.

Sorry for my english and thanks for the answer.