Skip to content

Arief-AK/OpenCL-Development-Real-time-Image-Processing

Repository files navigation

OpenCL-Development: Real-time Image Processing

Build Release

Application of OpenCL for real-time image processing on embedded hardware. This work demonstrates the development of image processing methods such as grayscale conversion, edge-detection, and Gaussian blur. The outcome of this project is to highlight OpenCL's praticality for real-world scenarios.

Original         Grayscale         Gaussian Blur         Edge-detection

Note

Realtime Preview

Preview gif

OpenCL setup

OpenCL is typically packaged with graphic drivers from vendors like AMD, Intel, and NVIDIA. To ensure that OpenCL is properly installed on your system, install the latest graphic drivers on your device.

Linux

On Linux machines, it is recommended to install the ocl-icd-opencl-dev package

sudo apt-get install ocl-icd-opencl-dev

OpenCV setup

All applications in this project utilises the OpenCV library. See the official OpenCV website.

Windows

Download the package from the official OpenCV website or its GitHub page.

Linux

On Linux machines, run the following command

sudo apt install libopencv-dev clinfo

CMake Setup

Note

Ensure that CMake is properly installed and added to the PATH environment variable on your machine. See CMake official documentation.

This project is developed using visual studio code IDE. The CMake Tools extension is used extensively within the project development. It is highly recommended that users develop with VS code with this extension.

Getting Started

Important

Ensure that camera source is available (webcam or USB camera).

To run the RealtimeImageProcessing application, run the following commands. This will build the RealtimeImageProcesing apllication in Release mode.

Windows

cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE --no-warn-unused-cli -S . -B build
cmake --build build --config Release
cd .\build\src\RealtimeImageProcessing\Release
.\RealtimeImageProcessing.exe

Linux

cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE --no-warn-unused-cli -S . -B build
cmake --build build --config Release
cd build/src/RealtimeImageProcessing/Release
./RealtimeImageProcessing