Abstract Due to the influence of temperature and other factors in the forming of forgings, the shape of the forging fringe is often challenging to control and predict, which restricts the operation of forging automation. In this paper, the forging position is detected by the vision means, which is conductive to identify whether the production process is normal or not to avoid the loss caused by the interruption of the production unit. Meanwhile, for the forging temperature changes on visual recognition, the relationship curve between forging temperature and exposure time is determined by statistical method, so that the temperature of the forging regulate the visual camera exposure time to improve the accuracy of visual recognition.