Moving object detection is an important process in intelligent video surveillance systemsOn the basis of analyzing existing detection approaches,this paper proposes a detection algorithm based on a gradient directionsFor a video image sequence,edge gradient images of each frame are achieved firstly by means of directionSecondly,the traditional frame difference is improved and it car extract the rough edges of moving objects by processing two temporal correlative frames using uint8 formatFinally,after connective areas of moving objects are obtained,the complete moving object contours are effectively detected using the gradient directionExperimental results show that,the proposed algorithm overcomes the shortcoming of not correctly 〖JP〗detecting moving objects with traditional frame difference and can effectively and accurately extract moving object contour among indoor and outdoor environments with complex backgrounds