Vehicle and pedestrian detection technology is the most important part of advanced driving assistance system (ADAS) and automatic driving. The fusion of millimeter wave radar and camera is an important trend to enhance the environmental perception performance. In this paper, we propose a method of vehicle and pedestrian detection based on millimeter wave radar and camera. Moreover, the proposed method complete the detection of vehicle and pedestrian based on dynamic region generated by the radar data and sliding window. First, the radar target information is mapped to the image by means of coordinate transformation. Then by analyzing the scene, we obtain the sliding windows. Next, the sliding windows are detected by HOG features and SVM classifier in a rough detect. Then using the match function to confirm the target. Finally detecting the windows in a precision detection and merging the detecting windows. The target detection process is carried out in the following three steps. The first step is to read the radar signal and capture the camera data at the same time. The second step is to frame and fuse the data. The third step is to detect the target and display the result. Through experiments, it is proved that the fusion algorithm we proposed can detect vehicle and pedestrian better, and provide the basis for the following target tracking research.