An image processing apparatus for extracting an area of a detection target from an image, the image processing apparatus comprising: an image input section configured to acquire an image; an image generation section configured to generate a plurality of images with different resolutions from the image acquired by the image input section ; and a segmentation section configured to perform segmentation using the plurality of images with the different resolutions, characterized in that the segmentation section is configured to segment an image with a low resolution and then segment an image with a high resolution, segmentation on the image with the high resolution being performed using only a processing target area, wherein said processing target area is only an area in the image with the high resolution, said processing target area being set to be within a range of a predetermined number of pixels from a boundary in the image with the high resolution, wherein the boundary in the image with the high resolution corresponds to a boundary resulting from the processing of segmentation of the image with the low resolution as a result of searching for a boundary between a foreground and a background in the image with the low resolution, and results from enlargement of said boundary in the image with low resolution, or said processing target area is only an area in the image with the high resolution, said processing target area being set as the area corresponding to an area in the image with low resolution within a range of a predetermined number of pixels from a boundary resulting from the processing of segmentation of the image with the low resolution as a result of searching for a boundary between a foreground and a background in the image with the low resolution, and being then enlarged. an image input section configured to acquire an image; an image generation section configured to generate a plurality of images with different resolutions from the image acquired by the image input section ; and a segmentation section configured to perform segmentation using the plurality of images with the different resolutions, characterized in that the segmentation section is configured to segment an image with a low resolution and then segment an image with a high resolution, segmentation on the image with the high resolution being performed using only a processing target area, wherein said processing target area is only an area in the image with the high resolution, said processing target area being set to be within a range of a predetermined number of pixels from a boundary in the image with the high resolution, wherein the boundary in the image with the high resolution corresponds to a boundary resulting from the processing of segmentation of the image with the low resolution as a result of searching for a boundary between a foreground and a background in the image with the low resolution, and results from enlargement of said boundary in the image with low resolution, or said processing target area is only an area in the image with the high resolution, said processing target area being set as the area corresponding to an area in the image with low resolution within a range of a predetermined number of pixels from a boundary resulting from the processing of segmentation of the image with the low resolution as a result of searching for a boundary between a foreground and a background in the image with the low resolution, and being then enlarged. <EOS>