1. An image processing apparatus comprising: a display unit; an input unit configured to receive an input from an operator; and an image processing unit configured to perform a registering process for producing and registering a geometrical model, wherein the image processing unit is configured to: cause the display unit to display an input image; based on operation of the input unit, render, on the input image, a region assignment that is used to produce said geometrical model to be registered by overlapping the region assignment over the input image displayed on the display unit; compute edge codes as angle data based on a density gradient direction for each pixel in the input image; set a region between a first line and a second line as an edge extraction range, wherein during generation of said first line or second line, respectively, the region assignment as edge information is spread outward or narrowed, respectively, by a width W; extract coordinates of pixels whose edge code is similar to edge code information possessed by the region assignment within said edge extraction range between the first and second lines; and store the extracted coordinates as the registered geometrical model.