python-numpy-image-manipulation
README.md

Mini Image Filters App with Python and NumPy

This repository showcases a mini image filters application developed mainly using Python and NumPy. It serves as a demonstration of my utilization of Python and NumPy libraries for image processing tasks.

Features

  • Image Loading and Saving: Load images in various formats (JPEG, PNG, etc.) and save processed images.
  • Image Display: View loaded images and processed results with an intuitive user interface.
  • Filters: Apply various basic image filtering operations as follows:
    • NoRed: this removes all red shades from the image
    • NoGreen: this removes all green shades from the image
    • NoBlue: this removes all blue shades from the image
    • RedOnly: this keeps only red shades in the image
    • GreenOnly: this keeps only green shades in the image
    • BlueOnly: this keeps only blue shades in the image
    • Grayscale: this converts a colored image to grayscale
    • AddNoise: this adds the aged film/grainy effect to the image by adding random noise
    • Smooth: this smoothens the high-gradient color changes across the image (e.g. edges) to give a more natural feel to the image
    • Normalize: this corrects overly bright or overly dark images by tuning its dynamic range to be 0-255
    • Threshold: this reduces the colors in the image from millions to only 8 colors
    • HorizontalMirror: this flips the image horizontally
    • Binarize: this creates a threshold effect on a converted colored image to grayscale (i.e. showing shades of 2 colors: B&W)
    • Dilate: this replaces all pixels by the max of a pixel and its 3x3 neighbors
    • Erode: this replaces all pixels by the minimum of a pixel and its 3x3 neighbors

Requirements

  • python = 3.7
  • numpy = 1.21.1
  • Pillow = 8.3.1
  • PySimpleGUI = 4.45.0
  • pytest = 6.2.4
  • mypy = 0.910

Run Main Program

To run the program, install the dependencies above (also available in requirements.txt) and run gui.py

License

This project is not licensed for any usage. The code and its associated resources are provided solely for demonstration purposes and cannot be used, copied, or distributed by any means.

I hope this repository demonstrates my proficiency in Python and NumPy, showcasing my ability to develop efficient and reliable image manipulation applications. Feel free to explore the code and experiment with different manipulations within the confines of this demonstration-only environment.