PROBLEM TO BE SOLVED: To provide a mechanism to acquire an excellent front image in which image information of each layer is reflected even when a plurality of layers are included in a predetermined depth range of an object to be inspected, for which the front image is generated.SOLUTION: An image processing device includes a layer image extraction part 433 for extracting a layer image of each layer of a plurality of layers included in a predetermined depth range in the depth direction of an object to be inspected from a tomographic image of the object to be inspected having a layer structure, a first representative value calculation part 434 for calculating a first representative value which is a representative value in the depth direction for each layer based on the layer image of each layer extracted by the layer image extraction part 433, a second representative value calculation part 435 for calculating a second representative value which is a representative value in the predetermined depth range using the first representative value of each layer calculated by the first representative value calculation part 434, and a front generation part 436 for generating a front image of the object to be inspected using the second representative value calculated by the second representative value calculation part 435.SELECTED DRAWING: Figure 4【課題】正面画像を生成する被検査物の所定の深度範囲に複数の層が含まれる場合においても、各層の画像情報が反映された良好な正面画像を取得できる仕組みを提供する。【解決手段】層構造を有する被検査物の断層画像から、被検査物の深さ方向における所定の深度範囲に含まれる複数の層の各層ごとに層画像を抽出する層画像抽出部433と、層画像抽出部433で抽出された各層の層画像に基づいて当該各層ごとに深さ方向の代表値である第1の代表値を算出する第1の代表値算出部434と、第1の代表値算出部434で算出された各層の第1の代表値を用いて所定の深度範囲における代表値である第2の代表値を算出する第2の代表値算出部435と、第2の代表値算出部435で算出された第2の代表値を用いて被検査物の正面画像を生成する正面生成部436を備える。【選択図】図4