Skip to content

A simple yet powerful image processing pipeline that supports grayscale conversion, Gaussian blur, Sobel edge detection, Canny edge detection, and histogram visualization.

License

Notifications You must be signed in to change notification settings

pabs-code/mini-cv-pipeline-with-streamlit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project Overview

Project Name: Mini-Computer-Vision Pipeline with Streamlit
Description: A simple yet powerful image processing pipeline using OpenCV, NumPy, and Streamlit. It supports grayscale conversion, Gaussian blur, Sobel edge detection, Canny edge detection, and histogram visualization.


Table of Contents


Features

  • Image Upload: Supports .jpg, .jpeg, and .png formats.
  • Grayscale Conversion: Converts uploaded images to grayscale.
  • Gaussian Blur: Smooths the image using Gaussian blur.
  • Edge Detection:
    • Sobel Edge Detection
    • Canny Edge Detection
  • Histogram Visualization: Displays the intensity distribution of grayscale images.
  • Interactive UI with Streamlit: Simple and intuitive interface for end-users.

Installation

To install the required dependencies, run:

pip install streamlit opencv-python numpy pillow

✅ Make sure you have Python 3.8+ installed.

To run the application:

streamlit run app.py

Usage

  1. Run the Streamlit App:

    streamlit run app.py
  2. Upload an Image:

    • Click on the Choose an image... button.
    • Select a .jpg, .jpeg, or .png file.
  3. View the Results:

    • Grayscale image, blurred image, Sobel edges, and Canny edges will be displayed.
    • A histogram of the grayscale image will appear below.

Example Screenshot and Video

Example of steps for CV pipeline using streamlit

Step Description
1 Original Image Loaded
2 Grayscale Converted
3 Gaussian Blur Applied
4 Sobel Edge Detection Output
5 Canny Edge Detection Output
6 Grayscale Histogram Displayed

Example Video

📷 Video of CV Pipeline Streamlit

cv-pipeline.mp4

Filtering Techniques and Metrics Definitions

Technique Description Metric
Grayscale Conversion Converts RGB image to grayscale using OpenCV's cvtColor. Pixel intensity values (0-255)
Gaussian Blur Smooths the image by applying a Gaussian kernel. Kernel size, sigma value
Sobel Edge Detection Detects edges using the Sobel operator. Gradient magnitude, direction
Canny Edge Detection Multi-stage edge detection using hysteresis. Two thresholds (low, high)
Histogram Shows the frequency of pixel intensities in grayscale. Intensity range (0-255)

Example Use Case

Use Case: Detect edges in a scanned document for OCR processing.

Steps:

  1. Upload a scanned image of a document.
  2. Convert to grayscale and apply Gaussian blur to reduce noise.
  3. Use Canny edge detection to extract the document's edges.
  4. Process the image for further text recognition or segmentation.

Outcome: Clean, edge-detected document ready for OCR processing.


Summary

This project provides a complete image processing pipeline with interactive visualization using Streamlit. It is ideal for developers and researchers who need a simple, customizable image processing tool with support for edge detection, noise reduction, and histogram analysis.


MIT License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A simple yet powerful image processing pipeline that supports grayscale conversion, Gaussian blur, Sobel edge detection, Canny edge detection, and histogram visualization.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages