Recently, vision-based target positioning technology has received considerable attention in the field of computer vision. The positioning technology has many advantages such as faster speed, higher accuracy and more stable and reliable positioning results. Therefore, it plays an important role in the fields of robot technology, military reconnaissance, geographic survey and field measurement. Based on the positioning technology, the paper designs an embedded vision system with DM816x microprocessor (the processing module) and CCD camera equipped with an infrared filter (the acquisition module), which realizes the recognition and positioning of the fire. Moreover, with 200 groups of experiments in a warehouses, the fire detection system has an alarm accuracy rate over 98%, and positioning accuracy of fire is far higher than the national standard of China. In addition, an automatic fire protection system is proposed, which consists of the fire detector and the water cannon, then it can automatically extinguish the fire when a fire is detected.