An automatic method for pottery fragments analysis