In view of the rotor-wing UAV's obstacle avoidance problem，a real-time obstacle detection algorithm is presented，which is based on the significant of the human visual attention mechanism and HOG features. The proposed algorithm uses the method of two layers morphological Haar wavelet decomposition to built up the enhanced image. Then according to the projection curve of enhanced image，the border of obstacle candidate areas are extracted. Afterwards，the size of the obstacle candidate area is normalized，and the area's HOG feature is extracted，then the linear SVM classifier is used for classification. The method is implemented using C++ language For a resolution of 640×480 VGA video image，the test processing speed is about 14f/s on the single board computer with 2G RAM and Celeron 2.3GHz processor. Experimental results show that the algorithm satisfies the demand of real- time obstacles detection when UAV is flying at low altitude.