Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Detector Mask works with ORB, crashes with Sift (bug) ?

I am using a simple code to extract keypoint outside a ROI. The code works with ORB but not with SIFT. Code:

vector<KeyPoint> kp;
Mat d;
string image = "image";

Mat M = imread(image,0);

//Ptr<FeatureDetector> det = new OrbFeatureDetector();   //> WORKS
Ptr<FeatureDetector> det = new SiftFeatureDetector();    //> CRASH at .detect

Rect roi(100,100,70,70);
Mat mask(M.size(), CV_8UC1, Scalar::all(255));
mask(roi).setTo(Scalar::all(0));

det->detect(M,kp,mask);

The detect method crashes with:

OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)si
ze.p[0] && (unsigned)(i1*DataType<_Tp>::channels) < (unsigned)(size.p[1]*channel
s()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3
) - 1))*4) & 15) == elemSize1()) in unknown function, file C:\slave\builds\WinIn
stallerMegaPack\src\opencv\modules\core\include\opencv2/core/mat.hpp, line 545

If i simply use ORB

Ptr<FeatureDetector> det = new OrbFeatureDetector();

with the same code the detect works just fine.

Detector Mask works with ORB, crashes with Sift (bug) ?

I am using a simple code to extract keypoint outside a ROI. The code works with ORB but not with SIFT. Code:

vector<KeyPoint> kp;
Mat d;
string image = "image";
"image.png";

Mat M = imread(image,0);

//Ptr<FeatureDetector> det = new OrbFeatureDetector();   //> WORKS
Ptr<FeatureDetector> det = new SiftFeatureDetector();    //> CRASH at .detect

Rect roi(100,100,70,70);
Mat mask(M.size(), CV_8UC1, Scalar::all(255));
mask(roi).setTo(Scalar::all(0));

det->detect(M,kp,mask);

The detect method crashes with:

OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)si
ze.p[0] && (unsigned)(i1*DataType<_Tp>::channels) < (unsigned)(size.p[1]*channel
s()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3
) - 1))*4) & 15) == elemSize1()) in unknown function, file C:\slave\builds\WinIn
stallerMegaPack\src\opencv\modules\core\include\opencv2/core/mat.hpp, line 545

If i simply use ORB

Ptr<FeatureDetector> det = new OrbFeatureDetector();

with the same code the detect works just fine.

Detector Mask works with ORB, crashes with Sift (bug) ?

I am using a simple code to extract keypoint outside a ROI. The code works with ORB but not with SIFT. Code:

vector<KeyPoint> kp;
Mat d;
string image = "image.png";

Mat M = imread(image,0);

//Ptr<FeatureDetector> det = new OrbFeatureDetector();   //> WORKS
Ptr<FeatureDetector> det = new SiftFeatureDetector();    //> CRASH at .detect

Rect roi(100,100,70,70);
Mat mask(M.size(), CV_8UC1, Scalar::all(255));
mask(roi).setTo(Scalar::all(0));

det->detect(M,kp,mask);

The detect method crashes with:

OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)si
ze.p[0] && (unsigned)(i1*DataType<_Tp>::channels) < (unsigned)(size.p[1]*channel
s()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3
) - 1))*4) & 15) == elemSize1()) in unknown function, file C:\slave\builds\WinIn
stallerMegaPack\src\opencv\modules\core\include\opencv2/core/mat.hpp, line 545

If i simply use ORB

Ptr<FeatureDetector> det = new OrbFeatureDetector();

with the same code the detect works just fine.fine. (It works with Surf and Brisk detector too. It's just SIFT that crashes =/)

Debug mode: Detector Mask works with ORB, crashes with Sift (bug) ?

I am using a simple code to extract keypoint outside a ROI. The code works with ORB but not with SIFT. Code:

vector<KeyPoint> kp;
Mat d;
string image = "image.png";

Mat M = imread(image,0);

//Ptr<FeatureDetector> det = new OrbFeatureDetector();   //> WORKS
Ptr<FeatureDetector> det = new SiftFeatureDetector();    //> CRASH at .detect

Rect roi(100,100,70,70);
Mat mask(M.size(), CV_8UC1, Scalar::all(255));
mask(roi).setTo(Scalar::all(0));

det->detect(M,kp,mask);

The detect method crashes with:

OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)si
ze.p[0] && (unsigned)(i1*DataType<_Tp>::channels) < (unsigned)(size.p[1]*channel
s()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3
) - 1))*4) & 15) == elemSize1()) in unknown function, file C:\slave\builds\WinIn
stallerMegaPack\src\opencv\modules\core\include\opencv2/core/mat.hpp, line 545

If i simply use ORB

Ptr<FeatureDetector> det = new OrbFeatureDetector();

with the same code the detect works just fine. (It works with Surf and Brisk detector too. It's just SIFT that crashes =/)

Note

If i use sift in Release mode the code doesnt' crash (because the ASSERT is never executed)

Debug mode: Detector Mask works with ORB, crashes with Sift (bug) ?

I am using a simple code to extract keypoint outside a ROI. The code works with ORB but not with SIFT. Code:

vector<KeyPoint> kp;
Mat d;
string image = "image.png";

Mat M = imread(image,0);

//Ptr<FeatureDetector> det = new OrbFeatureDetector();   //> WORKS
Ptr<FeatureDetector> det = new SiftFeatureDetector();    //> CRASH at .detect

Rect roi(100,100,70,70);
Mat mask(M.size(), CV_8UC1, Scalar::all(255));
mask(roi).setTo(Scalar::all(0));

det->detect(M,kp,mask);

The detect method crashes with:

OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)si
ze.p[0] && (unsigned)(i1*DataType<_Tp>::channels) < (unsigned)(size.p[1]*channel
s()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3
) - 1))*4) & 15) == elemSize1()) in unknown function, file C:\slave\builds\WinIn
stallerMegaPack\src\opencv\modules\core\include\opencv2/core/mat.hpp, line 545

If i simply use ORB

Ptr<FeatureDetector> det = new OrbFeatureDetector();

with the same code the detect works just fine. (It works with Surf and Brisk detector too. It's just SIFT that crashes =/)

Note

If i use sift in Release mode the code doesnt' crash (because the ASSERT is never executed)

Note2

I have OpenCV 2.4.5 with Windows 8 64bit (and Visual studio 2012)

Debug mode: Detector Mask works with ORB, crashes with Sift (bug) ?

I am using a simple code to extract keypoint outside a ROI. The code works with ORB but not with SIFT. Code:

vector<KeyPoint> kp;
Mat d;
string image = "image.png";

Mat M = imread(image,0);

//Ptr<FeatureDetector> det = new OrbFeatureDetector();   //> WORKS
Ptr<FeatureDetector> det = new SiftFeatureDetector();    //> CRASH at .detect

Rect roi(100,100,70,70);
Mat mask(M.size(), CV_8UC1, Scalar::all(255));
mask(roi).setTo(Scalar::all(0));

det->detect(M,kp,mask);

The detect method crashes with:

OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)si
ze.p[0] && (unsigned)(i1*DataType<_Tp>::channels) < (unsigned)(size.p[1]*channel
s()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3
) - 1))*4) & 15) == elemSize1()) in unknown function, file C:\slave\builds\WinIn
stallerMegaPack\src\opencv\modules\core\include\opencv2/core/mat.hpp, line 545

If i simply use ORB

Ptr<FeatureDetector> det = new OrbFeatureDetector();

with the same code the detect works just fine. (It works with Surf and Brisk detector too. It's just SIFT that crashes =/)

Note

If i use sift in Release mode the code doesnt' crash (because the ASSERT is never executed)

Note2

I have OpenCV 2.4.5 with Windows 8 64bit (and Visual studio 2012)

Full stack when crashes:

image description

testMask() line 303 is the line that follows the call to ->detect

Debug mode: Detector Mask works with ORB, crashes with Sift (bug) ?

I am using a simple code to extract keypoint outside a ROI. The code works with ORB but not with SIFT. Code:

vector<KeyPoint> kp;
Mat d;
string image = "image.png";

Mat M = imread(image,0);

//Ptr<FeatureDetector> det = new OrbFeatureDetector();   //> WORKS
Ptr<FeatureDetector> det = new SiftFeatureDetector();    //> CRASH at .detect

Rect roi(100,100,70,70);
Mat mask(M.size(), CV_8UC1, Scalar::all(255));
mask(roi).setTo(Scalar::all(0));

det->detect(M,kp,mask);

The detect method crashes with:

OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)si
ze.p[0] && (unsigned)(i1*DataType<_Tp>::channels) < (unsigned)(size.p[1]*channel
s()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3
) - 1))*4) & 15) == elemSize1()) in unknown function, file C:\slave\builds\WinIn
stallerMegaPack\src\opencv\modules\core\include\opencv2/core/mat.hpp, line 545

If i simply use ORB

Ptr<FeatureDetector> det = new OrbFeatureDetector();

with the same code the detect works just fine. (It works with Surf and Brisk detector too. It's just SIFT that crashes =/)

Note

If i use sift in Release mode the code doesnt' crash (because the ASSERT is never executed)

Note2

I have OpenCV 2.4.5 with Windows 8 64bit (and Visual studio 2012)

Full stack when crashes:crashes (only in debug mode using and SIFT detector):

image description

testMask() line 303 is the line that follows the call to ->detect

Debug mode: Detector Mask works with ORB, crashes with Sift (bug) ?

I am using a simple code to extract keypoint outside a ROI. The code works with ORB but not with SIFT. Code:

vector<KeyPoint> kp;
Mat d;
string image = "image.png";

Mat M = imread(image,0);

//Ptr<FeatureDetector> det = new OrbFeatureDetector();   //> WORKS
Ptr<FeatureDetector> det = new SiftFeatureDetector();    //> CRASH at .detect

Rect roi(100,100,70,70);
Mat mask(M.size(), CV_8UC1, Scalar::all(255));
mask(roi).setTo(Scalar::all(0));

det->detect(M,kp,mask);

The detect method crashes with:

OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)si
ze.p[0] && (unsigned)(i1*DataType<_Tp>::channels) < (unsigned)(size.p[1]*channel
s()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3
) - 1))*4) & 15) == elemSize1()) in unknown function, file C:\slave\builds\WinIn
stallerMegaPack\src\opencv\modules\core\include\opencv2/core/mat.hpp, line 545

If i simply use ORB

Ptr<FeatureDetector> det = new OrbFeatureDetector();

with the same code the detect works just fine. (It works with Surf and Brisk detector too. It's just SIFT that crashes =/)

Note

If i use sift in Release mode the code doesnt' crash (because the ASSERT is never executed)

Note2

I have OpenCV 2.4.5 with Windows 8 64bit (and Visual studio 2012)

Full stack when crashes (only in debug mode using and SIFT detector):

image description

testMask() line 303 is the line that follows the call to ->detect

Debug mode: Detector Mask works with ORB, crashes with Sift (bug) ?

I am using a simple code to extract keypoint outside a ROI. The code works with ORB but not with SIFT. Code:

vector<KeyPoint> kp;
Mat d;
string image = "image.png";

Mat M = imread(image,0);

//Ptr<FeatureDetector> det = new OrbFeatureDetector();   //> WORKS
Ptr<FeatureDetector> det = new SiftFeatureDetector();    //> CRASH at .detect

Rect roi(100,100,70,70);
Mat mask(M.size(), CV_8UC1, Scalar::all(255));
mask(roi).setTo(Scalar::all(0));

det->detect(M,kp,mask);

The detect method crashes with:

OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)si
ze.p[0] && (unsigned)(i1*DataType<_Tp>::channels) < (unsigned)(size.p[1]*channel
s()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3
) - 1))*4) & 15) == elemSize1()) in unknown function, file C:\slave\builds\WinIn
stallerMegaPack\src\opencv\modules\core\include\opencv2/core/mat.hpp, line 545

If i simply use ORB

Ptr<FeatureDetector> det = new OrbFeatureDetector();

with the same code the detect works just fine. (It works with Surf and Brisk detector too. It's just SIFT that crashes =/)

Note

If i use sift in Release mode the code doesnt' crash (because the ASSERT is never executed)

Note2

I have OpenCV 2.4.5 with Windows 8 64bit (and Visual studio 2012)

Full stack when crashes (only in debug mode using and SIFT detector):

image description

testMask() line 303 is the call to ->detect