I need yours help.
source code is here.(opencv version is 3.0)
...
#include "opencv2/opencv.hpp" #include "opencv2\cuda.hpp" #include "opencv2\cudaimgproc.hpp" using namespace cv; int main(int, char) { Mat pictureBGR; Mat pictureSegment; pictureBGR = imread("2.png"); //unos slike za pretragu cuda::GpuMat bgr; cuda::GpuMat convertedBgr; cuda::GpuMat dstBgr; bgr.upload(pictureBGR); cuda::cvtColor(bgr, convertedBgr, CV_BGR2BGRA); TermCriteria criteria(CV_TERMCRIT_EPS, 0, 0.08); cuda::meanShiftSegmentation(convertedBgr, dstBgr, 20, 20, 3, criteria); dstBgr.download(pictureSegment); namedWindow("Display Image", CV_WINDOW_AUTOSIZE); imshow("Display Image", pictureSegment); waitKey(0); return 0; }...
error message is here.
OpenCV Error: The function/feature is not implemented (You should explicitly call download method for cuda::GpuMat object) in getMat_, file /home/zburazin/opencv-3.0.0/modules/core/src/matrix.cpp, line 1211
terminate called after throwing an instance of 'cv::Exception'
what(): /home/zburazin/opencv-3.0.0/modules/core/src/matrix.cpp:1211: error: (-213) You should explicitly call download method for cuda::GpuMat object in function getMat_
http://study.marearts.com/2014/12/opencv-meanshiftfiltering-example.html
But nothing changed with the different version of the old code.
Someone know this cause?
Thank you.
there is a library for cuda that generated by CMake, right?
ReplyDeletecuda::meanShiftFiltering(convertedBgr, dstBgr, 20, 20, criteria);
Deleteis ok.
"cuda::meanShiftSegmentation" returns normal Mat
meanShiftProc() and meanShiftFiltering() return GpuMat.
Hi I had a same error in warpPerspective (Opencv3.2.0)
ReplyDeleteDid you resolve it?