Precise recognition and numbering of the pieces to be cut is necessary in the production process of the stone processing industry. The measures (diminished, should there be any joints), material, finish, thickness and any works to be carried out on the sides of each piece, must be detailed in the instruction cards. Several mistakes usually occur during this process which cause waste of time and material. To overcome this a graphical application program has been designed which will automate the process as far as possible. Its core is an algorithm for the automatical recognition of polygons complete with other applications to guarantee the coherence and uniqueness of this information.