Skip to content

stalidzane/image-processing

Repository files navigation

Image Processing Exercises

This repository contains a series of foundational image processing exercises implemented in Python. The projects explore classical computer vision techniques such as image filtering, frequency-domain processing, segmentation, color analysis, and feature-based classification.

All exercises are implemented using standard scientific Python libraries (NumPy, scikit-image, Matplotlib), with a focus on understanding the underlying mathematical and algorithmic principles rather than relying on high-level black-box functions.


Repository Structure

  • E1_image_merging/ – Manual image stitching and photometric adjustment
  • E2_image_sharpening/ – Custom image sharpening using convolution filters
  • E3_color_isolation/ – Color-based segmentation and grayscale transformation
  • E4_superpixel_analysis/ – Superpixel extraction and clustering analysis
  • E5_texture_classification/ – Feature-based texture classification

Project Overview

1. Manual Panorama Construction

A simple panorama is created by manually aligning two overlapping grayscale images.

Key steps:

  • Load and convert images to grayscale
  • Estimate translation alignment manually
  • Merge images into a single panoramic output
  • Apply gamma correction to match brightness characteristics

2. Image Sharpening via Custom Filtering

Implementation of a custom sharpening filter using Gaussian smoothing and identity kernels.

Key steps:

  • Construct Gaussian blur filter
  • Construct identity filter
  • Combine filters to form a sharpening kernel
  • Apply convolution to enhance image details
  • Visualize both kernel and output image

3. Color-Based Segmentation

A script that isolates red regions in an image while converting all other regions to grayscale.

Key steps:

  • Convert image to HSV color space
  • Define a saturation-aware red mask (handling hue wrap-around)
  • Apply selective grayscale transformation
  • Reconstruct and visualize hybrid output

4. Superpixel Analysis and Clustering

Exploration of superpixels for image segmentation and structural simplification.

Key steps:

  • Decompose image into superpixels
  • Extract region-based statistics
  • Represent image regions using feature vectors
  • Apply clustering to group visually similar regions

5. Texture Classification

A basic texture classification pipeline using handcrafted features.

Key steps:

  • Extract statistical features (mean, variance)
  • Compute color histograms
  • Analyze gradient direction distributions
  • Classify textures (buffalo, elephant, zebra patterns)

Note: This exercise was implemented and tested in Google Colab.


Technologies Used

  • Python 3.x
  • NumPy
  • scikit-image
  • Matplotlib
  • scikit-learn (for clustering and classification tasks)
  • Google Colab (for Experiment 5)

Key Learning Outcomes

  • Image filtering and convolution
  • Manual image alignment techniques
  • Color space transformations (RGB → HSV)
  • Feature extraction for vision tasks
  • Superpixel-based image representation
  • Basic texture classification methods

About

Laboratory activity of traditional image processing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors