This project implements a basic image processing pipeline using OpenCV to detect cracks in mosaic images. The goal is to identify and visualize structural cracks in mosaic surfaces by enhancing contrast, detecting edges, and isolating line features. It shows the output in multiple windows, it shows the user the best outputs of edge detection, along with a colored and monochromatic style of the image and lastly the orignal image too.
Dependencies Ensure you have the following Python packages installed:
- opencv (for edge detection on the images given)
- numpy (also for analyzing the image)
- matplotlib (displaying results in a new window)
Usage:
- Clone or download the repository.
- Replace the image_path in the code with the path to your mosaic image.
- Run the code to get the output of edge detection, and the cracks in the image
Methodology:
- Preprocessing: Convert to grayscale and enhance contrast using CLAHE.
- Edge Detection: Apply Canny edge detection to highlight potential cracks.
- Noise Removal: Morphological transformations clean up the edge map.
- Line Detection: Hough Transform extracts line segments corresponding to cracks.
- Binary Conversion: Final image shows detected cracks in white over a black background.
Recommended to vary the parameters for noise reduction in each image to obtain best results.