To solve such a problem, especially to separate two characters from each other, Japanese Patent Publication No. 2,872,768 discloses a method of setting a search start point and a search end point in an image, integrating pixel values of the pixels passing a path connecting the start and end points, and finding a path in which the integration value is the minimum.