Hierarchical Temporal Memory (HTM) is a neuromorphic algorithm that emulates the working principles of neocortex useful for solving image classification problems. Image pixels are transformed to binary HTM feature vectors following a set of weighted synaptic operations that combines the principles of sparsity, hierarchy, and modularity. The sparsity of input pixel selection and feature encoding is introduced by setting initial weights as random following a uniform distribution. In contrast to this approach, we propose that sparsity can be achieved by a deterministic approach of setting the input weights based on local mean intensity of pixels as a window operation. The initial binary weights are selected and are then multiplied by the original image pixels to either suppress inputs with low potential or preserve input pixels with high potential. Feature selection is then performed by selecting high potential pixels, which are preserved and are greater than the mean of neighbouring pixels, and suppressing the rest. The proposed design was verified on a face image recognition problem. Results show that proposed approach not only allow to preserve feature sparsity, but also to increase recognition accuracy for image classification with HTM.