We first develop a simple method for detecting the local orientation of image contours and then use this detection
to design an edge-adaptive image interpolation strategy. The detection is based on total variation: small total
variation along a candidate curve implies that the image is approximately constant along that curve, which
suggests it is a good approximation to the contours. The proposed strategy is to measure the total variation over
a "contour stencil," a set of parallel curves localized over a small patch in the image. This contour stencil detection
is used to design an edge-adaptive image interpolation strategy. The interpolation is computationally efficient,
operates robustly over a variety of image features, and performs competitively in a comparison against existing
methods. The method extends readily to vector-valued data and is demonstrated for color image interpolation.
Other applications of contour stencils are also discussed.