A boundary of a site included as an attached abnormal shadow in a medical image is corrected to allow assisting in diagnosis based on a shape of a tissue. An image processing apparatus according to the present invention includes: a boundary extraction unit configured to extract a boundary of a first site and a boundary of a second site in the medical image a boundary identification unit configured to identify a partial boundary of the first site that is adhere to the boundary of the second site as a first boundary part, and to identify a partial boundary of the first site that is not adhere to the boundary of the second site as a second boundary part and a correction unit configured to correct a shape of the first boundary part based on the second boundary part.