This paper presents two shape descriptors which could be applied to both binary and grayscale images. The proposed algorithm utilizes gradient based features which are extracted along the object boundaries. We use two-dimensional steerable G-Filters (IEEE Trans Pattern Anal Mach Intell 19(6):545-563, 1997) to obtain gradient information at different orientations and scales, and then aggregate the gradients into a shape signature. The signature derived from the rotated object is circularly shifted version of the signature derived from the original object. This property is called the circular-shifting rule (Affine-invariant gradient based shape descriptor. Lecture notes in computer science. International workshop on multimedia contents Representation, Classification and Security, pp 514-521, 2006). The shape descriptor is defined as the Fourier transform of the signature. We also provide a distance measure for the proposed descriptor by taking the circular-shifting rule into account. The performance of the proposed descriptor is evaluated over two databases; one containing digits taken from vehicle license plates and the other containing MPEG-7 Core Experiment and Kimia shape data set. The experiments show that the devised method outperforms other well-known Fourier-based shape descriptors such as centroid distance and boundary curvature.