The invention discloses a template matching and optical flow method-based detection method for a power transmission line foreign matter of an unmanned aerial vehicle image, and belongs to the technical field of picture processing. The method comprises the steps of power transmission line video image collection, linear edge contrast enhancement, mean filtering, edge straight line feature extraction, power transmission line region setting, template matching, optical flow calculation, optical flow grayscale image binarization, feature point detection tracking and foreign matter identification, and the like. According to a feature that a power transmission line is approximate to a horizontal straight line, the linear edge contrast enhancement method and the edge straight line feature extraction method are proposed, so that an edge straight line of the power transmission line can be accurately extracted, and the adaptability and the edge straight line feature extraction are strong. According to a principle of large moving displacement of corresponding pixel points of an object relatively close to a camera in the image, a foreign matter region determination method is proposed by integrating template matching, optical flow calculation and image binarization, so that the accuracy is high and the robustness is strong. A foreign matter is tracked and identified through feature point matching of the foreign matter, so that the accuracy is high and the adaptability is strong.