To further research the extracting method of the pig gait features, the paper firstly focus on the extraction of the pig gait frequency. A gait frequency extraction method was proposed based on analyzing the skeleton endpoints of depth image. Firstly, a series of processes, including skeleton extracting and pruning, were taken to the frames of depth image sequences. Secondly, a path similarity skeleton graph matching method was introduced to distinguish the fore-leg endpoints and the hind-leg endpoints from the skeleton graph. Then considering the characteristics of the depth image, a rule to distinguish the far-side endpoint and the near-side endpoint was constructed by calculating the average value of neighbor skeleton points of the endpoint. After ascertaining the skeleton endpoints of four legs, a variable was defined to represent the relative position of the far-side endpoint and the near-side endpoint, along the horizontal direction between frames in a sequence. Furthermore, the fitting sine curves were used to represent the variations of the fore-leg endpoints and the hind-leg endpoints separately. At last, the reciprocal of the fitting sine curve frequency can be calculated and the INTPART of double reciprocal was regarded as the fore-leg steps (FS) or the hind-leg steps (HS). The complete step (CS) was defined as the minimum of FS and HS. The finally gait frequency can be calculated by using the CS value to divide the duration of the sequence. To verify the proposal method, 28 depth image sequences of pig moving were acquired by using the KINECT depth camera, at the Rongxin pig farming of Danyang city in Jiangsu province, China. Another 28 sequences were achieved by mirror transforming along the horizontal direction to the native sequences. Experiments were taken for all the 56 sequences by using the proposal method. Experimental results show that the success rate of the method proposed in this paper is 82.1%, up to 92% for the situation when the pig moves continuously and the moving directions is perpendicular or nearly perpendicular to the axis of the depth camera only. Incorrect results often appear when the pig stays for a long time between steps or by non-cross steps, it needs to further adapt the proposal method. For the situation of rough variation of the pig body occurring in the sequence, the proposal method is not suited because the matching of skeleton points can not be achieved. That is the insufficient point of the proposal method. The proposal method would help to carry the further research of the abnormal gait of pig and construct the abnormal monitoring system by fusion of multi-source vision features. [ABSTRACT FROM AUTHOR]