We present a histogram layer for artificial neural networks (ANNs). An essential aspect of texture analysis is the extraction of features that describe the distribution of values in local spatial regions. The proposed histogram layer directly computes the spatial distribution of features for texture analysis and parameters for the layer are estimated during backpropagation. We compare our method with state-of-the-art texture encoding methods such as the Deep Encoding Network Pooling (DEP) [43], Deep Texture Encoding Network (DeepTEN) [46], Fisher Vector convolutional neural network (FV-CNN) [13], and Multi-level Texture Encoding and Representation (MuLTER) [20] on three material/texture datasets: (1) the Describable Texture Dataset (DTD) [12]; (2) an extension of the ground terrain in outdoor scenes (GTOS-mobile) [43]; (3) and a subset of the Materials in Context (MINC-2500) dataset [6]. Results indicate that the inclusion of the proposed histogram layer improves performance. The source code for the histogram layer is publicly available 1 .