Freightcar’s running gear springs are easily ruptured in the processes of manufacturing and using, losing the role of relaxing vehicle vibration, and resulting in accident. It is time to study the automatic recognition of springs defects based on image processing technology. Defects recognition is on the premise of accurate spring image location. An image location algorithm for the freightcar’s running gear springs is proposed in this paper, which is based on the structure characteristics of springs themselves. The algorithm mainly includes graying the image, correcting non-uniform illumination by wavelet homomographic filtering, taking binaryzation on image based on the iterative threshold method and locating springs’ boundary location, which could be obtained by image scanning column by column and feature analysis. This algorithm can achieve the automatic positioning of springs and has a good result to locate springs in the running gear images in case of different illumination; the accuracy rate has reached 96 percent. The study of this paper lays a foundation on the realization of automatic recognition of springs defects and has good application prospects.