This repository contains a Jupyter notebook that demonstrates various image processing techniques using OpenCV, with a focus on leveraging GPU acceleration through CUDA on Google Colab. The notebook covers the basics of working with images, including displaying images, manipulating pixel data, and utilizing CUDA for enhanced performance.
- Introduction
- Setup and Requirements
- Usage
- CUDA Acceleration
- Running the Notebook
- Contributing
- License
Images are composed of pixels, each with attributes like location, color, and proximity to other pixels. OpenCV (Open Source Computer Vision Library) is a popular tool in the machine learning community for image processing. This notebook demonstrates how to use OpenCV in Python, particularly focusing on the integration of CUDA for GPU-accelerated image processing.
To run this notebook, you will need the following:
- Google Colab (recommended due to the GPU support)
- OpenCV with CUDA support
- Python libraries:
cv2
,numpy
,matplotlib
,PIL
The notebook includes steps for setting up OpenCV with CUDA on Google Colab. This involves installing the necessary dependencies, cloning the OpenCV repositories, configuring the build with CMake, and compiling the source code.
This notebook showcases several key functionalities:
- Displaying Images: Methods for displaying images using OpenCV and IPython.
- Image Manipulation: Techniques for manipulating pixel data, such as converting images to grayscale or altering color channels.
- Random Image Generation: Creation of random images using numpy arrays and saving them as files.
- GPU Acceleration: Usage of CUDA-enabled functions in OpenCV to accelerate image processing tasks.
OpenCV provides CUDA-enabled libraries that significantly speed up image processing tasks by utilizing the GPU. This notebook contains examples of:
- Applying Contrast Limited Adaptive Histogram Equalization (CLAHE) using both CPU and GPU versions.
- The setup and processing differences when using CUDA in OpenCV.
- Open the notebook in Google Colab.
- Follow the instructions to mount your Google Drive (if needed).
- Install the required dependencies and set up OpenCV with CUDA.
- Execute the cells sequentially to understand and apply various image processing techniques.
Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.
git clone https://github.com/krishnapatel1722/Image-Processing-with-OpenCV-and-CUDA-on-Google-Colab.git