Texture Defect Detection Methodology
In order to enhance the accuracy of defect detection in rail components and maximize the retention of image information, a system utilizing a color industrial camera is employed to capture RGB images. The initial step involves converting the color images to grayscale. Histogram analysis proves to be a common and effective tool for evaluating the grayscale characteristics of color images. Histograms aid in determining if the segmented regions from the background, image saturation, and contrast meet the detection requirements of a machine vision system. Moreover, they assist in identifying adjustments and enhancements needed for the image capture system. The system utilizes the IMAQ Histogram function module in LabVIEW to filter the acquired images of rail components, eliminating those without apparent defects. Workpieces not eliminated are considered challenging components and proceed to subsequent detection processes for further analysis and processing. Experimental analysis reveals that the pixel count for grayscale values in the range of 98-141 corresponds to images with virtually no defects. Statistical data indicate that the pixel count for standard defect-free rail components does not exceed the range of 35,600 to 38,900 pixels. Within the range of grayscale values 98-141, the pixel count is 36,934, signifying that rail components in this range are essentially defect-free. The distinct grayscale differences between the test workpieces and the background result in peaks in the histogram, making it possible to identify the grayscale values near the valley as the threshold for image segmentation. Therefore, the use of histograms in the preprocessing of rail component images proves highly convenient for subsequent image segmentation.