Ask Your Question
0

Exception when constructing BRISK in debug mode but not in release

asked 2013-07-27 18:20:36 -0600

updated 2013-10-09 03:02:06 -0600

berak gravatar image

Hi,

I'm running the following simple code:

int main( int argc, const char** argv )
{
    // Creating the BRISK descriptor
    int Threshl=60;
    int Octaves=4; // (pyramid layer) from which the keypoint has been extracted
    float PatternScales=1.0f;
    std::vector<float> rList;
    std::vector<int> nList;

    // this is the standard pattern found to be suitable also
    rList.resize(5);
    nList.resize(5);
    const double f = 0.85 * PatternScales;

    rList[0] = (float)(f * 0.);
    rList[1] = (float)(f * 2.9);
    rList[2] = (float)(f * 4.9);
    rList[3] = (float)(f * 7.4);
    rList[4] = (float)(f * 10.8);

    nList[0] = 1;
    nList[1] = 10;
    nList[2] = 14;
    nList[3] = 15;
    nList[4] = 20;

    cv::BRISK  BRISKD(rList,nList,1000,(float)(8.2 * PatternScales));//initialize algoritm

It works fine in release mode, but in debug mode I get an exception

Unhandled exception at at 0x000007FF9EA9811C in BriskBoosting1.exe: Microsoft C++ exception: std::length_error at memory location 0x000000A211DA9D70.

How can the code work in release but not in debug? Can someone please shed some light on this problem?

If that makes any difference, I'm using visual studio 2012 and running on windows (x64).

Thanks in advance!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-10-09 02:56:34 -0600

My bad, I included the libs for release instead of the libs for debug.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-07-27 18:20:36 -0600

Seen: 570 times

Last updated: Oct 09 '13