1. An electronic device, comprising: a processor; and a non-transitory computer-readable medium that stores one or more programs, which comprise instructions which when executed by the processor of the electronic device, performs operations of: (a) create a reference image of an object according to geometrical features of the object; (b) obtain an outline image from each image of the object; (c) search for feature points of the object from the reference image and each outline image; (d) obtain each two adjacent points on the reference image and each outline image according to the feature points of the object, calculate derivatives of each two adjacent points on the reference image and each outline image according to coordinates of each two adjacent points, and generate a derivative matrix of the reference image according to the derivatives of each two adjacent points of the reference image and generate a derivative matrix of each outline image according to the derivatives of each two adjacent points of the outline of each outline image; (e) generate a first derivative curve corresponding to the derivative matrix of the reference image and a second derivative curve corresponding to each derivative matrix of the outline image; and (f) determine whether each outline image is corresponding to the object by using a haar-like features of the object when all the second derivative curves are the same as the first derivative curve.