The invention discloses a method for detecting
foreign matter in a
corbel hole of a
railway freight car, belonging to the technical field of
railway freight car detection. The purpose of the present invention is to solve the problems of poor stability and low precision in the manual detection method, as well as the high
false alarm rate in the existing
deep learning method. The present invention first acquires the image of the
corbel hole position, which is recorded as image D; then uses the trained segmentation
model network to predict image D; if there is no
foreign matter in the image, the next image is processed; otherwise, the
erosion and expansion operation is performed, Mark the
foreign object prediction
binary image as B; locate the
corbel hole for image D, and obtain the positioned
binary image, that is, image A; finally, combine the
foreign object prediction
binary image B with the pixels of the positioning binary image A Value points are multiplied and added to obtain the value c; judge, if c is not greater than the
foreign object judgment threshold m, it proves that there is no foreign object in the corbel hole area, otherwise it proves that there is a foreign object in the corbel hole area. It is mainly used for
foreign object detection in corbel holes of railway wagons.