3
我在CPU上试过Hough,运行良好,速度稍慢。所以,我想在OpenCV的CUDA运行霍夫,但它表明这个错误,即使我有GpuMat -霍夫变换中的OpenCV GPU错误(功能未实现)
OpenCV Error: The function/feature is not implemented (getGpuMat is available only for cuda::GpuMat and cuda::HostMem) in cv::_InputArray::getGpuMat, file PATH\opencv-sources\modules\core\src\matrix.cpp, line 1454
这是我的代码(我流从现场摄像机帧,所以在while循环中) -
Ptr<HoughLinesDetector> houghLines = createHoughLinesDetector(1, CV_PI/180, 120);
vector<Vec2d> tmpLines;
vector<Vec2d> lines;
GpuMat imgCanny;
...
while(true) {
...
houghLines->detect(imgCanny, tmpLines);
houghLines->downloadResults(tmpLines, lines); // Error occurs here...
...
}
对此有何帮助?