Patent ID: 7952576

Claim:
An image processing apparatus that simplifies a two-dimensional shape including a plurality of line elements, the apparatus comprising: a base endpoint setting unit that sets one endpoint of one line element included in the two-dimensional shape as a base endpoint; a next endpoint setting unit that sets a second endpoint of the line element including the base endpoint as a next endpoint; a determination unit that determines whether or not the next endpoint is in a first reference direction passing through the base endpoint, or in a second reference direction orthogonal to the first reference direction; a correction endpoint generation unit that generates, as a correction endpoint, a point obtained by projecting the next endpoint onto a straight line of the first reference direction passing through the base endpoint or onto a straight line of the second reference direction passing through the base endpoint in the case where the determination unit determines that the next endpoint is neither in the first reference direction nor in the second reference direction which passes through the base endpoint; and a base endpoint change unit that sets the next endpoint as a new base endpoint in the case where the determination unit determines that the next endpoint is in the first reference direction or in the second reference direction which passes through the base endpoint, and sets the correction endpoint as a new base endpoint in the case where the determination unit determines that the next endpoint is neither in the first reference direction nor in the second reference direction which passes through the base endpoint, wherein each endpoint of the plurality of line elements included in the two-dimensional shape is subjected to the process performed by the next endpoint setting unit, the determination unit, the correction endpoint generation unit, and the base endpoint change unit so as to generate a simplified shape.