An image processing apparatus includes a representative image setting unit that sets a representative image representing a group of images captured by a capsule endoscope introduced into the digestive tract of a subject, a representative image setting unit that sets a representative image representing a group of images included in a predetermined section of the digestive tract And assigns a count to each of the representative images, and based on the count and the total number of the representative images included in the section, calculates a length of a length from the start position of the section to the representative image And a distance ratio calculation unit that calculates the ratio for each of the representative images. Thereby, it is possible to specify which part of the gastrointestinal tract the respective images are captured, and to identify the image corresponding to the characteristic part from the group of images captured in the digestive tract Processing apparatus.画像処理装置は、被検体の消化管内に導入されたカプセル型内視鏡によって撮像された画像群を代表する代表画像を設定する代表画像設定部と、前記消化管において予め定められた区間に含まれる前記代表画像のそれぞれに計数を割り当て、前記計数と前記区間に含まれる前記代表画像の総枚数とに基づいて、前記区間の全長に対する、前記区間の開始位置から前記代表画像までの長さの比率を、前記代表画像ごとに算出する距離比算出部と、を備える。これにより、取得された各画像が消化管内のどの部位で撮像された画像であるかを特定し、また、消化管内で撮像された画像群から特徴部位に対応する画像を特定することができる画像処理装置を提供する。