An endoscope shape detection system has a CPU included in a control unit.
The CPU performs frequency sampling on digital data to calculate
coordinates indicating the spatial positions of source coils incorporated
in an insertion unit of an endoscope and of marker coils. An inserted
state of the insertion unit of the endoscope is estimated based on the
calculated coordinate data indicating the positions of the source coils.
Display data based on which shape of the endoscope depicted is produced
from the calculated coordinate data indicating the positions of the source
coils, and output to a video RAM. Display data based on which marker coils
are depicted is produced from the calculated coordinate data indicating
the positions of the marker coils, and output to the video RAM.
Consequently, the positions of the markers are depicted together with the
shape of the endoscope. The positional relationship between the insertion
unit of the endoscope and a patient's body can therefore be ascertained.