Abstract:Rebar is a widely used building material, if its size and surface defects cannot be found in time in the rolling process, it will produce a large number of waste products and bring losses to the enterprise. In this study, we design a rebar surface defect detection method based on machine vision. Firstly, the skew rebar in the image is corrected by affine transformation, and then the front and side images of rebar are distinguished based on Hough transform to detect the straight line position of longitudinal rib edge. Finally, defect detection is carried out for front and side images to quickly and accurately judge whether there are defects on the surface. Experiments show that the design method has sound stability and practicality. It can effectively solve the problems of low efficiency and high false detection rate in the process of manual detection.