The Wireless capsule endoscopy (WCE) is a state-of-the-art imaging technique used to view the entire gastrointestinal (GI) tract. With this technique, the clinicians can detect diseases such as obscure gastrointestinal bleeding, polyp, Crohn's and celiac disease. However, like other endoscopes, the WCE provides only 2-D images. The real anatomical structure of the observed lesion is unavailable and can only be judged by the clinician's imagination. In this paper, we use shape from shading (SFS) technique to generate 3-D structures from 2-D endoscopic images. For the three assumptions of the SFS technique, we propose a preprocessing method for endoscopic image. Experiments with real WCE data demonstrate good 3-D shape recovery performance. Smooth and visually scene can be created based on the pre-processed endoscopic image, while preserving the structure of the observed objects without any hardware upgrades. The 3-D shape enhances the video and therefore improves the viewing of the gastrointestinal (GI) tract leading to a more accurate diagnosis.Index Terms-Wireless capsule endoscopy, shape recovery, shape from shading.