Farid-Hamid-4 / image-processor

Image sharpener and noise remover command line interface in Python using Nvidia's Warp library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image Processor

A Python project that provides functionalities to sharpen or apply noise removal to an image. It utilizes Nvidia's Warp library for efficient parallel computation.

Prerequisites

  • Python 3.x
  • NumPy
  • Pillow
  • Nvidia Warp library

Installation

pip install -r requirements.txt

Usage

python3 image_processing.py flag kernel_size parameter input_file output_file
  • flag: Specify -n for noise removal or -s for sharpening.
  • kernel_size: Size of the kernel for mean filtering or unsharp masking. Must be an odd integer greater than 0.
  • parameter: The parameter for unsharp masking. A floating-point value.
  • input_file: Path to the input image file.
  • output_file: Path to save the processed output image.

Examples

Noise Removal

To apply noise removal to a grayscale image with a kernel size of 3, run the following command:

python3 image_processing.py -n 3 0.5 input_image.png output_image.png

Sharpening

To perform image sharpening on a color image with a kernel size of 5 and a parameter of 0.8, run the following command:

python3 image_processing.py -s 5 0.8 input_image.png output_image.png

Algorithms

  • The unsharp masking algorithm is used to sharpen the image.
  • The mean average filtering algorithm is used for noise removal.

About

Image sharpener and noise remover command line interface in Python using Nvidia's Warp library.


Languages

Language:Python 100.0%