Obstacle detection and avoidance is playing very important role in field of mobile robot navigation, space exploration and automation industries for safety of robot. In this study paper we are proposing a real time obstacle detection and avoidance algorithm using passive stereoscopic Kinect camera. The basic idea behind the obstacle detection method is to find a depth map of image captured by Kinect camera and map it with the real world coordinates. Camera can be used as non contact type of sensor for detection of obstacles unlike the classical sensors. The obstacle detection and avoidance is carrying out in both static and dynamic environment i.e. obstacles in environment can be stationary or moving. The proposed system is tested in indoor environment with raspberry pi 2 model with 640*480 pixels image size and with a frame rate of 30 fps. The system is simple, robust and efficient. By use of camera system as sensor the need for complex sensor arrangement can be avoided. By the experimental results we can conclude that the proposed system is robust and convenient.