Localization and navigation of an endoscope within a patient body is usually based on anatomical landmarks recognized by the surgeon. This technique might be more complicated, however, when a long a flexible endoscope is used. The proposed investigation presents a system that provides an image with a stabilized orientation using a miniature magnetic sensor located at the tip of a flexible endoscope. As a result, the surgeon perception of the anatomical features is enhanced enabling accurate localization of the endoscope. The system was tested in-vitro and experimental results are presented.