Patent attributes
Side coordinate groups that correspond to the four sides of the well are extracted from the edge coordinate group. Approximate lines are generated from the side coordinate groups. Corner coordinate groups that correspond to the four corners of the well are extracted from the edge coordinate group. Two intersecting approximate lines are selected from the approximate lines, and a contact candidate coordinates is set on each of the two approximate lines. Every possible pair of one contact candidate coordinate on one of the two approximate lines and one contact candidate coordinates set on the other approximate line are generated. For the generated pairs, processing for calculating an approximate curve by polynomial approximation from the corner coordinate group is performed, the approximate curve being in contact with two contact candidate coordinates. An approximate curve that is closest to the corner coordinate group is selected from all the calculated approximate curves.