1. An image processing device comprising: a memory for storing a template for pattern matching and an image of a subject; a display unit for displaying the template and the image of the subject; a region specifying means for specifying a region in the image of the subject that is to be used for calculation of difference information with respect to a template image; and difference information computing means for computing the difference information between the region in the image of the subject specified by the region specifying means and the template image based on either the equation diff u , v ⁡ ( i , j ) = ( f ⁡ ( i + u , j + v ) - f _ ∑ x ⁢ ∑ y ⁢ ( f ⁡ ( x + u , y + v ) - f _ ) 2 - g ⁡ ( i , j ) - g _ ∑ x ⁢ ∑ y ⁢ ( g ⁡ ( x , y ) - g _ ) 2 ) 2 × k , ⁢ where diff u,v (i, j) is the difference information at coordinates (i, j) in an x×y region having a starting point with coordinates (u, v) in the searched image, f is image data at each of the coordinates of the searched image, g is image data at each of the coordinates of the template, f is average image data in an xxy region having a starting point with coordinates (u, v) in the searched image, g is average image data in the template, and k is a coefficient for preventing values from becoming too small, or the equation diff u , v ⁡ ( i , j ) = ( f ⁡ ( i + u , j + v ) - f _ ∑ x ⁢ ∑ y ⁢ ( f ⁡ ( x + u , y + v ) - f _ ) 2 - g ⁡ ( i , j ) - g _ ∑ x ⁢ ∑ y ⁢ ( g ⁡ ( x , y ) - g _ ) 2 ) × k , ⁢ where diff u,v (i, j) is the difference information at coordinates (i, j) in an x×y region having a starting point with coordinates (u, v) in the searched image, f is image data at each of the coordinates of the searched image, g is image data at each of the coordinates of the template, f is average image data in an xxy region having a starting point with coordinates (u, v) in the searched image, g is average image data in the template, and k is a coefficient for preventing values from becoming too small, and outputting the difference information for display on the display unit.