Skip to content

SarahAbuirmeileh/Image_processing

Repository files navigation

Image Processing Projects

This repository contains a collection of image processing programs implemented in Python. Each project demonstrates fundamental image processing techniques such as thresholding, edge detection, segmentation, and video cartoonization. The projects were implemented as standalone scripts to demonstrate practical applications and concepts.


Table of Contents


1. Image Thresholding

This program applies thresholding to an input image. Only the pixels within a defined intensity range are preserved, while all others are set to black.

Features:

  • Read grayscale images or convert color images to grayscale.
  • Accept two threshold values (0–255) as input.
  • Generate a new image containing only pixels within the threshold range.

Example Output:

  • Original vs. Thresholded Image

2. Edge Detection with Gradient Operators

This program detects edges in grayscale images using the Sobel operator.

Features:

  • Apply convolution with the Sobel kernel to compute image gradients.
  • Threshold the gradient magnitude to detect edges.
  • Optionally apply smoothing before edge detection to reduce noise.

Example Output:

  • Edges detected with and without smoothing

3. Detection of Green Football Fields

This program identifies the green regions of football fields in images.

Features:

  • Process images to detect football field regions using color segmentation.
  • Highlight detected green regions with a red mask over the original image.

Example Output:

  • Original image with green football field highlighted in red

4. Coin Segmentation

This program segments coins in images while removing added text or background noise.

Workflow:

  1. Load the image and convert it to grayscale.
  2. Apply thresholding for initial segmentation.
  3. Use morphological operations (erosion, dilation, opening, closing) to remove noise and text.
  4. Fill holes inside coins generated by segmentation.
  5. Use the final mask to restore the original image without text.

Tips:

  • Experiment with different kernel sizes and operation combinations for best results.

Example Output:

  • Original image → segmented coins → restored image

5. Video Cartoonization

This program cartoonizes videos by applying a watercolor-inspired effect to each frame.

Features:

  • Process video frame by frame for cartoon effect.
  • Control the number of colors and edge thickness (via edge dilation).
  • Output a fully processed cartoonized video.

Example Output:

  • Original video vs. cartoonized video

About

This repository contains a collection of image processing programs implemented in Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages