Prewitt算法是数字图像分割中最常用的边缘检测算法。采用传统CPU上的串行方法实现该算法需要较大的计算量、耗时较长,因此,通过GPU对其进行性能加速有着重要的意义。然而由于GPU硬件体系结构的差异性,跨平台移植是一件非常困难的工作。针对上述问题,提出了一种基于OpenCL异构框架的Prewitt图像边缘检测并行算法。实验结果表明,该并行算法比CPU上的串行算法运行速度快,加速比可达30倍,有效地提高了大规模数据处理的效率,可移植性好,具有较高的应用价值。
Prewitt algorithm is the most commonly used edge detection algorithm in digital image segmentation,but large amount of calculations and great time consumption are needed to be suffered if traditional CPU serial method is used to imple-ment the algorithm. Therefore,it is important to accelerate its performance by GPU. However,the cross platform transplantation is very difficult because of the difference of GPU hardware system structure. In view of the above questions,a parallel algorithm of Prewitt image edge detection based on OpenCL heterogeneous framework is proposed. The experimental results show that the running speed of the parallel algorithm is faster than that of the serial algorithm in CPU,and its speedup ratio is 30 times as the serial algorithm. It improved the efficiency of large-scale data processing effectively. It has good portability and high application value.