Skip to main content
QUICK REVIEW

[论文解读] Performance Comparison Between OpenCV Built in CPU and GPU Functions on Image Processing Operations

Batuhan Hangün, Önder Eyecioğlu|arXiv (Cornell University)|Jun 20, 2019
Image Enhancement Techniques参考文献 5被引用 9
一句话总结

本文使用CUDA评估了OpenCV的CPU与GPU加速实现常见图像处理操作的性能差异。结果表明,由于并行处理的优势,GPU加速函数在卷积、傅里叶变换和边缘检测等任务中显著优于CPU版本,速度提升范围从2倍到10倍以上不等,具体取决于图像大小和操作复杂度。

ABSTRACT

Image Processing is a specialized area of Digital Signal Processing which contains various mathematical and algebraic operations such as matrix inversion, transpose of matrix, derivative, convolution, Fourier Transform etc. Operations like those require higher computational capabilities than daily usage purposes of computers. At that point, with increased image sizes and more complex operations, CPUs may be unsatisfactory since they use Serial Processing by default. GPUs are the solution that come up with greater speed compared to CPUs because of their Parallel Processing/Computation nature. A parallel computing platform and programming model named CUDA was created by NVIDIA and implemented by the graphics processing units (GPUs) which were produced by them. In this paper, computing performance of some commonly used Image Processing operations will be compared on OpenCV's built in CPU and GPU functions that use CUDA.

研究动机与目标

  • 评估OpenCV内置CPU与GPU函数在图像处理操作中的计算性能差异。
  • 识别在使用CUDA进行GPU加速时,哪些图像处理操作受益最大。
  • 量化利用GPU上的并行处理相较于传统串行CPU处理所获得的性能提升。
  • 为开发者在基于OpenCV的应用中选择CPU或GPU执行提供实证基准。

提出的方法

  • 使用OpenCV的CPU与GPU模块实现常见图像处理操作(如卷积、边缘检测、傅里叶变换)。
  • 利用NVIDIA的CUDA平台在OpenCV的GPU模块(cv::gpu::)中实现GPU加速。
  • 在相同硬件上对不同图像尺寸和操作的执行时间进行基准测试,以确保公平比较。
  • 通过速度提升比(CPU时间 / GPU时间)测量每项操作的性能改进。
  • 使用标准测试图像并保持一致的编程实践,以隔离处理单元(CPU与GPU)的影响。
  • 重点分析图像尺寸和操作复杂度增加时的可扩展性。

实验结果

研究问题

  • RQ1OpenCV的CPU与GPU实现的图像处理操作在执行时间上如何比较?
  • RQ2将哪些图像处理操作从CPU迁移到GPU后性能提升最大?
  • RQ3图像大小如何影响GPU相对于CPU的相对性能优势?
  • RQ4通过CUDA实现的GPU加速在多大程度上提升了OpenCV中的实时图像处理能力?
  • RQ5是否存在GPU实现并未优于CPU的特定操作?若存在,原因是什么?

主要发现

  • 对于大规模卷积操作,GPU加速的OpenCV函数相比CPU版本实现了高达10.3倍的速度提升。
  • 傅里叶变换操作在所有测试图像尺寸下均表现出稳定的5倍至8倍性能提升。
  • 使用Canny和Sobel滤波器进行边缘检测在GPU上实现了约3倍至5倍的速度提升,具体取决于图像分辨率。
  • 对于小图像(如320x240),性能差距较小,这是由于GPU启动开销所致;但随着图像增大,性能差距显著扩大。
  • GPU处理的性能优势在计算密集型操作(如矩阵乘法和滤波)中最为明显。
  • 本研究证实,通过CUDA在OpenCV中实现GPU加速,对实时和高吞吐量图像处理工作负载具有高度有效性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。