Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

Why cuda::ORB detectAndCompute's useProvidedKeypoints parameter is forced to be false?

$
0
0
Hi Everyone, I would like to use cuda::orb compute or detectAndCompute method to describe keypoints that I detect earlier. But when I try to use these methods I got "Assertion failed (useProvidedKeypoints == false) in detectAndCompute" error. When I search on the source code, I see void ORB_Impl::detectAndCompute(InputArray _image, InputArray _mask, std::vector& keypoints, OutputArray _descriptors, bool useProvidedKeypoints){ CV_Assert( useProvidedKeypoints == false ); ... Why does the function takes a useProvidedKeypoints parameter that is forced to be equal to false? Is there another way to achieve my goal? Code Sample : cv::cuda::GpuMat gpu_img; cv::cuda::GpuMat dst; cv::Mat img = cv::imread("Lena.pgm", CV_LOAD_IMAGE_GRAYSCALE); gpu_img.upload(img); cv::Ptr orb = cv::cuda::ORB::create(); std::vector keypoints; orb->detect(gpu_img, keypoints); // reason not to use detectAndCompute method only, I detect keypoints earlier and do some calculations to produce new keypoints based on old ones, then I need to describe new ones. orb->compute(gpu_img, keypoints,dst); // same with orb->detectAndCompute(gpu_img, noArray(), keypoints,dst, true);

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>