1. An image processing apparatus for extracting an area of a detection target from an image, comprising: an image input section that acquires an image; an image generation section that generates a plurality of images with different resolutions from the image; and a segmentation section that performs segmentation using the plurality of images with the different resolutions, wherein the segmentation section segments an image with a low resolution and then segmenting an image with a high resolution using a processing target area, and wherein the processing target area is only an area within a range of a predetermined number of pixels from a position in the image with the high resolution corresponding to an area near a boundary resulting from processing of the segmentation of the image with the low resolution, or only an area in the image with the high resolution corresponding to an area within a range of a predetermined number of pixels from the boundary resulting from the processing of segmentation of the image with the low resolution.