摘要
针对Hough变换检测计算量巨大,而且检测结果含有大量虚假直线的问题,利用双色像素(TCP)与矢量内积过滤作为Hough变换输入的边缘点。将图像划分为若干子图,利用TCP算法得到每个子图中潜在的直线段;计算Canny边缘点的梯度方向;再计算边缘点梯度与其所在子图直线段方向矢量之间的内积,作为判定边缘点是否位于直线上的依据。为了提高算法的效率,可用CUDA并行分层算法加速TCP的计算。由于过滤了大量的边缘点,使得Hough变换的计算量大大减少,同时提高了Hough变换的直线检测准确度。实验表明,该算法可以高效、准确地检测出图像中的主要直线。
In view of the large amount of calculation of the Hough transform, and the problem of lots of false straight lines contained in the detection result, a novel algorithm was proposed which used TCP ( Two-Colored Pixel) with vector inner product to filter the input edge-points of the Hough transform. Firstly, an image was divided into several subimages, TCP algorithms was used to get the potential straight segments in each subimage; secondly, the gradient direction of each edge- point detected by Canny operator was determined, and then the inner product of the gradient of each edge-point and its subgraph TCP-line's direction vector was calculated; the value of inner product for an edge-point was finally served as its determinant for whether it lied on a straight line. In order to improve the efficiency of the algorithm, CUDA parallel layered algorithm was exploited to accelerate the calculation of TCP. Because a large number of edge-points were filtered, the amount of calculation of the Hough transform was greatly reduced, and as a result the accuracy of straight line detection was also to be improved. Experiments show that the algorithm can efficiently and accurately detect the main straight lines of an image.
出处
《计算机应用》
CSCD
北大核心
2014年第A01期196-198,共3页
journal of Computer Applications
基金
国家自然科学基金资助项目(61370166)
关键词
直线检测
HOUGH变换
双色像素
内积
line detection
Hough transform
Two-Colored Pixel (TCP)
inner product