Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

25 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”Ž FindBlur

FindBlur Logo

FINDBLUR

Know before you post.

A practical computer-vision tool for detecting image blur and sharpness.

FindBlur combines Laplacian Variance and FFT-based frequency analysis to evaluate image detail and classify images as Sharp, Borderline, or Blurry.


Live Demo



Python Streamlit OpenCV NumPy Pandas



Live Demo ย  โ€ข ย  GitHub Repository


๐Ÿš€ Live Demo

Try FindBlur directly in your browser:

Upload an image, analyze multiple images, or capture an image using your camera.

Know before you post.


๐Ÿ“Œ Overview

FindBlur is a lightweight image sharpness and blur detection application built with Python, OpenCV, NumPy, Pandas, and Streamlit.

The idea is simple:

Check your image before you publish it.

Instead of relying on a single blur metric, FindBlur combines two complementary signals:

  • Laplacian Variance โ€” measures edge and fine-detail strength.
  • FFT Analysis โ€” evaluates high-frequency image information.

The signals are normalized, weighted, and combined into a final detection score.

The final result is classified into three practical categories:

Verdict Meaning
๐ŸŸข Sharp Strong image detail detected
๐ŸŸก Borderline Close to the threshold โ€” manual review recommended
๐Ÿ”ด Blurry Low image detail detected

โœจ Features

๐Ÿ” Dual-Metric Blur Detection

FindBlur uses two independent image-analysis signals:

Laplacian Variance
        +
FFT Frequency Analysis
        โ†“
Combined Score
        โ†“
Final Verdict

This provides a second signal instead of relying entirely on one measurement.


๐ŸŽฏ Three-Level Classification

FindBlur doesn't force every image into:

Sharp / Blurry

Instead, it uses:

๐ŸŸข Sharp
๐ŸŸก Borderline
๐Ÿ”ด Blurry

The Borderline category is useful when an image falls close to the configured threshold.


โš™๏ธ Adjustable Detection

Detection settings can be customized from the sidebar:

  • Laplacian threshold
  • Sensitivity mode
  • Borderline margin
  • Laplacian weight
  • FFT weight

The detection threshold is configurable rather than permanently fixed.


๐ŸŽš๏ธ Sensitivity Modes

Mode Behavior
๐Ÿ”ด Strict More aggressive blur detection
๐ŸŸก Balanced General everyday use
๐ŸŸข Lenient More tolerant of low-texture images

๐Ÿ–ผ๏ธ Single Image Check

Upload:

  • JPG
  • JPEG
  • PNG
  • WEBP

FindBlur provides:

  • Original image
  • Detail map
  • Edge map
  • Laplacian score
  • FFT score
  • Combined score
  • Confidence
  • Detection breakdown
  • Final verdict

๐Ÿ“ Batch Analysis

Analyze multiple images in one session.

Batch mode supports:

  • Multiple image uploads
  • Progress tracking
  • Thumbnail previews
  • Individual scores
  • Verdict filtering
  • Score sorting
  • Filename sorting
  • Manual review
  • CSV export

๐Ÿ“ท Live Camera

Use your browser camera to capture an image and analyze it immediately.

Camera
   โ†“
Capture
   โ†“
Analyze
   โ†“
Calculate Sharpness
   โ†“
Verdict

๐Ÿงช Visual Diagnostics

FindBlur provides visual information alongside numerical scores.

It generates:

  • Laplacian detail maps
  • Canny edge maps
  • Original image comparison

This helps users understand where image detail is being detected.


๐Ÿ“ Manual Review

Automated detection isn't perfect.

FindBlur allows results to be manually reviewed:

โœ… Correct
โš ๏ธ Disagree
โ—‹ Not Reviewed

Review information is maintained within the current Streamlit session.


๐Ÿ“Š CSV Export

Batch results can be exported for further analysis.

Typical result fields include:

Filename
Laplacian Score
FFT Score
Combined Score
Verdict
Review Status

๐Ÿ”ฌ How FindBlur Works

1. Laplacian Variance

The primary blur metric is calculated using:

cv2.Laplacian(gray, cv2.CV_64F).var()

The Laplacian responds strongly to rapid changes in image intensity.

These changes commonly occur around:

  • Edges
  • Object boundaries
  • Fine textures
  • Small details

Generally:

Higher Laplacian Variance
        โ†“
More edge/detail information
        โ†“
Potentially sharper image

while:

Lower Laplacian Variance
        โ†“
Less fine detail
        โ†“
Potentially blurrier image

2. FFT Analysis

FindBlur also uses Fast Fourier Transform (FFT) analysis.

FFT provides information about the frequency components present in an image.

Higher-frequency components are generally associated with:

  • Fine structures
  • Edges
  • Textures
  • Rapid intensity changes

This creates a second signal that can be compared with the Laplacian result.


3. Combined Score

The two signals are normalized before being combined.

Conceptually:

                  INPUT IMAGE
                       โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ–ผ                 โ–ผ
         LAPLACIAN              FFT
              โ”‚                 โ”‚
              โ–ผ                 โ–ผ
        Edge / Detail      Frequency Detail
              โ”‚                 โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                       โ–ผ
                  Normalization
                       โ”‚
                       โ–ผ
              Weighted Combination
                       โ”‚
                       โ–ผ
                 Combined Score
                       โ”‚
                       โ–ผ
                  Threshold Check
                       โ”‚
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ–ผ            โ–ผ            โ–ผ
       ๐ŸŸข Sharp    ๐ŸŸก Borderline   ๐Ÿ”ด Blurry

The default configuration gives greater weight to Laplacian analysis while FFT provides additional validation.


๐ŸŽฏ Why Borderline?

A low sharpness score does not always mean an image is actually blurry.

For example:

  • Clear blue skies
  • Plain walls
  • Smooth backgrounds
  • Minimal-detail scenes

can naturally contain fewer strong edges.

FindBlur therefore uses a Borderline zone.

Below threshold
      โ†“
๐Ÿ”ด Blurry

Near threshold
      โ†“
๐ŸŸก Borderline

Clearly above threshold
      โ†“
๐ŸŸข Sharp

This allows the user to manually review uncertain images instead of blindly trusting a single threshold.


๐Ÿ–ฅ๏ธ Application Preview

๐Ÿ” Single Image Check

FindBlur Single Image Check

๐Ÿ“ Batch Analysis

FindBlur Batch Analysis

๐Ÿ“ท Live Camera

FindBlur Live Camera Detection

โš™๏ธ Detection Settings

FindBlur Detection Settings

๐Ÿ—๏ธ Architecture

FindBlur separates the Streamlit interface from the computer-vision detection engine.

                         FindBlur
                            โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚                           โ”‚
              โ–ผ                           โ–ผ
           app.py                  blur_detector.py
              โ”‚                           โ”‚
              โ”‚                    Detection Engine
              โ”‚                           โ”‚
              โ”‚              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚              โ”‚                         โ”‚
              โ”‚              โ–ผ                         โ–ผ
              โ”‚         Laplacian                    FFT
              โ”‚              โ”‚                         โ”‚
              โ”‚              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚                           โ”‚
              โ”‚                           โ–ผ
              โ”‚                    Score Combination
              โ”‚                           โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
                                          โ–ผ
                                      Verdict

app.py

Handles:

  • Streamlit interface
  • Tabs
  • Sidebar controls
  • Image uploads
  • Camera input
  • Batch processing
  • Result rendering
  • CSV downloads

blur_detector.py

Handles:

  • Image preprocessing
  • Laplacian analysis
  • FFT analysis
  • Score normalization
  • Weighted scoring
  • Verdict classification
  • Confidence calculation

This separation keeps the UI and detection logic independent and easier to maintain.


๐Ÿ“‚ Project Structure

FindBlur/
โ”‚
โ”œโ”€โ”€ app.py
โ”‚
โ”œโ”€โ”€ blur_detector.py
โ”‚
โ”œโ”€โ”€ requirements.txt
โ”‚
โ”œโ”€โ”€ README.md
โ”‚
โ”œโ”€โ”€ assets/
โ”‚   โ””โ”€โ”€ logo.png
โ”‚
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ single-check.png
โ”‚   โ”œโ”€โ”€ batch-check.png
โ”‚   โ”œโ”€โ”€ live-camera.png
โ”‚   โ””โ”€โ”€ settings.png
โ”‚
โ”œโ”€โ”€ .streamlit/
โ”‚   โ””โ”€โ”€ config.toml
โ”‚
โ””โ”€โ”€ .devcontainer/

๐Ÿ› ๏ธ Tech Stack

Technology Purpose
๐Ÿ Python Core application logic
๐ŸŽˆ Streamlit Interactive web interface
๐Ÿ‘๏ธ OpenCV Computer vision and image processing
๐Ÿ”ข NumPy Numerical computation and FFT
๐Ÿผ Pandas Batch processing and CSV export
๐Ÿ–ผ๏ธ Pillow Image handling
๐Ÿ“Š Matplotlib Diagnostic visualization

โšก Getting Started

Prerequisites

Make sure you have:

  • Python 3.11+
  • Git
  • A modern web browser

1. Clone the Repository

git clone https://github.com/Aarush005coder/FindBlur.git
cd FindBlur

2. Create a Virtual Environment

Windows

python -m venv venv
venv\Scripts\activate

macOS / Linux

python3 -m venv venv
source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

4. Run FindBlur

streamlit run app.py

Open:

http://localhost:8501

๐Ÿ“ฆ Dependencies

The project uses:

streamlit
opencv-python-headless
numpy
pandas
Pillow
matplotlib

Install all dependencies with:

pip install -r requirements.txt

โ˜๏ธ Deployment

FindBlur is deployed using Streamlit Community Cloud.

Local Development
       โ”‚
       โ–ผ
      Git
       โ”‚
       โ–ผ
    GitHub
       โ”‚
       โ–ผ
Streamlit Community Cloud
       โ”‚
       โ–ผ
   Live FindBlur App

๐ŸŒ Live Application

Launch FindBlur


โš ๏ธ Limitations

FindBlur focuses specifically on image sharpness and blur detection.

It is not intended to be a complete image-quality assessment system.

Some cases can be difficult to classify automatically:

  • Intentional artistic blur
  • Motion blur
  • Very low-texture images
  • Plain walls
  • Clear skies
  • Extremely noisy images
  • Very small images
  • Naturally low-detail scenes
  • Different camera characteristics
  • Different image resolutions

A Borderline result should therefore be treated as a signal for manual review rather than an absolute decision.


๐Ÿ”ฎ Future Improvements

Potential future improvements include:

  • Region-based blur detection
  • Motion-blur detection
  • Focus-area detection
  • Resolution-aware threshold calibration
  • Automatic threshold calibration
  • Image-quality history
  • PDF report generation
  • Benchmark dataset
  • Detection performance evaluation
  • Automated test suite
  • Improved low-texture detection
  • Large-batch optimization
  • Additional image-quality metrics

๐Ÿงช Testing

When changing the detection engine, test against different image categories.

Sharp Images

High-detail scenes
Text
Objects with strong edges
Detailed landscapes

Blurry Images

Defocused photos
Motion blur
Soft-focus images
Low-detail photographs

Difficult Cases

Clear sky
Plain walls
Smooth backgrounds
Low-texture scenes
Noisy images

The goal is not only to identify obvious blur, but also to reduce false positives on naturally low-detail images.


๐Ÿค Contributing

Contributions, suggestions, and improvements are welcome.

Create a feature branch

git checkout -b feature/your-feature

Make your changes

Run the application locally:

streamlit run app.py

Commit your changes

git add .
git commit -m "Add your feature"

Push the branch

git push origin feature/your-feature

Then open a Pull Request.


๐Ÿ“„ License

This project is licensed under the MIT License.

See the LICENSE file for details.


๐Ÿ‘จโ€๐Ÿ’ป Developer

FindBlur

Built with Python, OpenCV, NumPy & Streamlit.

A practical computer-vision project for evaluating image sharpness before publishing.


๐Ÿš€ Live Demo ย  โ€ข ย  ๐Ÿ’ป GitHub


๐Ÿ”Ž FindBlur

Know before you post.

Stop guessing. Start checking.


โญ If you find FindBlur useful, consider giving the repository a star.

About

Image blur and sharpness detection using OpenCV, Laplacian variance, FFT analysis, and Streamlit.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages