[Paper Review] Performance Comparison Between OpenCV Built in CPU and GPU Functions on Image Processing Operations
This paper evaluates the performance difference between OpenCV's CPU and GPU-accelerated implementations of common image processing operations using CUDA. It demonstrates that GPU-accelerated functions significantly outperform CPU versions in tasks like convolution, Fourier transforms, and edge detection due to parallel processing, with speedups ranging from 2x to over 10x depending on image size and operation complexity.
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.
Motivation & Objective
- To evaluate the computational performance difference between OpenCV’s built-in CPU and GPU functions for image processing operations.
- To identify which image processing operations benefit most from GPU acceleration using CUDA.
- To quantify the performance gain achieved by leveraging parallel processing on GPUs over traditional serial CPU processing.
- To provide empirical benchmarks for developers choosing between CPU and GPU execution in OpenCV-based applications.
Proposed method
- Implementation of common image processing operations (e.g., convolution, edge detection, Fourier transforms) using OpenCV’s CPU and GPU modules.
- Utilization of NVIDIA’s CUDA platform to enable GPU acceleration in OpenCV’s GPU module (cv::gpu::).
- Benchmarking of execution times across various image sizes and operations on identical hardware to ensure fair comparison.
- Measurement of performance improvement via speedup ratio (CPU time / GPU time) for each operation.
- Use of standardized test images and consistent programming practices to isolate the effect of processing unit (CPU vs GPU).
- Analysis of results focusing on scalability with increasing image dimensions and operation complexity.
Experimental results
Research questions
- RQ1How do OpenCV’s CPU and GPU implementations of image processing operations compare in terms of execution time?
- RQ2Which image processing operations show the highest performance gain when migrated from CPU to GPU?
- RQ3How does image size affect the relative performance advantage of GPU over CPU in OpenCV?
- RQ4To what extent does GPU acceleration via CUDA improve real-time image processing capabilities in OpenCV?
- RQ5Are there specific operations where the GPU implementation does not outperform the CPU, and if so, why?
Key findings
- GPU-accelerated OpenCV functions achieved speedups of up to 10.3x for large-scale convolution operations compared to CPU versions.
- Fourier Transform operations showed a consistent 5x to 8x performance improvement on GPU across all tested image sizes.
- Edge detection using Canny and Sobel filters achieved approximately 3x to 5x speedup on GPU, depending on image resolution.
- For small images (e.g., 320x240), the performance gap was smaller due to GPU launch overhead, but it widened significantly with larger images.
- The performance advantage of GPU processing was most pronounced in compute-intensive operations like matrix multiplication and filtering.
- The study confirms that GPU acceleration via CUDA in OpenCV is highly effective for real-time and high-throughput image processing workloads.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.