Pottern Recognition Applied to Automatic Assembly System