Built to order

Concrete Crack Detection using Image Processing

This project detects and measures cracks in concrete using image processing: an ESP32-CAM on a small tripod photographs concrete samples, and an OpenCV pipeline (grayscale, blur, adaptive threshold, contour filtering) finds crack regions, then estimates each crack's length and maximum width in millimetres using a coin as a scale reference. A desktop analysis tool shows the original photo with detection boxes, an edge-enhanced view, per-crack measurements, a width histogram and a multi-sample comparison table with severity grading. Suitable for B.E./B.Tech final-year projects in Civil,

AI & Machine Learning ESP32-CAMOpenCVPython 3.10chartsmeasurements)Hybrid
Concrete Crack Detection using Image Processing — project thumbnail preview
More project photos (5)

The problem

Concrete structures crack long before they fail, and the first warning sign is usually found by a person walking the structure with a clipboard. Manual inspection is slow, subjective, and hard to repeat: two inspectors can disagree on whether a crack has grown. Image processing turns this into a measurable procedure — a photograph becomes a set of numbers (crack count, length, maximum width) that can be compared across inspections. This project builds the complete student-scale version: an ESP32-CAM module on a mini tripod captures concrete cube and wall samples, and a Python/OpenCV pipeline processes each image through grayscale conversion, Gaussian blur, adaptive thresholding, morphological closing and elongated-contour filtering to isolate crack regions. Crack width is estimated with a distance transform across each contour and converted to millimetres using a coin of known diameter placed in the frame as a scale reference. The analysis tool presents the original photo with detection boxes, an edge-enhanced pipeline view, per-crack measurements, a width-distribution histogram and a sample comparison table graded hairline / moderate / severe.

SYSTEM FLOW

3 components 3 connections

Live flow
Drag to explore
100%
userInspector

Positions the camera on the tripod and reviews the crack measurements and severity grades.

Follow the working sequence

How it works

  1. The ESP32-CAM, mounted on a mini tripod at a fixed distance, photographs the concrete sample with a coin placed in the frame as a scale reference.
  2. The capture script transfers the image to the PC analysis tool (640×480 working resolution).
  3. The pipeline converts to grayscale and applies a 5×5 Gaussian blur to suppress aggregate texture noise.
  4. Adaptive thresholding separates dark crack pixels from the lighter concrete background.
  5. Morphological closing joins broken crack segments; the contour filter keeps elongated shapes and rejects stains and shadows.
  6. A distance transform across each surviving contour estimates local width; length follows the contour skeleton.
  7. Pixel measurements are converted to millimetres using the coin's known 25 mm diameter, and the tool renders boxes, measurements, histogram and severity grades.

Tech stack:

  • ESP32-CAM module on mini tripod (image capture)
  • Python 3.10, OpenCV (image-processing pipeline)
  • NumPy (array math, distance transform)
  • Matplotlib (width histogram, comparison charts)
  • Single-file HTML/CSS/JS analysis demo (sample views, results, comparison)
  • Coin scale reference (25 mm) for pixel-to-mm calibration
Parameter Value
Capture ESP32-CAM, fixed tripod distance, USB transfer script
Input 640×480 images, coin (25 mm dia.) in frame as scale
Pipeline Grayscale → Gaussian blur → adaptive threshold → closing → contour filter → width estimation
Output Crack count, per-crack length (cm), max width (mm), severity grade
Severity bands <1 mm hairline · 1–3 mm moderate · >3 mm severe
Demo tool Sample analysis view, edge-enhanced stage view, comparison table
Width method Distance transform across crack contours
Calibration Pixel-to-mm from coin diameter; recalibration procedure documented

Project features

  • [Crack detection pipeline] Six-stage OpenCV pipeline — grayscale, blur, adaptive threshold, morphological closing, contour filter, width estimation — with each stage's parameters exposed and documented.
  • [Length and width measurement] Per-crack length in centimetres and maximum width in millimetres, computed from the contour geometry and a coin scale reference in the frame.
  • [Severity grading] Cracks graded hairline (<1 mm), moderate (1–3 mm) or severe (>3 mm) following common inspection practice, shown as badges in the comparison table.
  • [Edge-enhanced view] The tool renders the pipeline's threshold stage so the report and viva can show exactly what the algorithm "sees".
  • [Width histogram] Distribution of measured crack widths per sample, useful for showing whether a surface is dominated by hairlines or structural-width cracks.
  • [Multi-sample comparison] Side-by-side sample cards and a comparison table (location, crack count, max width, longest crack, severity) for inspection rounds.
  • [ESP32-CAM capture] Camera module on a mini tripod with USB capture script, so samples are photographed repeatably at a fixed distance.
  • [Scale calibration] Coin-diameter reference converts pixels to millimetres; the procedure for recalibrating at a different capture distance is documented.

What is included

  • ESP32-CAM capture firmware and USB capture script
  • Complete OpenCV pipeline source (six documented stages)
  • Analysis demo tool (sample views, edge-enhanced rendering, comparison table)
  • Scale-calibration guide (coin reference, distance changes)
  • Project report PDF (background, pipeline design, parameter choices, evaluation method)
  • PPT presentation for final review
  • Viva Q&A preparation document (thresholding, morphology, contours, distance transform, calibration)
  • Setup guide (camera positioning, lighting, running the pipeline)

Advantages

  • Six-stage OpenCV pipeline — grayscale, blur, adaptive threshold, morphological closing, contour filter, width estimation — with each stage's parameters exposed and documented.
  • Per-crack length in centimetres and maximum width in millimetres, computed from contour geometry with a coin as a scale reference in the frame.
  • Severity grading — hairline (<1 mm), moderate (1–3 mm), severe (>3 mm) — following common inspection practice, shown as badges in the comparison table.
  • Edge-enhanced view renders the pipeline's threshold stage, so the report and viva can show exactly what the algorithm "sees".
  • Desktop analysis tool with per-crack measurements, width histogram and multi-sample comparison; ESP32-CAM on a tripod captures the concrete samples.

Disadvantages

  • The tool measures crack geometry; it does not certify structural safety — severity bands follow common practice, but structural judgement stays with a qualified engineer, and the report states this explicitly.
  • Lighting and shadows dominate results: strong directional light or wet surfaces create false contours, and the report documents capture conditions that work.
  • The coin scale reference must be in the frame at the same plane as the crack; without it, measurements are in pixels only.
  • Very fine hairline cracks below the camera's resolving power at the capture distance will be missed — resolution limits are quantified in the report.
  • Stains, formwork lines and repair patches can mimic cracks and need manual review.

Limitations & prerequisites

  • The tool measures crack geometry; it does not certify structural safety — severity bands follow common practice, but structural judgement stays with a qualified engineer, and the report states this explicitly.
  • Lighting and shadows dominate results: strong directional light or wet surfaces create false contours, and the report documents capture conditions that work.
  • The coin scale reference must be in the frame at the same plane as the crack; without it, measurements are in pixels only.
  • Very fine hairline cracks below the camera's resolving power at the capture distance will be missed — resolution limits are quantified in the report.
  • Stains, formwork lines and repair patches can mimic cracks; the contour filter reduces but does not eliminate these, and the report shows failure examples honestly.
  • This is classical image processing, not a trained ML model — it needs no dataset or GPU, but it also has no learned robustness to unusual surfaces.

Frequently Asked Questions

How does it measure crack width in millimetres?

A coin of known 25 mm diameter is photographed in the same frame; the pipeline measures the coin's pixel diameter, derives a pixels-per-mm factor, and converts crack pixel measurements. The calibration guide covers distance changes.

Does it use machine learning?

No — this build uses a classical OpenCV pipeline (thresholding, morphology, contours), which needs no training data and runs on any laptop. An ML-based variant is a documented extension.

Can it inspect a real building?

It photographs and measures visible surface cracks, which is the same first step a manual inspector takes. It does not assess structural capacity — that requires an engineer.

What affects accuracy most?

Lighting first, then capture distance and focus. The report documents the capture setup (fixed tripod distance, diffuse daylight) that the measurements assume.

What will I receive?

ESP32-CAM firmware, capture script, the full OpenCV pipeline source, the analysis demo tool, calibration guide, report PDF, PPT and viva Q&A.

Is this project suitable for a final-year project?

Yes — for Civil, Computer Science and AI/ML programs. It demonstrates image acquisition, classical computer vision, measurement metrology and honest evaluation of failure cases, all strong viva material. Suitable for B.E./B.Tech final-year projects in Civil, Computer Science and AI/ML.

Components & software requirements
  • ESP32-CAM module on mini tripod (image capture)
  • Python 3.10, OpenCV (image-processing pipeline)
  • NumPy (array math, distance transform)
  • Matplotlib (width histogram, comparison charts)
  • Single-file HTML/CSS/JS analysis demo (sample views, results, comparison)
  • Coin scale reference (25 mm) for pixel-to-mm calibration
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Sales da Cunha et al. (2023), Structural Health Monitoring (SAGE)

Get a quotation