Clarity is an image processing application developed using the OpenCV library. It supports various image processing functionalities, including Gaussian blur, grayscale conversion, and brightness adjustment. The project integrates OpenCV C++ API and is designed for Linux environments.
Ensure the following tools are installed on your system:
- C++ Compiler (e.g.,
g++) - Git (for cloning repositories)
- CMake (for building OpenCV)
- Make (to compile the build system)
-
Install Required Packages: Use the following command to install essential dependencies:
sudo apt update && sudo apt install -y build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev -
Clone the OpenCV Repository:
git clone https://github.com/opencv/opencv.git
-
Build and Install OpenCV:
- Navigate to the OpenCV directory:
cd opencv - Create a build directory:
mkdir build && cd build
- Generate the build configuration:
cmake ..
- Compile the library:
make -j$(nproc) - Install OpenCV:
sudo make install
- Navigate to the OpenCV directory:
-
Verify Installation: Test if OpenCV is installed correctly by checking the version:
pkg-config --modversion opencv4
To compile the source code, use the following command:
g++ -o clarity main.cpp -lopencv_core -lopencv_highgui -lopencv_imgprocRun the compiled application with an image path as input:
./clarity <image_path>