A rotation-invariant template matching scheme using Orientation Code Difference Histogram (OCDH) is proposed. Orientation code features based on local distributions of pixel brightness are substantively robust against furious change in illumination plays a main role in designing the rotation-invariant matching algorithm. Since every difference between any pair of orientation codes is invariant in rotation of an image, we can elaborate a histogram feature by use of the differences, which can aggregate effective clues for searching rotated images through simple procedures. With gray scale images as targets, rotation angles of an image can be accurately estimated by the proposed method. It is fast and robust even in presence of some irregularities as brightness change by shading or highlighting. We propose a two-stage framework for realizing the rotation-invariant template matching based on OCDH. In the first stage, candidate positions are selected through evaluation of OCDH at every position, and then in the second stage, they are tested by use of a verification also based on orientation code features. The effectiveness of the proposed matching method has been shown through many kinds of experiments designed with real world images.