Obstacle detection is the basis of autonomous movement of robot. In order to improve the efficiency and accuracy of obstacle detection, an obstacle detection method based on RGBD camera is proposed, which is mainly divided into two parts: obstacle identification, detection length and width. Under the premise of irregular shape, the obstacles through camera real-time image transmission to the data processing center, the improved frame difference minimum rectangle matching method and image processing method are used to determine the contour of the obstacle. Use of depth image and its threshold shows the relative position of the obstacle from the camera. The height and width of obstacles are detected by coordinate transformation method. The result shows that the error of detected object parameter is no more than 9%. Therefore, the improved frame difference method is of high accuracy in detecting the contour of obstacles, and the coordinate transformation method is of high speed. It can be proved that the obstacle detection design based on RGBD camera has sound detection effect.