Wireless capsule endoscopy (WCE) is a new technology which is introduced in recent years for examining the Gastrointestinal (GI) tract. Active WCE is a class of WCE in which the capsule's movement is controllable. Since there is a large open space in the stomach, steering the capsule in the proper distance from the walls of the stomach in order to achieve suitable images, is a challenge. Another challenge of using the active capsule in the stomach is its localization. The localization can be used as the feedback of the controller. In this paper for the first time for localizing the active capsule endoscope inside the stomach, a method is proposed in which, the rotation angle about the main axis of the capsule and the scales of the images are obtained by using Speeded-Up Robust Features (SURF), Fast Library for Approximate Nearest Neighbors (FLANN) and M-estimator SAmple and Consensus (MSAC). Also a new method is presented that modifies the distance between the capsule and the walls of the stomach by using scales of the images and fuzzy rules. The results of this work show a good estimation of the rotation angle of the capsule and scales of the images. The findings of this paper can be utilized for improving the control of the active capsule endoscope inside the stomach.