1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

refactored HoughLines (converted it into Algorithm)

This commit is contained in:
Vladislav Vinogradov
2013-04-30 12:51:33 +04:00
parent 48fb8c4f8a
commit 1652540a1f
6 changed files with 325 additions and 118 deletions
+4 -2
View File
@@ -94,11 +94,13 @@ GPU_TEST_P(HoughLines, Accuracy)
cv::Mat src(size, CV_8UC1);
generateLines(src);
cv::Ptr<cv::gpu::HoughLinesDetector> hough = cv::gpu::createHoughLinesDetector(rho, theta, threshold);
cv::gpu::GpuMat d_lines;
cv::gpu::HoughLines(loadMat(src, useRoi), d_lines, rho, theta, threshold);
hough->detect(loadMat(src, useRoi), d_lines);
std::vector<cv::Vec2f> lines;
cv::gpu::HoughLinesDownload(d_lines, lines);
hough->downloadResults(d_lines, lines);
cv::Mat dst(size, CV_8UC1);
drawLines(dst, lines);