The invention discloses a TR element locating and defect detecting method based on vision and relates to a TR element vision locating and defect detecting method based on the vision. The TR element locating and defect detecting method based on the vision solves the problems that in the prior art personal errors exist, the precision is low, the real-time performance is poor, and the calculation result is sensitive to illumination. The TR element locating and defect detecting method based on the vision is achieved through the steps that an area image is binarized, an outer boundary point set is extracted, an effective boundary point set is searched, a minimum enclosing rectangle is searched, the effective boundary point set is classified, affine transformation is conducted on the binary image, the type of the TR element is checked, the effective boundary point set is classified again and numbered, a pin straight line is fitted, a pin foot straight line is fitted, TR element detailed information is determined, and the defect of the pin of the TR element is checked. The method comprises multiple technologies including grey value filtering, four-field rapid contour tracing, the dual axial rotation method searching the minimum enclosing rectangle and other innovative technologies. The TR element locating and defect detecting method based on the vision is mainly applied to element locating and detection fields in a chip mounter vision system.