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, where the grayscale center is computed by: r 0 == ∑ i × g ij ∑ g ij c 0 == ∑ j × g ij ∑ g ij , wherein, (r 0 , c 0 ) is the grayscale center, i represents each row of the image, j represents each column of the image, and g ij represents a gray value of the point (i, j) 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 V k(k=1˜n) , wherein n is a positive integer, wherein the grayscale density V k of the part D k is computed by: V k = ∑ r i ′ ⁢ j ′ × g i ′ ⁢ j ′ ∑ r ij × g ij , wherein, (i′ j′) is a point in the part D k , (i, j) is a point in the image, r i′j′ represents a distance between the point (i′, j′) and the grayscale center(r 0 , c 0 ), r ij represents a distance between the point (i, j) and the grayscale center (r 0 , c 0 ), g i′j′ represents a gray value of the point (i′, j′), and g ij represents a gray value of the point (i, j); and (d) regarding the n grayscale densities V 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.