Purpose: Over the last decade, wireless capsule endoscope has been the tool of choice for noninvasive inspection of the gastrointestinal tract, especially in the small intestine. However, the latest clinical products have not been equipped with a sufficiently accurate localization system which makes it difficult to determine the location of intestinal abnormalities, and to apply follow-up interventions such as biopsy or drug delivery. In this paper, the authors present a novel localization method based on tracking three positron emission markers embedded inside an endoscopic capsule. Methods: Three spherical 22Na markers with diameters of less than 1 mm are embedded in the cover of the capsule. Gamma ray detectors are arranged around a patient body to detect coincidence gamma rays emitted from the three markers. The position of each marker can then be estimated using the collected data by the authors' tracking algorithm which consists of four consecutive steps: a method to remove corrupted data, an initialization method, a clustering method based on the Fuzzy C-means clustering algorithm, and a failure prediction method. Results: The tracking algorithm has been implemented in MATLAB utilizing simulation data generated from the Geant4 Application for Emission Tomography toolkit. The results show that this localization method can achieve real-time tracking with an average position error of less than 0.4 mm and an average orientation error of less than 2°. Conclusions: The authors conclude that this study has proven the feasibility and potential of the proposed technique in effectively determining the position and orientation of a robotic endoscopic capsule.