Image analysis was automated using a Python script based on the OpenCV library. Images were first processed using Otsu thresholding, followed by erosion and subsequent dilation to eliminate potential noise. After noise removal, individual microwires were detected using a rectangular contour mapping technique, which enclosed each microwire within an equivalent shaped rectangle. This method enabled the isolation and representation of each microwire or microwire segment as a distinct entity. The average number of cracks per microwire was then computed as (N rectangle -N wires )/N wires , where N rectangles represents the number of detected rectangles in an image and N wires denotes the number of microwires originally present in the image.