The automatic recognition of human emotions is used to support several computing paradigms, like afective, positive and pervasive computing. Histograms of oriented gradients (HOG) have been successfully used with such a purpose, by processing facial images. However, the results of using HOG vary depending on the position of the facial components in the image used as input. This paper presents an extension to the HOG method, which was named Landmark-based Histograms of Oriented Gradients (LaHOG), that not only calculates HOG blocks in the whole face, but also in specific positions around selected facial landmarks. In this sense, the new method is more robust than its predecessor. In order to evaluate the capabilities and limitations of this proposal, we used it to recognize emotions in face images from the FACES database. In such a process we used two classification strategies: support vector machines and logistic regression. The results show that the extended method significantly surpasses the performance of HOG in the tested database.