A computer readable product storing at least one program, for determining an orientation of a local line segment in a contour in a local area of a binary contour image, in a storage memory unit, where said at least one program when executed by a processing unit, causes the processing unit and its associated hardware to carry out the steps of:
- a first step for obtaining the numbers of pixels each having a first predetermined value and located in a plurality of orientations around one of plural pixels, located in the local area and having said first predetermined value, wherein the pixels are stored in the storage memory unit;
- and
- a second step for determining that a local line segment exists in an orientation in which the number of pixels located in the orientation is greater than a second predetermined value using the processing unit.