This is the code of the detector of wire's breakage which is one of the common defects in power system. This is pure Python code which can be treated as a simply introduction code to image processing, and can be easily transformed to other object detector.
- Read image from list.
- Image segmentation. Give three common segmentation method: manual threold, OTSU algorithm and edge detection. Then ensemble the segmentation result to convert gray image to binary image.
- Line detection. Using Hough transform line detection algorithm to find the location of each wire.
- Generate Sliding window on each of lines. Just like
Proposal
method in object detection. - Find the breakage location. Calculate the entropy of image to find the abnormity point.
- python3.6
- python-opencv
- skimage
- matplotlib
python main.py
- It takes about 30 seconds to detect one image which need to do speed optimization. Mainly because the DENSE line result in step3 cause to much sliding windows in step4.