目的边缘是图像的重要特征之一,是后续测量、基于形状配准的基础,为了更好地获得图像中的边缘信息,提出一种利用积分图块间距离检测图像边缘的方法。方法首先,分析欧氏距离图理论,给出采用局部区块内和距离的方式检测图像边缘的方法。其次,提出采用积分图完成高斯模板块内求和算法,并利用这种方法加速完成了图像块内像素求和,以此提高算法的执行速度。最后,给出了本文算法的执行流程。结果以人工标注模拟图像的边缘为标准,采用本文方法得到的边缘检测结果重叠率高于97%,Canny算法的重叠率为80%、高斯曼哈顿距离与欧式距离算法的重叠率分别低于63%和28%。从真实图像实验结果上看,随着图像尺寸的增加,Canny与本文方法的执行时间均略有增加,但幅度不大,在处理1024×768的图像时分别耗时1.7s与4.6s。由于本文方法增加了积分图及块内和的求解,因此耗时略高于Canny方法。综上,采用本文方法获得的边缘检测结果不仅具备较高的重叠率,而且执行时间较少,其执行速度不会随图像尺寸的增加而大幅度降低。结论由实验结果可见,本文提出的图像边缘检测方法具备较高的准确性与实用性。由于本文方法具备较高的执行速度,因此适用于所有以边缘检测结果为基础的后期图像处理技术,包括对于实时性要求较高的视频流边缘检测与分析。
Objective Edges are important image features that serve as basis of follow -up measurement and shape registra- tion. To achieve good edge information, an edge detection method of block distance combined with summed area table is proposed in this work. The major innovation points of this study are as follows. 1 ) The edge of an image is detected by local block distance. 2 ) The sum of block pixels is accelerated by an integral diagram, and the method for completing a Gauss template block with an integral map is modified to improve the execution efficiency. Method The pixel difference of each block is computed. The pixel difference values are then accumulated to detect the edge of an image. The principle of this method is as follows : 1 ) the difference accumulation for gray regions tends to be zero, and 2) the difference accumulation for edge regions is different. The neighborhood features are then considered in a small range by comparing the differences among all the pixels in the adjacent region to determine the gradient of the central position. The structure of the Gauss template is analyzed, and the algorithm execution efficiency is improved by introducing an integral diagram. The size of the Gauss template is determined according to the rectangular area by using the integral diagram. The elements of the integral diagram, which are all ones, are constructed on the basis of the size of the Gauss template, whereas those, which are all zeros, are constructed on the basis of the size of the rectangular area. Then, the matrix of ones is used to achieve ergodicity for the matrix of zeros. Subsequently, the traversal times of each unit in the rectangular area after the completion of the traversal are obtained. A matrix of the traversal times could thus be formed and is then decomposed into the matrix of multiple ones until further decomposition is no longer possible. According to the matrix block of ones obtained after the decomposition, the pixels of the central points could be accumulated by the integral