1. An image processing method comprising: designating one point on input image data as a start point of a retrieval line, the input image data containing an image of a subject; designating one point, which is different from the start point, on the input image data as an end point of the retrieval line; preparing a cumulative line profile of the retrieval line by calculating a cumulative sum of luminance values on the retrieval line, and extracting luminance values of the retrieval line based on the cumulative line profile; calculating an edge position on the retrieval line based on the cumulative line profile of the retrieval line, the edge position corresponding to a boundary of the subject in the input image data; designating a predetermined number of end points; and calculating a predetermined number of edge positions based on respective cumulative line profiles which connect the start point to the predetermined number of end points.