The paper introduces computer vision into the detection of end points of flame burning during the process of refuse incineration and proposes a method to detect the end points of flame by image processing. Firstly, filter image and enhance the special quality of shade by total variation de-noising. Secondly, extract the main edge of the flame image by method based on binary morphology algorithm. Thirdly, detect and output the end points of flame by median method which has removed the spike of the image. The results show that the presented method is efficient and the system can meet the requirement of both detection accuracy and processing speed. Also it increases the safety of incineration equipment and saves plenty of labor force.