1. A method, comprising: receiving a plurality of templates of a plurality of objects, wherein a template comprises a plurality of feature values sampled at corresponding points of a two-dimensional grid of points positioned over a particular view of an object and scaled based on a depth of the object at the particular view; receiving an image of an environment; determining, by a computing device, a matrix representative of the image, wherein a row of the matrix comprises feature values sampled at a particular point of the two-dimensional grid positioned over one or more locations within the image and scaled based on depths of the one or more locations within the image; determining a plurality of response maps for corresponding feature values, wherein a response map for a particular feature value comprises similarity measurements between the particular feature value and feature values from the matrix representative of the image; determining at least one similarity vector corresponding to at least one template from the plurality of templates based on a combination of rows selected from one or more of the response maps for feature values in the at least one template at corresponding points of the two-dimensional grid; and using the at least one similarity vector to identify at least one matching template for at least one object located within the image of the environment.