Template matching method, template matching apparatus, and recording medium that records program for it
First Claim
1. A template matching method of detecting a position of an image region similar to a template image region from on a reference image, said method comprising the steps of:
- calculating a similarity of the image region to the template image region at rough position intervals;
estimating a similarity at a position, where the similarity is not calculated, making use of directional gradients of similarity obtained independently in a plurality of directions from the calculated values of similarity;
determining, based on the calculated values of similarity obtained in the calculating step and the estimated value of similarity obtained in the estimating step, a position having a small calculated or estimated value of the similarity as a position of a similar image region; and
restricting a value range of the estimated similarity value such that a difference between the estimated similarity value and the similarity of a periphery used for the estimation or the gradient of the similarity does not exceed a threshold value,wherein the calculating step, estimating step, determining step and restricting step are performed by a processor.
1 Assignment
0 Petitions
Accused Products
Abstract
There is provided a template matching method having a small amount of calculation and high detection accuracy. The amount of calculation is reduced while minimizing the degradation of the detection accuracy by calculating the similarity between a template image region and a reference image region at rough position intervals and estimating by interpolation of the similarity at a position where it is not calculated from the similarity calculated at a peripheral position. At the time, even if the gradient of a similarity greatly changes at the minimal point, estimation can be realized with high accuracy by executing estimation making use of the directional gradients of the similarity obtained in plural different directions independently. Additionally, occurrence of wrong detection is avoided by the restriction to disable the difference between the estimated similarity and adjacent similarity to exceed a threshold, which is defined based on the similarity between the template image region and the image region obtained by moving the template image region in the same direction as or in the opposite direction to the direction of estimation.
13 Citations
12 Claims
-
1. A template matching method of detecting a position of an image region similar to a template image region from on a reference image, said method comprising the steps of:
-
calculating a similarity of the image region to the template image region at rough position intervals; estimating a similarity at a position, where the similarity is not calculated, making use of directional gradients of similarity obtained independently in a plurality of directions from the calculated values of similarity; determining, based on the calculated values of similarity obtained in the calculating step and the estimated value of similarity obtained in the estimating step, a position having a small calculated or estimated value of the similarity as a position of a similar image region; and restricting a value range of the estimated similarity value such that a difference between the estimated similarity value and the similarity of a periphery used for the estimation or the gradient of the similarity does not exceed a threshold value, wherein the calculating step, estimating step, determining step and restricting step are performed by a processor. - View Dependent Claims (2, 3, 4)
-
-
5. A template matching apparatus for detecting the position of an image region similar to a template image region from on a reference image, comprising:
-
means for calculating a similarity of the image region to the template image region at rough position intervals; means for estimating a similarity at a position, where the similarity is not calculated, making use of gradients of the similarity obtained independently in a plurality of directions from the calculated values of similarity; means for determining, based on the calculated values of similarity obtained by the means for calculating and the estimated value of similarity obtained by the means for estimating, a position having a small calculated or estimated value of the similarity as a position of a similar image region; and means for restricting a value range of the estimated similarity value such that a difference between the estimated similarity value and the similarity of a periphery used for the estimation or the gradient of the similarity does not exceed a threshold value. - View Dependent Claims (6, 7, 8)
-
-
9. A non-transitory computer readable recording medium that records a program for causing a computer to execute a template matching method of detecting the position of an image region similar to a template image region from on a reference image, wherein:
-
the method calculates a similarity of the image region to the template image region at rough position intervals; the method estimates a similarity at a position, where the similarity is not calculated, making use of gradients of similarity obtained independently in a plurality of directions from the calculated values of similarity; the method determines, based on the calculated values of similarity obtained in the calculating step and the estimated value of similarity obtained in the estimating step, a position having a small calculated or estimated value of the similarity as a position of a similar image region; and the method restricts a value range of the estimated similarity value such that a difference between the estimated similarity value and the similarity of a periphery used for the estimation or the gradient of the similarity does not exceed a threshold value. - View Dependent Claims (10, 11, 12)
-
Specification