Ask Your Question

Revision history [back]

Assertion fails in buildScalePyramids

I am currently using OpenCV 2.4.10 I had ORB working for feature extraction and matching. I am working on porting it to an AWS with GPU. I was finally able to build openCV and all but am now getting an assertion failure. From the call stack the only thing I figured out is that "ORB_CUDA::buildScalePyramids()" is calling "GpuMat::GpuMat(const GpuMat& m, Rect roi) " and the assertion in this function is failing. CV_Assert(0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows);

I also noticed that there is some difference in the code for building the scale pyramid in the regular orb.cpp compared to the one in gpu.

Assertion fails in buildScalePyramids

I am currently using OpenCV 2.4.10 I had ORB working for feature extraction and matching. I am working on porting it to an AWS with GPU. I was finally able to build openCV and all but am now getting an assertion failure. From the call stack the only thing I figured out is that "ORB_CUDA::buildScalePyramids()" is calling "GpuMat::GpuMat(const GpuMat& m, Rect roi) " and the assertion in this function is failing.

CV_Assert(0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows);

m.rows);

I also noticed that there is some difference in the code for building the scale pyramid in the regular orb.cpp compared to the one in gpu.

Assertion fails in buildScalePyramids

I am currently using OpenCV 2.4.10 I had ORB working for feature extraction and matching. I am working on porting it to an AWS with GPU. I was finally able to build openCV and all but am now getting an assertion failure. From the call stack the only thing I figured out is that ORB_CUDA::buildScalePyramids() is calling GpuMat::GpuMat(const GpuMat& m, Rect roi) and the assertion in this function is failing.

CV_Assert(0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows);

I also noticed that there is some difference in the code for building the scale pyramid in the regular orb.cpp compared to the one in gpu.

Edit 1: I am not creating any GpuMat or roi. That code is internal to the ORB implementation. My code is gpu::GpuMat image; Mat outImage;

gpu::ORB_GPU orb(nFeat, 1.2f, 20, 10, 0, 3, ORB::HARRIS_SCORE, 10 );
image.upload(img);
orb(image, gpu::GpuMat(), orbKeypoints, orbDescriptors);

Assertion fails in buildScalePyramids

I am currently using OpenCV 2.4.10 I had ORB working for feature extraction and matching. I am working on porting it to an AWS with GPU. I was finally able to build openCV and all but am now getting an assertion failure. From the call stack the only thing I figured out is that ORB_CUDA::buildScalePyramids() is calling GpuMat::GpuMat(const GpuMat& m, Rect roi) and the assertion in this function is failing.

CV_Assert(0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows);

I also noticed that there is some difference in the code for building the scale pyramid in the regular orb.cpp compared to the one in gpu.

Edit 1: I am not creating any GpuMat or roi. That code is internal to the ORB implementation. I only have a Mat img; which is a valid image and I have checked that the dimensions of this image are valid. My code is is

gpu::GpuMat image;
 Mat outImage;

outImage;
gpu::ORB_GPU orb(nFeat, 1.2f, 20, 10, 0, 3, ORB::HARRIS_SCORE, 10 );
image.upload(img);
orb(image, gpu::GpuMat(), orbKeypoints, orbDescriptors);

Assertion fails in buildScalePyramids

I am currently using OpenCV 2.4.10 I had ORB working for feature extraction and matching. I am working on porting it to an AWS with GPU. I was finally able to build openCV and all but am now getting an assertion failure. From the call stack the only thing I figured out is that ORB_CUDA::buildScalePyramids() is calling GpuMat::GpuMat(const GpuMat& m, Rect roi) and the assertion in this function is failing.

CV_Assert(0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows);

I also noticed that there is some difference in the code for building the scale pyramid in the regular orb.cpp compared to the one in gpu.

Edit 1: I am not creating any GpuMat or roi. That code is internal to the ORB implementation. I only have a Mat img; which is a valid image and I have checked that the dimensions of this image are valid. My code is

is
//Function:_getRawORBKeypoints()
    gpu::GpuMat image;
 Mat outImage;
 gpu::ORB_GPU orb(nFeat, 1.2f, 20, 10, 0, 3, ORB::HARRIS_SCORE, 10 );
 image.upload(img);
 orb(image, gpu::GpuMat(), orbKeypoints, orbDescriptors);
orbDescriptors);

Edit 2 The callstack :

#0  0x00007fffdbf725c9 in raise () from /lib64/libc.so.6
#1  0x00007fffdbf73cd8 in abort () from /lib64/libc.so.6
#2  0x00007fffdc876535 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib64/libstdc++.so.6
#3  0x00007fffdc8746c6 in ?? () from /usr/lib64/libstdc++.so.6
#4  0x00007fffdc8746f3 in std::terminate() () from /usr/lib64/libstdc++.so.6
#5  0x00007fffdc87491f in __cxa_throw () from /usr/lib64/libstdc++.so.6
#6  0x00007ffff722f5a0 in cv::error(cv::Exception const&) () from /usr/local/lib/libopencv_core.so.2.4
#7  0x00007ffff72cf62c in cv::gpu::GpuMat::GpuMat(cv::gpu::GpuMat const&, cv::Rect_<int>) () from /usr/local/lib/libopencv_core.so.2.4
#8  0x00007fffdd28d97a in cv::gpu::ORB_GPU::buildScalePyramids(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&) () from /usr/local/lib/libopencv_gpu.so.2.4
#9  0x00007fffdd28e072 in cv::gpu::ORB_GPU::operator()(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&, cv::gpu::GpuMat&, cv::gpu::GpuMat&) ()  from /usr/local/lib/libopencv_gpu.so.2.4
#10 0x00007fffdd28e789 in cv::gpu::ORB_GPU::operator()(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::gpu::GpuMat&) () from /usr/local/lib/libopencv_gpu.so.2.4
#11 0x000000000040650e in _getRawORBKeypoints(cv::Mat, int, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::gpu::GpuMat&, bool)    ()

Assertion fails in buildScalePyramids

I am currently using OpenCV 2.4.10 I had ORB working for feature extraction and matching. I am working on porting it to an AWS with GPU. I was finally able to build openCV and all but am now getting an assertion failure. From the call stack the only thing I figured out is that ORB_CUDA::buildScalePyramids() is calling GpuMat::GpuMat(const GpuMat& m, Rect roi) and the assertion in this function is failing.

CV_Assert(0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows);

I also noticed that there is some difference in the code for building the scale pyramid in the regular orb.cpp compared to the one in gpu.

Edit 1: I am not creating any GpuMat or roi. That code is internal to the ORB implementation. I only have a Mat img; which is a valid image and I have checked that the dimensions of this image are valid. My code is //Function:_getRawORBKeypoints() //Function:_getRawORBKeypoints()

gpu::GpuMat image; Mat outImage; gpu::ORB_GPU orb(nFeat, 1.2f, 20, 10, 0, 3, ORB::HARRIS_SCORE, 10 ); image.upload(img); orb(image, gpu::GpuMat(), orbKeypoints, orbDescriptors);

Edit 2 The callstack :

#0  0x00007fffdbf725c9 in raise () from /lib64/libc.so.6
#1  0x00007fffdbf73cd8 in abort () from /lib64/libc.so.6
#2  0x00007fffdc876535 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib64/libstdc++.so.6
#3  0x00007fffdc8746c6 in ?? () from /usr/lib64/libstdc++.so.6
#4  0x00007fffdc8746f3 in std::terminate() () from /usr/lib64/libstdc++.so.6
#5  0x00007fffdc87491f in __cxa_throw () from /usr/lib64/libstdc++.so.6
#6  0x00007ffff722f5a0 in cv::error(cv::Exception const&) () from /usr/local/lib/libopencv_core.so.2.4
#7  0x00007ffff72cf62c in cv::gpu::GpuMat::GpuMat(cv::gpu::GpuMat const&, cv::Rect_<int>) () from /usr/local/lib/libopencv_core.so.2.4
#8  0x00007fffdd28d97a in cv::gpu::ORB_GPU::buildScalePyramids(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&) () from /usr/local/lib/libopencv_gpu.so.2.4
#9  0x00007fffdd28e072 in cv::gpu::ORB_GPU::operator()(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&, cv::gpu::GpuMat&, cv::gpu::GpuMat&) ()  from /usr/local/lib/libopencv_gpu.so.2.4
#10 0x00007fffdd28e789 in cv::gpu::ORB_GPU::operator()(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::gpu::GpuMat&) () from /usr/local/lib/libopencv_gpu.so.2.4
#11 0x000000000040650e in _getRawORBKeypoints(cv::Mat, int, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::gpu::GpuMat&, bool)    ()

Assertion fails in buildScalePyramids

I am currently using OpenCV 2.4.10 I had ORB working for feature extraction and matching. I am working on porting it to an AWS with GPU. I was finally able to build openCV and all but am now getting an assertion failure. From the call stack the only thing I figured out is that ORB_CUDA::buildScalePyramids() is calling GpuMat::GpuMat(const GpuMat& m, Rect roi) and the assertion in this function is failing.

CV_Assert(0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows);

I also noticed that there is some difference in the code for building the scale pyramid in the regular orb.cpp compared to the one in gpu.

Edit 1: I am not creating any GpuMat or roi. That code is internal to the ORB implementation. I only have a Mat img; which is a valid image and I have checked that the dimensions of this image are valid. My code is //Function:_getRawORBKeypoints()Function:_getRawORBKeypoints()

gpu::GpuMat image;
Mat outImage;
gpu::ORB_GPU orb(nFeat, 1.2f, 20, 10, 0, 3, ORB::HARRIS_SCORE, 10 );
image.upload(img);
orb(image, gpu::GpuMat(), orbKeypoints, orbDescriptors);

orbDescriptors);

Edit 2 The callstack :

#0  0x00007fffdbf725c9 in raise () from /lib64/libc.so.6
#1  0x00007fffdbf73cd8 in abort () from /lib64/libc.so.6
#2  0x00007fffdc876535 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib64/libstdc++.so.6
#3  0x00007fffdc8746c6 in ?? () from /usr/lib64/libstdc++.so.6
#4  0x00007fffdc8746f3 in std::terminate() () from /usr/lib64/libstdc++.so.6
#5  0x00007fffdc87491f in __cxa_throw () from /usr/lib64/libstdc++.so.6
#6  0x00007ffff722f5a0 in cv::error(cv::Exception const&) () from /usr/local/lib/libopencv_core.so.2.4
#7  0x00007ffff72cf62c in cv::gpu::GpuMat::GpuMat(cv::gpu::GpuMat const&, cv::Rect_<int>) () from /usr/local/lib/libopencv_core.so.2.4
#8  0x00007fffdd28d97a in cv::gpu::ORB_GPU::buildScalePyramids(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&) () from /usr/local/lib/libopencv_gpu.so.2.4
#9  0x00007fffdd28e072 in cv::gpu::ORB_GPU::operator()(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&, cv::gpu::GpuMat&, cv::gpu::GpuMat&) ()  from /usr/local/lib/libopencv_gpu.so.2.4
#10 0x00007fffdd28e789 in cv::gpu::ORB_GPU::operator()(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::gpu::GpuMat&) () from /usr/local/lib/libopencv_gpu.so.2.4
#11 0x000000000040650e in _getRawORBKeypoints(cv::Mat, int, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::gpu::GpuMat&, bool)    ()