1. A method of extracting feature data of an image, the method being performed by a processor of an electronic device, the method comprising: (a) reading the image, wherein the image is a grayscale image; (b) computing a grayscale center of the image, wherein the grayscale center is a mean location of all the gray values in the image; (c) dividing the image into n equal parts D k(k=1˜n) according to the grayscale center, and computing a grayscale density V k of each part D k to acquire n grayscale densities D k(k=1˜n) , wherein n is a positive integer; and (d) regarding the n grayscale densities D k(k=1˜n) as feature data of the image, and storing the feature data of the image into a storage unit of the electronic device.