An automatic image recognition approach