Automatic gender recognition has been applied in many areas such as analyzing the structure of demographic social environments. In this paper we present a gender recognition algorithm based on uniform local binary pattern (LBP). LBP has proven to be very efficient image descriptor in many pattern recognition applications. In feature extraction step of the proposed method, a well known variant of LBP, uniform local binary pattern is utilized. Before applying LBP the face detection and alignment tasks are performed respectively. By doing alignment, the overlapping of similar part of face has been achieved. Then, we combine local uniform LBP histograms to create the final feature vector. We show that in the experiments carried out in Feret face dataset that the proposed method can achieve up to 93.57% recognition rate.