An image processing device is provided with a boundary line extraction means for extracting a boundary line for a layer from an input image that is an image in which a target object configured from a plurality of layers is captured. The boundary line extraction means first extracts a boundary line for the upper edge and a boundary line for the lower edge of the target object, then uses the extracted boundary line for the upper edge and the boundary line for the lower edge to limit a search range and extract another boundary line, uses the extraction result of the other boundary line to limit a search range and extract yet another boundary line, and subsequently sequentially repeats similar processing and extracts boundary lines. In another embodiment of the present invention, the image processing device is provided with: a boundary line extraction means for extracting a boundary line for a layer from an input image that is an image in which a target object captured from a plurality of layers is captured; and a search range setting means that uses a boundary line already extracted by the boundary line extraction means to dynamically set a search range for another boundary line. Such an image processing device and an image processing method make it possible to extract a boundary line for a layer with high precision from an image in which a target object configured from a plurality of layers is captured.L'invention concerne un dispositif de traitement d'image qui comprend un moyen d'extraction de ligne de limite pour extraire une ligne de limite pour une couche à partir d'une image d'entrée qui est une image dans laquelle un objet cible configuré à partir d'une pluralité de couches est capturé. Le moyen d'extraction de ligne de limite extrait d'abord une ligne de limite pour le bord supérieur et une ligne de limite pour le bord inférieur de l'objet cible, utilise ensuite la ligne de limite extraite pour le bord supérieur et la ligne de limite pour le bord inférieur pou