1. A method, comprising: receiving, at a computing device, a plurality of templates of a plurality of objects, wherein a template of an object comprises a plurality of feature values sampled at corresponding points of a two-dimensional grid of points positioned over a particular view of the object and scaled based on a depth of the object at the particular view; receiving, at the computing device, an image of an environment; determining, by the computing device, feature values sampled at each point of the two-dimensional grid when the two-dimensional grid is positioned over a plurality of locations within the image of the environment and scaled based on respective depths of the plurality of locations within the image of the environment; and identifying, by the computing device based on the determined feature values, a matching template from the plurality of templates for a particular object located at one of the plurality of locations within the image of the environment.