Skip to content

Image processing Python script detects and analyzes cracks in images using OpenCV. It measures crack length, width, area, angle, and type, visualizes results with bounding boxes, and exports all data to Excel for structural health monitoring and analysis.

License

Notifications You must be signed in to change notification settings

Dr-averma/Image_Processing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Image_Processing

This Python script automates the detection, measurement, and classification of cracks in images. It extracts crack length, width, area, angle, and type, visualizes results, and exports all data to Excel for further analysis.

Features

  • Image Preprocessing

    • Resize images and convert to grayscale.
    • Apply Otsu’s thresholding to create binary crack masks.
    • Exclude margins to remove noise.
  • Crack Segmentation

    • Detect contours corresponding to cracks.
    • Fit bounding boxes and filter by aspect ratio.
    • Extract crack segments for analysis.
  • Crack Measurement

    • Compute crack length, area, and maximum width.
    • Calculate orientation angle and classify cracks (shear, tensile, diagonal, vertical).
    • Derive additional metrics like imaginary length and ratio T.
  • Visualization

    • Overlay bounding boxes, angles, and width markers on images.
    • Highlight the widest crack point.
  • Data Export

    • Save all crack properties (length, width, area, type, etc.) to an Excel file. This is the code used in research article: https://doi.org/10.21203/rs.3.rs-4389107/v1 Kindly cite this article if you are using the code. Thank you!!!

Requirements

  • Python 3.x
  • OpenCV (opencv-python)
  • NumPy
  • Pandas

Usage

python image processing for crack width.py

About

Image processing Python script detects and analyzes cracks in images using OpenCV. It measures crack length, width, area, angle, and type, visualizes results with bounding boxes, and exports all data to Excel for structural health monitoring and analysis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages