WO2005101313A1 - Template matching device - Google Patents

Template matching device Download PDF

Info

Publication number
WO2005101313A1
WO2005101313A1 PCT/JP2005/007487 JP2005007487W WO2005101313A1 WO 2005101313 A1 WO2005101313 A1 WO 2005101313A1 JP 2005007487 W JP2005007487 W JP 2005007487W WO 2005101313 A1 WO2005101313 A1 WO 2005101313A1
Authority
WO
WIPO (PCT)
Prior art keywords
similarity
template
partial image
image signal
extraction
Prior art date
Application number
PCT/JP2005/007487
Other languages
French (fr)
Japanese (ja)
Inventor
Hiroyuki Abe
Original Assignee
Nikon Corporation
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nikon Corporation filed Critical Nikon Corporation
Priority to JP2006512405A priority Critical patent/JP4208011B2/en
Publication of WO2005101313A1 publication Critical patent/WO2005101313A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • G06V10/7515Shifting the patterns to accommodate for positional errors

Definitions

  • the present invention relates to a template matching apparatus that performs template matching on an input image signal including image information or audio information.
  • Template matching is a process of searching for a partial image signal (target) that matches a known template signal from the input image signal, and specifying the position of the target (match position).
  • the matching operation between the calculation partial image signal extracted from the input image signal and the known template signal is repeatedly performed while the extraction position of the calculation partial image signal is gradually moved. Then, by comparing the results of the matching operation at each position in the input image signal, the matching position is specified.
  • a well-known cross-correlation method, a sequential error test, or the like is used for the matching operation.
  • the movement is uniformly performed at a preset interval in the entire input image signal or within a predetermined range (for example, see Japanese Patent Application Laid-Open No. 2000-200).
  • a predetermined range for example, see Japanese Patent Application Laid-Open No. 2000-200.
  • the extraction position of the calculation partial image signal is moved at a fixed interval set before starting the template matching.
  • coarse template matching is performed uniformly at a predetermined large moving interval. After narrowing down to a predetermined range including the matching position, it has been proposed to perform the same fine template matching at a predetermined small movement interval within the range to specify the matching position. ing.
  • An appropriate constant value of the moving interval is a value that can accurately and efficiently identify a matching position in the input image signal in a short time, and differs depending on the input image signal and the template signal.
  • the matching position can be specified (or the predetermined range including the matching position can be narrowed down) accurately, but the number of repetitions of the matching calculation is increased, so that an unnecessary It takes time. Conversely, if the set value of the movement interval is larger than an appropriate fixed value, the number of repetitions of the matching operation is reduced, thereby shortening the time.
  • specifying the matching position is accurate. This is not always the case, and it may become impossible to perform pseudo-matching or matching. Disclosure of the invention
  • An object of the present invention is to provide a template matching apparatus capable of reliably identifying a matching position with a reduced time.
  • the template matching apparatus includes: an extracting unit that sequentially changes an extraction position from among input image signals to extract a partial image signal for calculation; and a known image processing unit that extracts the partial image signal extracted by the extracting unit.
  • a second calculating means for obtaining an index relating to the similarity between the partial image signal and a known template signal each time the partial image signal is extracted by the extracting means, Further, taking into account the index regarding the similarity at the current extraction position obtained by the second calculation means, the current extraction position is shifted from the current extraction position to the next extraction position.
  • a moving amount determining unit for determining a moving amount in the extracting unit; and a similarity between the partial image signal and a known template signal in the first calculating unit based on a calculation result by the second calculating unit. At least with the judgment means for judging whether or not to perform the calculation of
  • FIG. 1 is a schematic diagram of the observation device 10.
  • FIG. 2 is a diagram illustrating an input image 21, a template image 22, a target 23, and a partial image 24 for calculation.
  • FIG. 3 is a flowchart showing an overall processing procedure in the template matching of the first embodiment.
  • FIG. 4 is a flowchart showing a processing procedure in step S5 of FIG. 5A and 5B illustrate the density value Amn at the position (m, n) of the template image 22 and the density value B at the position (m, n) of the partial image 24 for calculation, respectively.
  • FIG. 5A and 5B illustrate the density value Amn at the position (m, n) of the template image 22 and the density value B at the position (m, n) of the partial image 24 for calculation, respectively.
  • FIG. 6A and FIG. 6B are diagrams illustrating the magnitude change of the movement interval (movement amount M x) according to the positional relationship with the coincidence position (X I, Y 1).
  • FIG. 7 is a flowchart showing a part of the processing procedure in the template matching of the second embodiment.
  • FIG. 8A and 8B are diagrams for explaining the movement of the extraction position (X2, Y2) by the processing of FIG. ⁇
  • FIGS. 9A, 9B, and 9C are diagrams for explaining the matching calculation based on the density histogram.
  • FIG. 10 is a flowchart showing the template matching processing procedure of the present embodiment. It is one.
  • FIG. 11A, FIG. 11B, and FIG. 11C are diagrams illustrating the relationship between the asymmetry of the distribution shape of the density histogram and the skewness.
  • the template matching process is step-controlled based on the similarity determination.
  • the template calculation processing is cut-controlled in the matching calculation processing based on the similarity determination.
  • control is performed by combining the processing of the first to fourth embodiments and the processing of the fifth embodiment.
  • the observation device 10 includes a stage 11, an optical system 12, a camera 13, and an image processing unit 14.
  • Stage 11 supports sample 1 OA.
  • the optical system 12 forms an optical image of a local region of the sample 1OA.
  • the camera 13 captures an optical image of the sample 1OA with an image sensor (not shown), and outputs an image signal to the image processing unit 14.
  • the image processing unit 14 When the image processing unit 14 captures an image signal from the camera 13, it converts the image signal into a digital image of predetermined bits (for example, 8 bits), and stores the digital image in a memory (not shown) as an input image. Then, template matching described later is performed on the input image.
  • the sample 10A is, for example, a semiconductor wafer, a liquid crystal substrate, a printed circuit board, a biological specimen (for example, cells), or the like. Using the observation device 10, observation, inspection, and alignment of the sample 1OA are performed.
  • Template matching is performed, for example, by using a known template from the input image 21 shown in FIG. This is a process of searching for a target 23 that is a partial image that matches the late image 22 and specifying the position of the evening target 23 (hereinafter referred to as “match position ( ⁇ ,, Y)”.
  • the matching operation between the partial image 24 for operation extracted from the input image 21 and the template image 22 causes the extraction position ( ⁇ 2 , ⁇ 2 ) of the partial image 24 for operation to be slightly reduced.
  • the extraction position ( ⁇ 2 , ⁇ 2 ) is moved from the upper left corner to the lower right corner of the input image 21 in the figure.
  • each scanning line is parallel to the X direction, and the X direction parallel to the scanning line is called “horizontal direction”, and the ⁇ direction perpendicular to the scanning line is called “vertical direction”. .
  • the input image 21 corresponds to “input image signal including image information”.
  • the template image 22 corresponds to a “template signal including image information”.
  • the calculation partial image 24 corresponds to “calculation partial image signal including image information”.
  • the template processing of the first embodiment is performed by the image processing unit 14 according to the procedure (steps S1 to S6) of the flowchart shown in FIG. Also, the processing of step S5 in FIG. 3 (that is, the movement processing of the extraction position (X 2 , Y 2 ) of the partial image 24 for calculation) is performed according to the procedure of the flowchart shown in FIG. 15). Further, in the template matching of the first embodiment, the moving interval of the extraction position (X 2 , Y 2 ) of the partial image for calculation 24 is set to an appropriate constant value before starting this template matching. There is no need to keep it. The processing shown in FIG. 3 can be started as soon as the input image 21 is captured without performing such preprocessing. In step S1 of FIG.
  • the image processing unit 14 extracts a partial image 24 for calculation from the input image 21.
  • the first extraction is performed, for example, from the initial position of the upper left corner of the input image 21 (FIG. 2).
  • the calculation partial image 24 has a rectangular shape with the same size (number of pixels) in both the vertical and horizontal directions as the template image 22.
  • FIG. 2 shows the vertical and horizontal sizes (the number of pixels) of the template image 22 by Tx and Ty. Both the partial image 24 and the template image 22 are smaller than the input image 21 (the number of pixels is small).
  • Step S2 the image processing unit 14 performs a matching operation between the template image 22 and the partial image 24 for calculation extracted in Step S1.
  • a known cross-correlation method is used as an example of the matching operation.
  • the matching operation is performed by calculating the density value at the position (m, n) of the partial image 24 shown in FIG. 5; ⁇ and the density value A mn at the same position (m, n) of the template image 22. This is performed according to the following equation (1).
  • A Average value of A mn 'B: Average value of B mn
  • the result of the matching calculation is a normalized cross-correlation coefficient C (1 1 ⁇ C ⁇ 1), which corresponds to the similarity between the calculation partial image 24 and the template image 22.
  • the similarity is one of the “index of similarity” between the partial image 24 and the template image 22.
  • the tendency is that the larger the cross-correlation coefficient C corresponding to the degree of similarity (ie, closer to “1”), the higher the similarity between the partial image 24 and the template image 22, and the extraction position (X 2 , In many cases, Y 2 ) is close to the matching position (XX,).
  • the image processing unit 14 determines the similarity, that is, the cross-correlation coefficient C, which is the result of the matching calculation, in the next step S 3, at the extraction position (24 2 , ⁇ ⁇ Save in the memory in the image processing unit 14 in association with 2 ).
  • the processing is completed for one extraction position in the input image 21 (X 2, Y 2) .
  • the extraction position ( ⁇ 2 , ⁇ 2 ) of the calculation partial image 24 is moved to the next position, that is, when Step S4 is Yes, the process proceeds to Step S5.
  • step S 5 is a process of moving the extraction position of the partial image 24 for computation (X 2, Y 2), carried out
  • step S11 the image processing unit 14 moves to the next position. It is determined whether the direction is the horizontal direction (the direction parallel to the scanning line). For this determination, the X coordinate of the current position in the input image 21 (that is, the position coordinate on the scanning line) is used. Then, unless the X coordinate of the current position corresponds to the right end of the input image 21 (that is, the end point of the scanning line), it is determined to be “horizontal” (S 11 is Yes).
  • the image processing unit 14 proceeds to the process of step S12, and executes the similarity (the mutual phase relationship) at the current position.
  • the amount of movement ⁇ is calculated by substituting the similarity (cross-correlation coefficient C) at the current position into the “similarity” in the following equation (2).
  • the calculation of the movement amount ⁇ is very simple. .
  • Equation (2) includes the number of pixels ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ in the horizontal direction of the template image 22 (see FIG. 2). This number of pixels ⁇ is the same as the number of pixels in the horizontal direction of the partial image 24 for calculation.
  • the -coefficient is an empirical value (for example, 1/2) defined in the range that satisfies 0 ⁇ 1.
  • means that the extraction position ( ⁇ 2 , ⁇ 2 ) is moved in units of pixels of the input image 21 so that the decimal part is rounded down and converted to an integer.
  • the amount of movement ⁇ ⁇ obtained by equation (2) has a low similarity at the current position (the mutual correlation coefficient C) (that is, close to “0”), and a low similarity between the partial image 24 and the template image 22.
  • the maximum value of the movement amount ⁇ is when the similarity is “0”, and is the floor (Tx / 4).
  • the minimum value of the movement amount Mx is when the similarity is “1”, and is expressed as floor [(Tx / 4) X (1 ⁇ k,)]. If the movement amount Mx is determined to be "0 pixels”, the actual movement amount is set to "1 pixel".
  • the image processing unit 14 sets the extraction position (, Y 2 ) of the partial image 24 for calculation in the next step S 13 by the movement amount ⁇ in the horizontal direction from the current position. Move to the next position away. Then, in step S1 in Fig. 3, Return to the processing and repeat the extraction of the partial image 24 for calculation (S 1) —matching operation with the template image 22 (S 2) —save result (S 3) at the new extraction position (X 2 , Y 2 ) .
  • the extraction position (X 2 , Y 2 ) reaches the end point of the scanning line (i.e. the right end of the input image 21), after the extraction position (chi 2, the process of step S 1 to S 3 against the Upsilon 2) is completed, move further to the next position In this case (34 is 63), the image processing unit 14 determines that the moving direction to the next position is “vertical direction (direction perpendicular to the scanning line)” in step S11 in FIG. Step S11 is No). '.
  • the image processing unit 14 When moving the extraction position (X 2 , Y 2 ) of the calculation partial image 24 in the vertical direction, the image processing unit 14 proceeds to the process of step S14, and performs similarity at each position on the current scanning line. Calculate the amount of movement My from the current scan line to the next scan line, taking into account the (cross-correlation coefficient C). Specifically, the similarity (cross-correlation coefficient C) at each position on the current scan line is read from the memory, and the average value of the similarities is calculated by the following equation (3), To calculate the travel distance My. Each position on the current scan line is, for example, all positions on the current scan line (including the current position). The calculation of such a movement amount My is very simple.
  • My floor [(Ty / 4) X ( row mean of 1-k 2 x similarity)] - (3) in the equation (3) includes vertical pixel number Ty of the template image 22 (see FIG. 2) It is. This number of pixels Ty is the same as the number of pixels in the vertical direction of the partial image 24 for calculation.
  • the coefficient k 2 is an empirical value (for example, 1/2) determined within a range satisfying 0 and k 2 ⁇ l.
  • the amount of movement My calculated by equation (3) is small for the average similarity (cross-correlation coefficient C) in the current scanning line (ie, close to “0”),
  • the similarity between the minute image 24 and the template image 22 is low on average, and becomes larger as the current scan line is farther from the matching position ( ⁇ , ⁇ ,).
  • the maximum value of the travel distance My is 2005/007487
  • the image processing unit 14 sets the extraction position (' ⁇ 2 , ⁇ 2 ) of the partial image 24 for calculation in the next step S15 vertically from the current scanning line. It is moved in the direction to the next scanning line separated by the moving amount My, and in the horizontal direction to the left end of the input image 21 (that is, the starting point of the next scanning line). Then, returning to the process of step S1 in FIG. 3, at a new scanning line extraction position (X 2 , Y 2 ), extraction of the calculation partial image 24 (S 1) —combination with the template image 22 Matching operation (S 2)-Save result (S 3) is repeated.
  • step S6 the similarity (cross-correlation coefficient C) at a plurality of different positions in the input image 21 is compared in magnitude, whereby the value is the largest, and the similarity with the template image 22 is the highest.
  • the extraction position (X 2 , Y 2 ) of the partial image 24 is specified as the matching position ( ⁇ , ⁇ ,). This completes the template matching process for the input image 21.
  • the extraction position (X 2 , Y 2 ) when the extraction position (X 2 , Y 2 ) is moved in the horizontal direction, if the similarity at the current position is small, the result of equation (2) (the amount of movement ⁇ ) becomes large. At positions away from ⁇ 1; ⁇ ,), the extraction positions ( ⁇ 2 , ⁇ 2 ) can be moved efficiently and appropriately at large intervals. Conversely, if the similarity at the current position is large, the result of equation (2) (the amount of movement ⁇ ⁇ ⁇ ) becomes small, and when the position approaches the matching position ( ⁇ , ⁇ ), the extraction position ( ⁇ 2 , ⁇ 2 ) can be moved appropriately at small intervals. In particular, when it reaches the vicinity of the matching position ( ⁇ ,, ⁇ ,), the extraction position ( ⁇ 2 , ⁇ 2 ) can be appropriately moved at an interval corresponding to “1 pixel”.
  • FIG. 6 (a) and FIG. 6 (b) show, for example, the magnitude change of the movement interval (movement amount ⁇ ) according to the positional relationship with the matching position ( ⁇ , ⁇ , ⁇ ).
  • FIG 6 Alpha extraction position (X 2, Y 2) and the matching position ( ⁇ ⁇ ⁇ ,) a position step change in the relationship between the shown side by side in order of time.
  • FIG 6.alpha Mutually extracted position adjacent in the longitudinal direction ( ⁇ 2, ⁇ 2) 'How the deviation amount of and corresponds to the moving distance (moving amount ⁇ ).
  • FIG 6.beta extraction position ( ⁇ 2, ⁇ 2) the trajectory of the indicated "-”. Also in these figures, it can be seen that the movement of the extraction position ( ⁇ 2 , ⁇ 2 ) is large at a distance from the matching position ( ⁇ , ⁇ ,), and becomes smaller as the position approaches the matching position (X ⁇ ).
  • the matching position (the position away from X ⁇ ) becomes larger. Since the extraction position ( ⁇ 2 , ⁇ 2 ) of the partial image 24 is moved, the number of repetitions of the matching operation can be reduced, and the processing time of the template matching can be shortened. Since the extraction position (X 2 , Y 2 ) of the partial image 24 moves as the distance approaches (the minimum unit of the movement amount is “1 pixel”), the exact matching position ( ⁇ ⁇ , ⁇ ,) Can be specified.
  • the interval at which the extraction position (X 2 , Y 2 ) of the J partial image 24 is moved little by little as in the related art does not need to be set in advance to an appropriate constant value.
  • the moving interval (moving amount Mx, My) is set according to the positional relationship with the matching position yes ( ⁇ ,). Therefore , the matching position ( ⁇ , ⁇
  • template matching (the processing in Fig. 3) can be started immediately after the input image 21 is captured. Is simplified. '
  • the extraction position ( ⁇ 2 , ⁇ 2 ) of the calculation partial image 24 is moved along a predetermined direction (for example, the direction of raster scanning) and at least the current Considering the degree of similarity at the position (for example, using Equation (2) or Equation (3)), to calculate the movement amount Mx, My to the next position, the matching position ( ⁇ ⁇ , ⁇ ) can easily set an appropriate movement interval according to the positional relationship.
  • the calculation of the amount of movement Mx, My performed sequentially at each position is very simple, and the addition of this calculation does not complicate the template matching process.
  • the extraction position (X 2 , Y 2 ) of the calculation partial image 24 can be moved efficiently with reference to the size of the template image 22.
  • the maximum value of the movement amounts M x, My is set to 1 Z 4 of the size of the template image 22 (the number of pixels T x, T y),
  • the extraction position (X 2 , Y 2 ) of the partial image 24 for calculation is largely moved, it is possible to avoid a situation in which the partial image 24 passes through the evening get 23.
  • the extraction position ( ⁇ 2 , ⁇ 2 ) of the calculation partial image 24 is moved along the raster scanning direction, and at the same time each position ( ⁇ ⁇ In order to calculate the amount of movement My to the next scanning line in consideration of the similarity at all positions, for example, it is easy to match the position of the match (X,, Y) during template matching.
  • An appropriate scanning line interval can be set.
  • the moving amount My to the next scanning line is calculated based on the average value of the similarities at each position (for example, all positions) on the current scanning line. (For example, using equation (3)), an appropriate scanning line interval can be set stably without being affected by noise.
  • steps S21 to S25 of the flowchart shown in FIG. 7 is performed instead of step S13 of the flowchart of FIG. 4 described above.
  • the image processing unit 14 is used in step S 12 in FIG. 7487
  • the extraction position (X 2 , Y 2 ) of the partial image 24 for operation is actually moved. Then, the processing of steps S21 to S23 in FIG. 7 is performed.
  • step S21 the image processing unit 14 determines whether or not the current position in the input image 21 corresponds to the starting point of the scanning line (that is, the left end of the input image 21). If it is located at the start point of the scanning line (that is, if S21 is Yes), the process proceeds to step S24, and the extraction position (X 2 , Y 2 ) of the partial image 24 for calculation is set in the horizontal direction. Move by the movement amount Mx (see Fig. 8A). After that, the process returns to step S1 in FIG.
  • step S 22 if it is not located at the start point of the scanning line (that is, if S 21 is N 0), the process proceeds to step S 22, and based on the similarity (cross-correlation coefficient C) at the current position, It is determined whether or not conditional expression (4) is satisfied.
  • the coefficient in the conditional expression (4) is the same as the coefficient in the above-mentioned expression (2).
  • Threshold T s using the entire or al determined statistical value of the input image 21 (i.e. the average density and density range) is obtained by calculation by the following equation (5). .
  • T s average concentration / concentration range (5)
  • step S22 If the condition (4) in step S22 is satisfied, the cross-correlation coefficient C corresponding to the current similarity is large (that is, close to “1”), and the partial image extracted at the current position 24 And the template image 22 has a high similarity, and the current extraction position (X 2 , Y 2 ) reaches the vicinity of the matching position ( ⁇ , ⁇ ,). Then, as a result of the determination in step S22, the similarity at the current position indicates that “the extraction position is 2 , ⁇ 2 ) has reached the vicinity of the matching position yes ⁇ ,)” (that is, if S 22 If Yes, go to the next step S23.
  • step S23 it is determined whether or not the following conditional expression (6) is satisfied based on the similarity at the current position and the “similarity at the position immediately before the current position”. Do.
  • the coefficient k 3 is an empirical value determined within a range satisfying 0 ⁇ k 3 ⁇ 1.
  • the threshold value T B is calculated by the following equation (7) using statistical values (that is, standard deviation and density range) obtained from the entire input image 21. .
  • the case where the conditional expression (6) in step S23 is satisfied is a case where the current similarity greatly increases as compared with the previous similarity. In other words, the previous similarity was extremely small compared to the current similarity. Therefore, the case where the conditional expression (6) is satisfied means that the cross-correlation coefficient C corresponding to the previous similarity is small (that is, close to “0”), and the part extracted at the previous position It is considered that the similarity between the image 24 and the template image 22 is low, and the previous extraction position (X 2 , Y 2 ) is far from the matching position (X, Y). When the result of the judgment indicates that the similarity at the previous position indicates that “the extracted position ( ⁇ 2 , ⁇ 2 ) is far from the matching position ⁇ ” (that is, if S 23 is Yes) Goes to the next step S25.
  • conditional expression (4) in step S22 is satisfied and the conditional expression (6) in step S23 is satisfied is that the extraction position (X 2 , Y 2
  • the similarity sharply increases at the current position when the) is greatly moved For example, a white point (maximum density value) included in the black background (minimum density value) of the input image 21 is This can happen with template matching like searching.
  • conditional expressions (4) and (6) are satisfied, even if the extraction position ( ⁇ 2 , ⁇ 2 ) is moved small considering the current large similarity, if the extraction position is moved forward as it is, the matching position will be ).
  • step S25 the next position is set between the current position and the immediately preceding position (see FIG. 8 ⁇ ), and the extraction position ( ⁇ 2 , ⁇ . 2 ) is set to the immediately preceding position. After returning to the position, move it forward by the amount of movement ⁇ .
  • the extraction position (X 2 , Y 2 ) is moved backward according to the difference from 15. After that, the process returns to the process of step S1 in FIG.
  • step S 2 instead 5, proceeds to step S 2 4, thereby extracting position (X 2, Y 2) is moved by the amount of movement M x forward. After that, the process returns to the process of step S1 in FIG.
  • the partial image 24 for calculation passes through the evening get 23, that is, the extraction position (X 2 , Y 2 ) passes the matching position (X ⁇ ).
  • the matching position ( ⁇ ⁇ ,, ⁇ ,) in the input image 21 can be reliably specified.
  • the matching position ( ⁇ , ⁇ ) can be specified accurately and efficiently in a short time.
  • the matching operation by the residual sequential test method is based on the density value B at the position (m, n) of the partial image 24 shown in FIG. 5 and the density value ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ at the same position (m, n) of the template image 22.
  • This is performed by the following equation (8) or equation (9), where D is the sum of absolute values of the density differences, and E in equation (9) is the sum of squares of the density differences.
  • the results D and E of the matching operation correspond to the degree of similarity between the partial image 24 and the template image 22.
  • the smaller the value (that is, the residual) the more similar the partial image 24 and the template image 22 are.
  • This means that the extraction position (X 2 , Y 2 ) is close to the matching position (X ,, ⁇ ,). Since the amount of calculation is small in the matching operation by the method, further speedup is possible.
  • step S2 in FIG. 3 the determination in steps S22 and S23 in FIG. 7 (that is, the extraction position (X 2 , Y 2 )
  • the following conditional expressions (12) and (13) may be used to determine whether or not to return to.
  • conditional expression (12) is used instead of conditional expression (4), and conditional expression (13) is replaced by conditional expression (6).
  • Threshold T s of the condition (12) is the same as the formula (5).
  • Threshold T B of the condition (1.3) is the same as the formula (7).
  • the partial image 24 for the calculation passes through the target 23 in the same manner as described above (that is, the extraction position (X 2 , Y 2 )
  • the position (by passing X ,, ⁇ ) can be reliably avoided.
  • the matching operation in step S2 in FIG. 3 is not limited to the cross-correlation method and the residual sequential test method described above, but may be a feature amount such as a density histogram or a moment of inertia.
  • a matching calculation is performed based on a density histogram and an inertia moment.
  • a density histogram H of the template image 22 is created in advance, for example, as shown in FIG. 9 ⁇ , and each time a partial image 24 for calculation is extracted, the density histogram H of the partial image 24 is extracted. H 24 is created.
  • the horizontal axis concentration values of concentration histograms H 24, H 22, the vertical axis is the number of pixels.
  • the matching calculation is performed by counting the number of pixels in the overlapping portion of the two density histograms H 24 and H 22 (the hatched portion in FIG. 9B).
  • the aggregate value F as a result of the matching operation corresponds to the similarity between the partial image 24 and the template image 22.
  • the larger the value the higher the similarity between the partial image 24 and the template image 22. It indicates that the extraction position (X 2 , Y 2 ) is close to the matching position ( ⁇ ,, ⁇ ,).
  • the moment of inertia is the distance (xi, yi) from the origin of all pixels of a certain area in the image and the density value wi to the inertia around the origin, as shown in the following equations (14) to (16). This is the value assigned to the moment formula. ⁇
  • the matching operation based on the moment of inertia for example created inertia 1 22 of the template image 22 in advance, for each extracted partial image 24 power for operation, the moment of inertia 1 24 of the partial image 24 is created.
  • the absolute value of the difference between the two moments of inertia I 24 and l n is calculated, and the smaller the value is, the higher the similarity between the partial image 24 and the template image 22 is, and the extraction positions (X 2 , Y 2 ) match. Indicates that it is close to the position ( ⁇ ,, ⁇ ,).
  • step S2 in FIG. 3 When the matching operation based on the density histogram and the matching operation based on the moment of inertia are performed in step S2 in FIG. 3 as described in FIGS. 9 ⁇ and 9 9, the movement amount Mx in steps S12 and S14 in FIG. , My can be calculated using the above equations (2) and (3).
  • step S2 in FIG. 3 when the matching calculation based on the density histogram is performed in step S2 in FIG. 3, the determination in steps S22 and S23 in FIG. X 2 , Y 2 ) can be determined using the above conditional expressions (4) and (6).
  • the similarity (total value F) is normalized, and the normalized value (0 to 1) is substituted into conditional expressions (4) and (6).
  • parts of image 24 for computation will past the target 23 (i.e. extraction position (chi 2, Upsilon 2) will past means to match the position (chi ,, Upsilon,)) Such a situation can be reliably avoided.
  • the matching operation based on the density histogram is performed, for example, as shown in Fig. 9 ⁇ . This may be performed by counting the number of pixels of the absolute value of the difference between the two density histograms H 24 and H 22 (the hatched portion in FIG. 9C).
  • the aggregate value G which is the result of the matching operation in this case, corresponds to the similarity between the partial image 24 and the template image 22, and the smaller the value, the higher the similarity between the partial image 24 and the template image 22. It indicates that the extraction position (X 2 , ⁇ ,) is close to the matching position (X ⁇ ).
  • the similarity (total value G) at the current position is normalized, and the normalized value (0 to 1) is substituted for the “similarity” in equation (10).
  • the similarity (total value G) at each position on the current scanning line is normalized, and the average value of the normalized values (0 to 1) is calculated as " Substituting into "Line mean of similarity".
  • the determination in steps S22 and S23 in FIG. X 2 , Y 2 ) can be determined using the above conditional expressions (1 2) and (1 3).
  • the threshold value ⁇ ⁇ of the conditional expression (13) is calculated by the following expression (17).
  • the similarity (total value G) is normalized, and the normalized values (0 to 1) are substituted into conditional expressions (12) and (13). Therefore, as in the above, it is possible to reliably avoid the situation in which the partial image 2 for calculation passes the target 23 (that is, the extraction position ( ⁇ 2 , ⁇ 2 ) passes the ,, ⁇ ,) at the matching position). it can.
  • the maximum values of the movement amounts Mx and My may be set to values other than “1Z4 of the number of pixels Tx and 'Ty” (for example, 1 ⁇ 2 of the number of pixels Tx and Ty).
  • the setting of the maximum value of the movement amount Mx, My may be changed according to the type of the matching operation. For example, when performing a matching operation based on the density histogram, the maximum values of the movement amounts MX and My can be set larger than those of the cross-correlation method and the residual sequential test method. Therefore, it is possible to further increase the speed.
  • the “index of similarity” at each position (for example, all positions) on the current scan line is considered.
  • the present invention is not limited to this. The present invention can be applied not only to all positions but also to a case where a part (for example, every other position) on the current scanning line is selectively considered. In that case, the "similarity indicator" at the current position need not be considered.
  • the average “similarity” at each position (at least a part of positions) on the current scan line is calculated.
  • the present invention is not limited to this.
  • the present invention is applicable not only to the average value but also to the case where the largest “index of similarity” at each position (all or part) on the current scanning line is considered.
  • the moving direction of the extraction position ( ⁇ 2 , ⁇ 2 ) is determined in advance (for example, an example of moving along the raster scanning direction) has been described. It is not limited to this.
  • the moving direction of the extraction position ( ⁇ 2 , ⁇ 2 ) is determined in advance without considering the moving direction of the extraction position (X 2 , Y 2 ) and considering at least one of the “similarity indicators” obtained so far. Both the direction and the movement amount may be determined. In this case, the "similarity indicator" at the current position need not be considered.
  • the template matching processing is step-controlled based on the similarity determination.
  • the matching processing is cut off based on the similarity determination in the template matching processing. Control.
  • the template matching according to the present embodiment is performed according to the procedure (steps S1 to S8) of the flowchart shown in FIG.
  • the matching operation (S 4) between the operation partial image 24 extracted from the input image 21 and the template image 22 is performed to extract the operation partial image 24. It is repeated as needed while moving the position (X 2 , Y 2 ) little by little.
  • the input image 21 corresponds to “input signal including image information”.
  • the template image 22 corresponds to a “template signal including image information”.
  • the calculation partial image 24 corresponds to “calculation partial signal including image information”.
  • the skewness S22 of the template image 22 is calculated up to the first time of the determination processing (S3) of whether or not to perform the matching operation (S4). Is a statistical scale (skewness) indicating the asymmetry of the distribution shape of the density histogram of the template image 22. Specifically, “X ran ” in the following equation (18) Then, the skewness S22 of the template image 22 is calculated by substituting the density value A Chris ra at the position (m,) of the template image 22 shown in Fig. 5A. N is the total number of pixels in the template image 22, and is the standard deviation.
  • X The skewness S 22 of the mean value template image 22 of Xmn, is described with reference to concentration histograms shown in FIGS. 11A-11 C.
  • the horizontal axis of the density histogram shown in Fig. 11A-Fig. 11C is the density value, and the vertical axis is the number of pixels.
  • the skewness S 22 0.
  • the distribution shape is asymmetric and skewed to the left (that is, there are many pixels with low density) as in the density histogram shown in FIG. 1 IB, the skewness S 22 ⁇ 0.
  • step S1 the image processing unit 14 extracts a partial image 24 for calculation from the input image 21.
  • the calculation partial image 24 has a rectangular shape having the same size (number of pixels) in both the vertical and horizontal directions as the template image 22.
  • the calculation partial image 24 and the template image 22 are both smaller than the input image 21 (the number of pixels is small).
  • Step S 2 the image processing unit 14 calculates the skewness S 24 of the partial image 24 for computation extracted in step S 1.
  • Skewness S 24 in this case is a statistical measure of the asymmetry of the concentration histograms of the distribution shape of the partial image 24 (skeraess). Specifically, by substituting the density value B mn at the position (m, n) of the partial image 24 shown in FIG. 5B into “X” of the above equation (1), the distortion of the partial image 24 for calculation is obtained. The calculation of the degree S 24 is performed, where N in Equation (1) is the total number of pixels of the partial image 24, and ⁇ is the standard deviation.
  • Skewness S 24 of the partial image 24 is also similar to the skewness S 22 of the template image 22, FIG. 11
  • the skewness S 24 is zero. If the distribution shape is asymmetric and skewed to the left (many pixels with low density) as in the density histogram shown in FIG. 11B, the skewness S 24 ⁇ 0.
  • the skewness S 24 > 0.
  • Step S 3 the image processing unit 1 4, Ri by the comparison of the skewness S M already computed the template image 22 and skewness 24 of the partial image 24 calculated in step S 2, the skewness Calculate the absolute difference IS 22 — S 24 I.
  • the absolute difference in skewness IS 22 —S 24 I is an index relating to the similarity between the density histogram of the template image 22 and the density histogram of the partial image 24. The higher the similarity of the two density histograms, the smaller the absolute difference in skewness IS 22 — S 24 I. Conversely, the lower the similarity between the two density histograms, the greater the absolute skewness difference IS 22 — S 24
  • the absolute difference in skewness IS 22 — S 24 I shows a large value and the similarity of the two density histograms is low, the similarity between the template image 22 and the partial image 24 is clearly low (the difference it seems to do.
  • the absolute difference in skewness IS 22 — S 24 l shows a small value and the two density histograms have a high similarity, the similarity between the template image 22 and the partial image 24 may be high. is there. In other words, similarity may be low, but similarity may be high. Therefore, the absolute difference in skewness IS 22 —S 24 I is considered to be an approximate value regarding the similarity between the template image 22 and the partial image 24.
  • the image processing unit 14 After calculating the absolute difference in skewness IS 22 _S 24
  • conditional expression (19) When conditional expression (19) is not satisfied (No in S3), the similarity between template image 22 and partial image 24 is clearly low (different) as described above. It is not necessary to determine an accurate index (that is, similarity) regarding the similarity between the partial image 24 and the template image 22 by the log operation (S4). Therefore, when the conditional expression (19) is not satisfied (S3 is No), the matching operation (S4) is omitted, and the process proceeds to step S6 described later.
  • step S3 the approximate value (that is, the absolute difference in skewness IS 22 ) relating to the similarity between the calculation partial image 24 and the template image 22 is obtained. - based on the S 24 l), it determines whether or not to perform the matching operation between the partial image 24 and the template image 2 2 (S 4).
  • the determination process of step S3 is a process of determining the similarity between the partial image 24 and the template image 22 roughly. Therefore, this calculation process can be performed in a shorter time than the matching calculation. In other words, the calculation speed is high. Then, when it is determined that the matching calculation is not performed, the calculation is omitted, and only when it is determined that the matching calculation is performed, the calculation is performed.
  • the image processing unit 14 performs a matching operation (operation of similarity) between the operation partial image 24 and the template image 22 in step S4.
  • a known cross-correlation method is used as an example of the matching operation.
  • the matching calculation is performed based on the density value B M at the position (m, n) of the partial image 24 shown in FIG. 5B and the density value at the same position (m, n) of the template image 22 shown in FIG. 5A. using the a m, it is performed by the following equation (2 0).
  • the result of the matching operation is a normalized cross-correlation coefficient C (1 1 C ⁇ 1), which corresponds to the similarity between the operation partial image 24 and the template image 22.
  • the similarity is one of the “index of similarity” between the partial image 24 and the template image 22, and is an “exact index of similarity”.
  • the tendency is that the larger the mutual correlation number C corresponding to the degree of similarity is (the closer to “1”), the higher the similarity between the partial image 24 and the template image 22 is, and the extraction position (X 2 , Y 2 ) is close to the matching position ( ⁇ ,, ⁇ ,).
  • the image processing unit 14 determines the similarity (cross-correlation coefficient C), which is the result of the matching calculation, in the next step S5 by using the extraction position ( ⁇ 2 , ⁇ 2 ) and store them in memory. After the processing of these steps S 1 ⁇ S 5, 1 single extraction position ( ⁇ 2, ⁇ 2) in the input image 21 processing for ends.
  • the processing proceeds to step S 7.
  • step S7 is a process of moving the extraction position (X 2 , Y 2 ) of the partial image 24 for calculation.
  • the partial images 24 are sequentially extracted at each position, and each time the partial images 24 are extracted, it can be determined whether or not to perform the matching operation (S 4). Only when the content of the judgment indicates “perform”, the matching operation with the template image 22 is performed, and the result is stored.
  • step S8 the magnitude of the similarity (cross-correlation coefficient C) actually obtained at a plurality of different positions in the input image 21 is compared with each other to obtain the largest value.
  • the extraction position (X 2 , Y 2 ) of the partial image 24 having the highest similarity is identified as the matching position ( ⁇ , ⁇ ,). This is the end of the template matching processing for the input image 21.
  • each time a partial image 24 for calculation is extracted it is determined whether or not to perform a matching calculation between the partial image 24 and the template image 22. If not, skip the matching operation. Then, the matching operation is performed only when it is determined to “perform”. For this reason, the matching position ( ⁇ ⁇ ,) can be specified efficiently with a reduced time. In other words, the processing speed of template matching is dramatically improved.
  • the template matching is performed based on an approximate value (ie, absolute difference in skewness IS 22 —S 24 I) regarding the similarity between the partial image 24 for calculation and the template image 22. It is determined whether to perform the operation. Therefore, when the template image 22 and the partial image 24 are clearly different (that is, when the similarity is clearly low), unnecessary matching calculation can be efficiently omitted.
  • the threshold ⁇ may be set to the range value X coefficient k.
  • the coefficient k in this case is an arbitrary value of 1/2 to 1.
  • the third moment M22 of the template image 22 is calculated by the following equation (2 1).
  • the third moment M24 of the partial image 24 for calculation is calculated, and these moments are calculated.
  • M 22, M M of absolute differences IM 22 - using M 24 I as an approximate value of the above may be determined whether or not to perform pine quenching operation.
  • an nth order (n is an odd number of 5 or more) moments may be used.
  • the odd-order moments like the skewness (skewnes s) already described, indicate the bias direction (left or right) of the density histogram, and are good indicators for determining whether or not to perform a matching operation. . ... (twenty one )
  • the amount of calculation is smaller than that of skewness, so that the necessity of the matching operation can be determined at high speed. Therefore, even when the matching operation is performed by a method with a small amount of calculation (for example, a residual sequential test method described later), it is possible to reliably improve the processing speed.
  • the “absolute difference of the average density” obtained by comparing the average density of the template image 22 with the average density of the partial image 24 is used. You can also. In this case, the calculation amount is further reduced, and the above approximate value can be easily calculated. As a result, higher speeds are realized.
  • the matching operation (see equation (20)) is performed by the cross-correlation method in step S4 of FIG. 10, but the present invention is not limited to this.
  • the matching operation may be performed by a residual sequential test method (SSDA method), or the matching operation may be performed using a feature amount such as a density histogram or an inertia moment.
  • SSDA method residual sequential test method
  • the matching operation by the residual sequential test method is based on the density value B m at the position (m, n) of the partial image 24 shown in FIG. 5B and the density value at the same position (m, n) of the template image 22. This is performed by the following equation (2 2) or equation (2 3) using A mn .
  • D in equation (2 2) is the sum of absolute values of the density difference.
  • E in equation (2 3) is the sum of squares of the concentration difference.
  • the results D and E of the matching operation correspond to the similarity between the partial image 24 and the template image 22. The similarity is high, indicating that the extraction position (X 2 , Y 2 ) is close to the matching position (X ⁇ ,). Since the matching operation by the residual sequential test method requires a small amount of calculation, it can be further speeded up. '
  • a density histogram H22 of the template image 22 is created in advance, and each time a partial image 24 for calculation is extracted, the partial image 2 A density histogram H M of 4 is created.
  • the horizontal axis of the density histograms H M and H 22 is the density value, and the vertical axis is the number of pixels.
  • the matching calculation is performed by counting the number of pixels in the overlapping portion of the two density histograms H 24 and H 22 (the hatched portion in FIG. 9B).
  • the result of the matching operation (total value F) is the similarity between the partial image 24 and the template image 22.
  • the larger the value the higher the similarity between the partial image 24 and the template image 22, indicating that the extraction position (X 2 , Y 2 ) is closer to the matching position (, ⁇ ).
  • the matching calculation based on the density histogram may be performed by, for example, summing up the number of pixels of the absolute value of the difference between the two density histograms ⁇ 24 and ⁇ 22 shown in FIG. 9 (the hatched portion in FIG. 9C). .
  • the result of the matching operation (total value G) in this case corresponds to the similarity between the partial image 24 and the template image 22. The smaller the value, the more similar the partial image 24 and the template image 22 are. Is high and the extraction position ( ⁇ 2 , ⁇ 2 ) is close to the matching position ( ⁇ , ⁇ ).
  • the sixth embodiment of the present invention is a combination of the first to fourth embodiments and the fifth embodiment.
  • the template matching apparatus of the sixth embodiment combines the cut control of the matching operation disclosed in the fifth embodiment with the step control of the template matching process disclosed in the first to fourth embodiments.
  • the template matching processing of the sixth embodiment performs the processing from step S1 to step S8 in FIG. 10 (matching calculation cut control).
  • step S1 in FIG. The “movement processing of the extraction position of the partial image for calculation” of 7 executes the processing (step control) from step SI1 to step S15 in FIG.
  • the shapes of the calculation partial image 24 and the template image 22 are rectangular, but the present invention is not limited to this.
  • the partial image 24 and the template image 22 need not be rectangular as long as they have the same shape and size (number of pixels).
  • the essential processing is the same for other shapes.
  • the present invention can be applied to 30 devices.
  • the present invention can be applied not only to the image of the local region of the sample but also to an apparatus which collectively captures the image of the entire surface of the sample. Similar effects can be obtained even when an external computer connected to the observation device 10 or the like is used.
  • the present invention is not limited to this.
  • the present invention can be applied to a case where template matching is performed on an input image signal (input audio) including audio information (signal processing).
  • an input image signal input audio
  • the present invention can be applied to a case where template matching is performed on an input image signal (input audio) including audio information (signal processing).
  • the above-mentioned “image density” may be replaced with “signal strength”.
  • “Average concentration” corresponds to “average intensity”.

Abstract

A template matching device includes: extraction means for extracting a partial image signal for calculation from an input image signal while successively changing the extraction position; calculation means for calculating an index concerning similarity between the partial image signal and a known template signal each time the partial image signal is extracted by the extraction means; and specification means for specifying a matched position with the template signal in the input image signal according to the index concerning the similarity at a plurality of positions of the input image signal. The extraction means decides a shift amount from the current extraction position to the next extraction position considering the index concerning the similarity in the current extraction position calculated by the calculation means.

Description

明 細 書 テンプレートマッチング装置 技術分野 .  Technical Field of Template Matching Apparatus.
本発明は、 画像情報または音声情報などを含む入力画像信号に対してテンプレ ートマッチングを行うテンプレートマッチング装置に関する。 背景技術  The present invention relates to a template matching apparatus that performs template matching on an input image signal including image information or audio information. Background art
テンプレートマッチングは、 入力画像信号の中から既知のテンプレート信号に 合致する部分画像信号(ターゲット) を探索して、 ターゲットの位置(合致位置) を特定する処理である。 この処理では、 入力画像信号の中から抽出した演算用の 部分画像信号と既知のテンプレート信号とのマッチング演算が、 演算用の部分画 像信号の抽出位置を少しずつ移動させながら、 繰り返し行われる。 そして、 入力 画像信号の中の各位置でのマッチング演算の結果を大小比較することで、 合致位 置が特定される。 なお、 マッチング演算には、 周知の相互相関法や残差逐次検定 法などが用いられる。 +  Template matching is a process of searching for a partial image signal (target) that matches a known template signal from the input image signal, and specifying the position of the target (match position). In this process, the matching operation between the calculation partial image signal extracted from the input image signal and the known template signal is repeatedly performed while the extraction position of the calculation partial image signal is gradually moved. Then, by comparing the results of the matching operation at each position in the input image signal, the matching position is specified. For the matching operation, a well-known cross-correlation method, a sequential error test, or the like is used. +
また、演算用の部分画像信号の抽出位置を少しずつ移動させる際、その移動は、 入力画像信号の全体または所定範囲内において、 予め設定した間隔で一様に行わ れる (例えば特開 2 0 0 0— 7 6 4 4 4号公報、 特開平 7— 2 2 0 0 7 6号公報 を参照)。 すなわち、 テンプレートマッチングを開始する前に設定した一定の間 隔で、 演算用の部分画像信号の抽出位置の移動が行われる。 上記した特開 2 0 0 0 - 7 6 4 4 4号公報、 特開平 7— 2 2 0 0 7 6号公報には、 まず、 予め設定し た大きな移動間隔で一様に粗いテンプレートマッチングを行い、 合致位置を含む 所定範囲に絞り込んだ後、 その範囲内において予め設定した小さな移動間隔で一 様に細かいテンプレートマッチングを行い、 合致位置を特定することが提案され ている。 Further, when the extraction position of the partial image signal for calculation is moved little by little, the movement is uniformly performed at a preset interval in the entire input image signal or within a predetermined range (for example, see Japanese Patent Application Laid-Open No. 2000-200). (See Japanese Patent Application Laid-Open No. 0-764444 and Japanese Patent Application Laid-Open No. 7-22076). That is, the extraction position of the calculation partial image signal is moved at a fixed interval set before starting the template matching. In the above-mentioned Japanese Patent Application Laid-Open No. 2000-76044 and Japanese Patent Application Laid-Open No. Hei 7-22076, first, coarse template matching is performed uniformly at a predetermined large moving interval. After narrowing down to a predetermined range including the matching position, it has been proposed to perform the same fine template matching at a predetermined small movement interval within the range to specify the matching position. ing.
しかしながら、 予め設定した移動間隔で一様にテンプレートマッチングを行う 上記の方法には、 その移動間隔を適切な一定値に設定することが難しいという問 題がある。 移 »間隔の適切な一定値とは、 入力画像信号の中の合致位置を短時間 で正確に効率よく特定できるような値であり、 入力画像信号やテンプレート信号 に応じて異なる 6  However, the above method of uniformly performing template matching at a preset moving interval has a problem that it is difficult to set the moving interval to an appropriate constant value. An appropriate constant value of the moving interval is a value that can accurately and efficiently identify a matching position in the input image signal in a short time, and differs depending on the input image signal and the template signal.
ちなみに、移動間隔の設定値が適切な一定値より小さいと、合致位置の特定(ま たは合致位置を含む所定範囲の絞り込み) は正確に行えるが、 マッチング演算の 繰り返し回数が多くなるため余計な時間が掛かってしまう。 また逆に、 移動間隔 の設定値が適切な一定値より大きいと、 マツチング演算の繰り返し回数が少なく なるため時間を短縮できるが、 合致位置の特定 (または合致位置を含む所定範囲 の絞り込み) を正確に行えるとは限らず、 疑似マッチングやマッチング不可能に なることがある。 発明の開示  By the way, if the set value of the movement interval is smaller than an appropriate fixed value, the matching position can be specified (or the predetermined range including the matching position can be narrowed down) accurately, but the number of repetitions of the matching calculation is increased, so that an unnecessary It takes time. Conversely, if the set value of the movement interval is larger than an appropriate fixed value, the number of repetitions of the matching operation is reduced, thereby shortening the time. However, specifying the matching position (or narrowing down a predetermined range including the matching position) is accurate. This is not always the case, and it may become impossible to perform pseudo-matching or matching. Disclosure of the invention
本発明の目的は、 確実に時間を短縮して効率よく合致位置を特定できるテンプ レートマッチング装置を提供することにある。  SUMMARY OF THE INVENTION An object of the present invention is to provide a template matching apparatus capable of reliably identifying a matching position with a reduced time.
本発明のテンプレートマッチング装置は、 入力画像信号の中から、 順次抽出位 置を変えて演算用の部分画像信号を抽出する抽出手段と、 前記抽出手段により抽 出された前記部分画像信号と既知のテンプレート信号との類似度の演算を行う 第 1の演算手段と、 前記第 1の演算手段が求めた前記類似度を大小比較すること により、 前記入力画像信号の中の前記テンプレート信号との合致位置を特定する 特定手段と、 前記抽出手段により前記部分画像信号が抽出される毎に、 該部分画 像信号と既知のテンプレート信号との類似性に関する指標を求める第 2の演算手 段とを備え、 さらに、 前記第 2の演算手段が求めた現在の抽出位置における前記 類似性に関する指標を考慮して、 前記現在の抽出位置から次の抽出位置への前記 抽出手段における移動量を決定する移動量決定手段と、 前記第 2の演算手段によ る演算結果に基づいて、 前記第 1の演算手段で前記部分画像信号と既知のテンプ レート信号との類似度の演算を行うか否かを判断する判断手段との少なくともThe template matching apparatus according to the present invention includes: an extracting unit that sequentially changes an extraction position from among input image signals to extract a partial image signal for calculation; and a known image processing unit that extracts the partial image signal extracted by the extracting unit. A first calculating means for calculating a similarity with the template signal; and comparing the similarity obtained by the first calculating means in magnitude, thereby obtaining a matching position with the template signal in the input image signal. And a second calculating means for obtaining an index relating to the similarity between the partial image signal and a known template signal each time the partial image signal is extracted by the extracting means, Further, taking into account the index regarding the similarity at the current extraction position obtained by the second calculation means, the current extraction position is shifted from the current extraction position to the next extraction position. A moving amount determining unit for determining a moving amount in the extracting unit; and a similarity between the partial image signal and a known template signal in the first calculating unit based on a calculation result by the second calculating unit. At least with the judgment means for judging whether or not to perform the calculation of
1つを備えたことを特徴とする。 It is characterized by having one.
本発明によれば、 確実に時間を短縮して効率よく合致位置を特定することがで さる。 図面の簡単な説明  ADVANTAGE OF THE INVENTION According to this invention, a matching position can be pinpointed efficiently by shortening time reliably. Brief Description of Drawings
図 1は、観察装置 1 0の概略図である。  FIG. 1 is a schematic diagram of the observation device 10.
図 2は、 入力画像 2 1 ,テンプレート画像 2 2 ,ターゲット 2 3 ,演算用の部分 画像 2 4を説明する図である。  FIG. 2 is a diagram illustrating an input image 21, a template image 22, a target 23, and a partial image 24 for calculation.
図 3は、 第 1実施形態のテンプレートマッチングにおける全体的な処理手順を 示すフローチャートである。 - 図 4は、図 3のステップ S 5における処理手順をを示すフローチヤ一トである。 図 5 Aと図 5 Bとはそれぞれ、テンプレート画像 2 2の位置(m, n )における 濃度値 Amnと演算用の部分画像 2 4の位置 (m, n )における濃度値 B匪とを説明 する図である。  FIG. 3 is a flowchart showing an overall processing procedure in the template matching of the first embodiment. FIG. 4 is a flowchart showing a processing procedure in step S5 of FIG. 5A and 5B illustrate the density value Amn at the position (m, n) of the template image 22 and the density value B at the position (m, n) of the partial image 24 for calculation, respectively. FIG.
.図 6 A、 図 6 Bは、合致位啬(X I , Y1)との位置関係に応じた移動間隔 (移動量 M x ) の大小変化を説明する図である。  FIG. 6A and FIG. 6B are diagrams illustrating the magnitude change of the movement interval (movement amount M x) according to the positional relationship with the coincidence position (X I, Y 1).
図 7は、第 2実施形態のテンプレートマッチングにおける処理手順の一部を示 すフローチャートである。  FIG. 7 is a flowchart showing a part of the processing procedure in the template matching of the second embodiment.
図 8 A、 図 8 Bは、図 7の処理による抽出位置(X2, Y2)の移動について説明す る図である。 ―  8A and 8B are diagrams for explaining the movement of the extraction position (X2, Y2) by the processing of FIG. ―
図 9 Α、 図 9 Β、 図 9 Cは、 濃度ヒストグラムに基づくマッチング演算につい て説明する図である。  FIGS. 9A, 9B, and 9C are diagrams for explaining the matching calculation based on the density histogram.
図 1 0は、本実施形態のテンプレートマッチングの処理手順を示すフローチヤ 一トである。 FIG. 10 is a flowchart showing the template matching processing procedure of the present embodiment. It is one.
図 1 1 A、 図 1 1 B、 図 1 1 Cは、 濃度ヒストグラムの分布形状の非対称性と 歪度 (skewness) との関係を説明する図である。 発明を実施するための最良の形態  FIG. 11A, FIG. 11B, and FIG. 11C are diagrams illustrating the relationship between the asymmetry of the distribution shape of the density histogram and the skewness. BEST MODE FOR CARRYING OUT THE INVENTION
以下、 図面を用いて本発明の実施形態を詳細に説明する。 第 1実施形態から第 4実施形態は、 テンプレートマッチング処理を類似度判定に基づきステップ制御 するものである。 第 5実施形態は、 テンプレートマッチング処理を類似度判定に 基づきマッチング演算処理をカット制御するものである。 第 6実施形態は、 第 1 〜第 4実施形態の処理と第 5実施形態の処理とを組合せた制御をするものであ る。  Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In the first to fourth embodiments, the template matching process is step-controlled based on the similarity determination. In the fifth embodiment, the template calculation processing is cut-controlled in the matching calculation processing based on the similarity determination. In the sixth embodiment, control is performed by combining the processing of the first to fourth embodiments and the processing of the fifth embodiment.
(第 1実施形態)  (First Embodiment)
ここでは、 第 1実施形態のテンプレートマッチング装置および方法について、 図 1に示す観察装置 1 0を例に説明する。 観察装置 1 0には、 ステージ 1 1と光 学系 1 2とカメラ 1 3と画像処理部 1 4とが設けられる。 ステージ 1 1は、 試料 1 O Aを支持する。 光学系 1 2は、 試料 1 O Aの局所領域の光像を形成する。 力 メラ 1 3は、 不図示の撮像素子により試料 1 O Aの光像を撮像し、 撮像信号を画 像処理部 1 4に出力する。  Here, the template matching apparatus and method according to the first embodiment will be described using the observation apparatus 10 shown in FIG. 1 as an example. The observation device 10 includes a stage 11, an optical system 12, a camera 13, and an image processing unit 14. Stage 11 supports sample 1 OA. The optical system 12 forms an optical image of a local region of the sample 1OA. The camera 13 captures an optical image of the sample 1OA with an image sensor (not shown), and outputs an image signal to the image processing unit 14.
画像処理部 1 4は、 カメラ 1 3から撮像信号を取り込むと、 これを所定ビット (例えば 8ビット) のディジタル画像に変換し、 入力画像として不図示のメモリ に記憶させる。そして、入力画像に対して後述のテンプレートマッチングを行う。 試料 1 0 Aは、 例えば、 半導体ウェハや液晶基板、 プリント基板、 生物標本 (例 えば細胞)などである。 観察装置 1 0を用いて、 試料 1 O Aの観察や検査や位置 合わせなどが行われる。  When the image processing unit 14 captures an image signal from the camera 13, it converts the image signal into a digital image of predetermined bits (for example, 8 bits), and stores the digital image in a memory (not shown) as an input image. Then, template matching described later is performed on the input image. The sample 10A is, for example, a semiconductor wafer, a liquid crystal substrate, a printed circuit board, a biological specimen (for example, cells), or the like. Using the observation device 10, observation, inspection, and alignment of the sample 1OA are performed.
次に、 画像処理部 1 4におけるテンプレートマッチングについて説明する。 テ ンプレートマッチングは、 例えば図 2に示す入力画像 2 1の中から既知のテンプ レ一ト画像 2 2に合致する部分画像であるターゲット 2 3を探索して、 夕ーゲッ ト 2 3の位置 (以下 「合致位置(Χ,, Y 」 という) を特定する処理である。 この処理では、 入力画像 2 1の中から抽出した演算用の部分画像 2 4とテンプ レー卜画像 2 2とのマッチング演算が、 演算用の部分画像 2 4の抽出位置(Χ2, Υ2)を少しずつ移動させながら、 繰り返し行われる。 また、 抽出位置(Χ2, Υ2)の 移動は、 入力画像 2 1の図中左上端から右下端に向けて、 複数の走査線からなる ラス夕走査の方向に沿って行われる。 ここでは、 各々の走査線が X方向に平行で あるとし、 走査線に平行な X方向を 「横方向」、 走査線に垂直な Υ方向を 「縦方 向」 という。 Next, template matching in the image processing unit 14 will be described. Template matching is performed, for example, by using a known template from the input image 21 shown in FIG. This is a process of searching for a target 23 that is a partial image that matches the late image 22 and specifying the position of the evening target 23 (hereinafter referred to as “match position (位置 ,, Y)”. In the above, the matching operation between the partial image 24 for operation extracted from the input image 21 and the template image 22 causes the extraction position (Χ 2 , Υ 2 ) of the partial image 24 for operation to be slightly reduced. The extraction position (Χ 2 , Υ 2 ) is moved from the upper left corner to the lower right corner of the input image 21 in the figure. Here, it is assumed that each scanning line is parallel to the X direction, and the X direction parallel to the scanning line is called “horizontal direction”, and the Υ direction perpendicular to the scanning line is called “vertical direction”. .
なお'、 入力画像 2 1は、 「画像情報を含む入力画像信号」 に対応する。 テンプ レート画像 2 2は、 「画像情報を含むテンプレート信号」 に対応する。 演算用の 部分画像 2 4は、 「画像情報を含む演算用の部分画像信号」 に対応する。  Note that the input image 21 corresponds to “input image signal including image information”. The template image 22 corresponds to a “template signal including image information”. The calculation partial image 24 corresponds to “calculation partial image signal including image information”.
第 1実施形態のテンプレートマッチングは、 図 3に示すフローチャートの手順 (ステップ S 1〜S 6 ) にしたがって画像処理部 1 4が行う。 また、 図 3のステ ップ S 5の処理 (つまり演算用の部分画像 2 4の抽出位置(X2, Y2)の移動処理) は、 図 4に示すフローチャートの手順 (ステップ S I 1〜S 1 5 ) にしたがって 行われる。 さらに、 第 1実施形態のテンプレートマッチングでは、 このテンプレ ートマッチングを開始する前までに、演算用の部分画像 2 4の抽出位置(X2, Y2) の移動間隔を適切な一定値に設定しておく必要がない。 このような前処理を行わ ずに、 入力画像 2 1を取り込むと直ぐに図 3の処理を開始することができる。 図 3のステップ S 1において、 画像処理部 1 4は、 入力画像 2 1の中から演算 用の部分画像 2 4を抽出する。 1回目の抽出は、入力画像 2 1の例えば左上端(図 2 ) の初期位置から行われる。 なお、 演算用の部分画像 2 4は、 テンプレート画 像 2 2と縦横各々同じ大きさ(画素数)の矩形状である。 図 2にはテンプレート画 像 2 2の縦横の大きさ(画素数)を T x , T yで示した。 部分画像 2 4とテンプレ —ト画像 2 2は、 共に、 入力画像 2 1より小さい (画素数が少ない)。 次に (ステップ S 2)、 画像処理部 14は、 ステップ S 1で抽出した演算用の 部分画像 24とテンプレート画像 22とのマッチング演算を行う。 ここでは、 マ ツチング演算の一例として、 周知の相互相関法を用いる。 この場合のマッチング 演算は、 図 5に示す部分画像 24の位置 (m, n)における濃度値;^^と、 テンプレ' ート画像 22の同じ位置 (m, n)における濃度値 Amnとを用レ 次の式(1)により 行われる。 The template processing of the first embodiment is performed by the image processing unit 14 according to the procedure (steps S1 to S6) of the flowchart shown in FIG. Also, the processing of step S5 in FIG. 3 (that is, the movement processing of the extraction position (X 2 , Y 2 ) of the partial image 24 for calculation) is performed according to the procedure of the flowchart shown in FIG. 15). Further, in the template matching of the first embodiment, the moving interval of the extraction position (X 2 , Y 2 ) of the partial image for calculation 24 is set to an appropriate constant value before starting this template matching. There is no need to keep it. The processing shown in FIG. 3 can be started as soon as the input image 21 is captured without performing such preprocessing. In step S1 of FIG. 3, the image processing unit 14 extracts a partial image 24 for calculation from the input image 21. The first extraction is performed, for example, from the initial position of the upper left corner of the input image 21 (FIG. 2). The calculation partial image 24 has a rectangular shape with the same size (number of pixels) in both the vertical and horizontal directions as the template image 22. FIG. 2 shows the vertical and horizontal sizes (the number of pixels) of the template image 22 by Tx and Ty. Both the partial image 24 and the template image 22 are smaller than the input image 21 (the number of pixels is small). Next (Step S2), the image processing unit 14 performs a matching operation between the template image 22 and the partial image 24 for calculation extracted in Step S1. Here, a known cross-correlation method is used as an example of the matching operation. In this case, the matching operation is performed by calculating the density value at the position (m, n) of the partial image 24 shown in FIG. 5; ^^ and the density value A mn at the same position (m, n) of the template image 22. This is performed according to the following equation (1).
7, Amn— A)(Bmn— B )
Figure imgf000008_0001
7, A mn — A) (B mn — B)
Figure imgf000008_0001
A : Amnの平均値 ' B : Bmnの平均値 A: Average value of A mn 'B: Average value of B mn
マッチング演算の結果は、正規化された相互相関係数 Cであり (一 1≤C≤1)、 演算用の部分画像 24とテンプレート画像 22との類似度に相当する。 類似度は、 部分画像 24とテンプレート画像 22との「類似性に関する指標」の 1つである。 傾向としては、 類似度に相当する相互相関係数 Cが大きい (つまり 「1」 に近い) ほど、 部分画像 24とテンプレート画像 22との類似性が高く、 部分画像 24の 抽出位置(X2, Y2)が合致位置(Xい Υ,)に近いことをが多い。 The result of the matching calculation is a normalized cross-correlation coefficient C (1 1 ≤ C ≤ 1), which corresponds to the similarity between the calculation partial image 24 and the template image 22. The similarity is one of the “index of similarity” between the partial image 24 and the template image 22. The tendency is that the larger the cross-correlation coefficient C corresponding to the degree of similarity (ie, closer to “1”), the higher the similarity between the partial image 24 and the template image 22, and the extraction position (X 2 , In many cases, Y 2 ) is close to the matching position (XX,).
上記のマッチング演算が終了すると、 画像処理部 14は、 次のステップ S 3に おいて、 マッチング演算の結果である類似度すなわち、 相互相関係数 Cを、 部分 画像 24の抽出位置(Χ2, Υ2)と対応づけて画像処理部 14内のメモリに保存す る。 これらのステップ S 1〜S 3の処理を経て、 入力画像 21の中の 1つの抽出 位置(X2, Y2)に対する処理が終わる。 そして、 演算用の部分画像 24の抽出位置 (Χ2, Υ2)を次の位置へ移動させる場合すなわち、 ステップ S 4が Ye sの場合に は、 ステップ S 5の処理に進む。 When the above-described matching calculation is completed, the image processing unit 14 determines the similarity, that is, the cross-correlation coefficient C, which is the result of the matching calculation, in the next step S 3, at the extraction position (24 2 ,対 応 Save in the memory in the image processing unit 14 in association with 2 ). After the processing of these steps S 1 to S 3, the processing is completed for one extraction position in the input image 21 (X 2, Y 2) . Then, when the extraction position (Χ 2 , Υ 2 ) of the calculation partial image 24 is moved to the next position, that is, when Step S4 is Yes, the process proceeds to Step S5.
ステップ S 5の処理は、演算用の部分画像 24の抽出位置(X2,Y2)の移動処理 であり、 図 4に示すフローチャートの手順 (ステップ S I 1〜S 15) にしたが つて行われる。 まず (ステップ S 11)、 画像処理部 14は、 次の位置への移動 方向が、 横方向 (走査線に平行な方向) か否かを判断する。 この判断には、 入力 画像 21の中での現在の位置の X座標 (つまり走査線上での位置座標) が用いら れる。 そして、 現在の位置の X座標が、 入力画像 21の右端 (つまり走査線の終 点) に相当するとき以外は 「横方向」 と判断する (S 11が Ye s)。 The process of step S 5 is a process of moving the extraction position of the partial image 24 for computation (X 2, Y 2), carried out One was the procedure of the flowchart shown in FIG. 4 (step SI 1 to S 15) . First (step S11), the image processing unit 14 moves to the next position. It is determined whether the direction is the horizontal direction (the direction parallel to the scanning line). For this determination, the X coordinate of the current position in the input image 21 (that is, the position coordinate on the scanning line) is used. Then, unless the X coordinate of the current position corresponds to the right end of the input image 21 (that is, the end point of the scanning line), it is determined to be “horizontal” (S 11 is Yes).
演算用の部分画像 24の抽出位置(X2,Y2)を横方向に移動させる場合、画像処 理部 14は、 ステップ S 12の処理に進み、 現在の位置での類似度 (相互相関係 数 C) を考慮して、 現在の位置から次の位置への移動量 Μχを計算する。 具体的 には、 現在の位置での類似度 (相互相関係数 C) を次の式(2)の "類似度" に代 入することにより、 移動量 Μχを計算する。 このような移動量 Μχの計算は非常 に簡単なものである。 . When the extraction position (X 2 , Y 2 ) of the calculation partial image 24 is to be moved in the horizontal direction, the image processing unit 14 proceeds to the process of step S12, and executes the similarity (the mutual phase relationship) at the current position. Calculate the amount of movement。 from the current position to the next position, taking into account the number C). Specifically, the amount of movement Μχ is calculated by substituting the similarity (cross-correlation coefficient C) at the current position into the “similarity” in the following equation (2). The calculation of the movement amount Μχ is very simple. .
Mx= floor [(Tx/4) X (1_1^Χ類似度)] --(2)  Mx = floor [(Tx / 4) X (1_1 ^ Χsimilarity)]-(2)
式(2)には、 テンプレート画像 22の横方向の画素数 Τχ (図 2参照) が含ま れる。この画素数 Τχは、演算用の部分画像 24の横方向の画素数と同じである。 -係数 は、 0< ≤ 1を満たす範囲で定めた経験値(例えば 1/2)である。 ΠΟΟΓ は、 抽出位置(Χ2, Υ2)の移動を入力画像 21の画素単位で行うために、 小数点以 下を切り捨てて整数化するという意味である。 Equation (2) includes the number of pixels テ ン プ レ ー ト in the horizontal direction of the template image 22 (see FIG. 2). This number of pixels Τχ is the same as the number of pixels in the horizontal direction of the partial image 24 for calculation. The -coefficient is an empirical value (for example, 1/2) defined in the range that satisfies 0 <≤1. ΠΟΟΓ means that the extraction position (Χ 2 , Υ 2 ) is moved in units of pixels of the input image 21 so that the decimal part is rounded down and converted to an integer.
式(2)によって求められる移動量 Μχは、 現在の位置での類似度 (相互相関係 数 C) が小さく (つまり 「0」 に近く)、 部分画像 24とテンプレート画像 22 との類似性が低く、部分画像 24の抽出位置(Χ2, Υ2)が合致位置(Χ,, Υ,)から離 れているほど、 大きくなることが多い。 移動量 Μχの最大値は、 類似度が 「0」 の場合であり、 floor (Tx/4) となる。移動量 Mxの最小値は、類似度が「1」 の場合であり、 floor [(Tx/4) X (1 - k,)] となる。 移動量 Mxが " 0画 素" と求められた場合には、 実際の移動量を "1画素" とする。 The amount of movement 求 め obtained by equation (2) has a low similarity at the current position (the mutual correlation coefficient C) (that is, close to “0”), and a low similarity between the partial image 24 and the template image 22. However, the larger the extraction position (Χ 2 , Υ 2 ) of the partial image 24 is from the matching position (Χ, Υ,), the larger the size is often. The maximum value of the movement amount Μχ is when the similarity is “0”, and is the floor (Tx / 4). The minimum value of the movement amount Mx is when the similarity is “1”, and is expressed as floor [(Tx / 4) X (1−k,)]. If the movement amount Mx is determined to be "0 pixels", the actual movement amount is set to "1 pixel".
画像処理部 14は、 上記の移動量 の計算が終了すると、 次のステップ S 1 3において、 演算用の部分画像 24の抽出位置( , Y2)を現在の位置から横方向 に移動量 Μχだけ離れた次の位置へ移動させる。 その後、 図 3のステップ S 1の 処理に戻り、新たな抽出位置(X2, Y2)において、演算用の部分画像 24の抽出(S 1) —テンプレート画像 22とのマッチング演算 (S 2) —結果保存 (S 3) を 繰り返す。 When the above calculation of the movement amount is completed, the image processing unit 14 sets the extraction position (, Y 2 ) of the partial image 24 for calculation in the next step S 13 by the movement amount Μχ in the horizontal direction from the current position. Move to the next position away. Then, in step S1 in Fig. 3, Return to the processing and repeat the extraction of the partial image 24 for calculation (S 1) —matching operation with the template image 22 (S 2) —save result (S 3) at the new extraction position (X 2 , Y 2 ) .
上記したステップ S 1→S 2→S 3→S 4→S 5 (S 11→S 12→S 13) →S 1…の繰り返しによって、演算用の部分画像 24の抽出位置(X2,Y2)が走査 線の終点 (つまり入力画像 21の右端) に到達し、 この抽出位置(Χ2, Υ2)に対す るステップ S 1〜S 3の処理が終了した後、 さらに次の位置へ移動させる場合 (34が 6 3)、 画像処理部 14は、 図 4のス.テツプ S 11にて、 次の位置へ の移動方向を 「縦方向 (走査線に垂直な方向)」 と判断する (ステップ S 1 1が No)。 ' . By repeating the above steps S 1 → S 2 → S 3 → S 4 → S 5 (S 11 → S 12 → S 13) → S 1 ..., the extraction position (X 2 , Y 2 ) reaches the end point of the scanning line (i.e. the right end of the input image 21), after the extraction position (chi 2, the process of step S 1 to S 3 against the Upsilon 2) is completed, move further to the next position In this case (34 is 63), the image processing unit 14 determines that the moving direction to the next position is “vertical direction (direction perpendicular to the scanning line)” in step S11 in FIG. Step S11 is No). '.
演算用の部分画像 24の抽出位置(X2,Y2)を縦方向に移動させる場合、画像処 理部 14は、 ステップ S 14の処理に進み、 現在の走査線上の各位置での類似度 (相互相関係数 C) を考慮して、 現在の走査線から次の走査線への移動量 Myを 計算する。 具体的には、 現在の走査線上の各位置での類似度 (相互相関係数 C) をメモリから読み出し、 それらの類似度の平均値を次の式(3)の "類似度の行平 均" に代入することにより、 移動量 Myを計算する。 現在の走査線上の各位置と は、 例えば、 現在の走査線上の全ての位置 (現在の位置を含む) である。 このよ うな移動量 M yの計算は非常に簡単なものである。 When moving the extraction position (X 2 , Y 2 ) of the calculation partial image 24 in the vertical direction, the image processing unit 14 proceeds to the process of step S14, and performs similarity at each position on the current scanning line. Calculate the amount of movement My from the current scan line to the next scan line, taking into account the (cross-correlation coefficient C). Specifically, the similarity (cross-correlation coefficient C) at each position on the current scan line is read from the memory, and the average value of the similarities is calculated by the following equation (3), To calculate the travel distance My. Each position on the current scan line is, for example, all positions on the current scan line (including the current position). The calculation of such a movement amount My is very simple.
My floor [(Ty/4) X ( 1— k2x類似度の行平均)] -(3) 式(3)には、 テンプレート画像 22の縦方向の画素数 Ty (図 2参照) が含ま れる。この画素数 Tyは、演算用の部分画像 24の縦方向の画素数と同じである。 係数 k2は、 0く k2≤lを満たす範囲で定めた経験値 (例えば 1/2) である。 式( 3 )によつて求められる移動量 M yは、 現在の走査線における平均的な類似 度 (相互相関係数 C) が小さく (つまり 「0」 に近く)、 各位置で抽出された部 分画像 24とテンプレート画像 22との類似性が平均的に低く、 現在の走査線が 合致位置(Χ,, Υ,)から離れているほど、 大きくなる。 移動量 Myの最大値は、 類 2005/007487 My floor [(Ty / 4) X ( row mean of 1-k 2 x similarity)] - (3) in the equation (3), includes vertical pixel number Ty of the template image 22 (see FIG. 2) It is. This number of pixels Ty is the same as the number of pixels in the vertical direction of the partial image 24 for calculation. The coefficient k 2 is an empirical value (for example, 1/2) determined within a range satisfying 0 and k 2 ≤l. The amount of movement My calculated by equation (3) is small for the average similarity (cross-correlation coefficient C) in the current scanning line (ie, close to “0”), The similarity between the minute image 24 and the template image 22 is low on average, and becomes larger as the current scan line is farther from the matching position (Χ, Υ,). The maximum value of the travel distance My is 2005/007487
9 似度の平均値が 「0」 の場合であり、 ΠΟΟΓ (Ty/4) となる。 移動量 Myの 最小値は、 類似度の平均値が 「1」 の場合であり、 floor [(Ty/4) X (1一 k2)] となる。 移動量 Myが "0画素" と求められた場合には、 実際の移動量を " 1画素" とする。 ■ 9 This is the case where the average value of the similarity is “0”, which is ΠΟΟΓ (Ty / 4). The minimum value of the movement amount My is when the average value of the similarity is “1”, and is floor [(Ty / 4) X (1−1 k 2 )]. If the movement amount My is determined to be "0 pixel", the actual movement amount is set to "1 pixel". ■
画像処理部 14は、 上記の移動量 Myの計算が終了すると、' 次のステップ S 1 5において、演算用の部分画像 24の抽出位置 ('Χ2, Υ2)を現在の走査線から縦方 向に移動量 Myだけ離れた次の走査線へ移動させると共に、 横方向には入力画像 21の左端 (すなわち、 次の走査線の始点) に移動させる。 その後、 図 3のステ ップ S 1の処理に戻り、 新たな走査線の抽出位置(X2,Y2)において、 演算用の部 分画像 24の抽出 (S 1) —テンプレート画像 22とのマッチング演算 (S 2) —結果保存 (S 3) を繰り返す。 When the above calculation of the movement amount My is completed, the image processing unit 14 sets the extraction position ('Χ 2 , Υ 2 ) of the partial image 24 for calculation in the next step S15 vertically from the current scanning line. It is moved in the direction to the next scanning line separated by the moving amount My, and in the horizontal direction to the left end of the input image 21 (that is, the starting point of the next scanning line). Then, returning to the process of step S1 in FIG. 3, at a new scanning line extraction position (X 2 , Y 2 ), extraction of the calculation partial image 24 (S 1) —combination with the template image 22 Matching operation (S 2)-Save result (S 3) is repeated.
このようにして、 ステップ S 1→S 2→S 3→S 4→S 5 (S 11→S 12→ S 13または S 1 1→S 14→S 15) →S 1…の処理を繰り返すことにより、 演算用の部分画像 24の抽出位置(X2, Y2)を複数の走査線からなるラスタ走査 の方向に沿って移動させながら、 複数の走査線上の各位置で演算用の部分画像 2 4を順に抽出することができる。 また、 演算用の部分画像 24を抽出する毎に、 テンプレート画像 22とのマツチン.グ演算を行い、 その結果を保存する。 In this way, by repeating the processing of steps S 1 → S 2 → S 3 → S 4 → S 5 (S 11 → S 12 → S 13 or S 11 → S 14 → S 15) → S 1 ... While moving the extraction position (X 2 , Y 2 ) of the calculation partial image 24 along the direction of the raster scanning composed of a plurality of scanning lines, the calculation partial image 24 is moved at each position on the plurality of scanning lines. Can be sequentially extracted. Further, every time the partial image 24 for calculation is extracted, a matching operation with the template image 22 is performed, and the result is stored.
そして、 演算用の部分画像 24の抽出位置(Χ22)が最後の走査線の終点 (つ まり入力画像 21の右下端) に到達し、 そこでのステップ S 1〜S 3の処理が終 了すると、 画像処理部 14は、 次の位置への移動を行わずに (S 4が No)、 ス テツプ S 6の処理に進む。 ステップ S 6では、 入力画像 21の中の異なる複数の 位置での類似度 (相互相関係数 C) を大小比較することにより、 その値が最も大 きく、テンプレート画像 22との類似性が最も高い部分画像 24の抽出位置(X2, Y2)を合致位置(Χ,, Υ,)と特定する。 以上で入力画像 21に対するテンプレート マッチングの処理は終了となる。 · Then, the extraction position (Χ 2 , Υ 2 ) of the calculation partial image 24 reaches the end point of the last scanning line (that is, the lower right end of the input image 21), and the processing of steps S 1 to S 3 there is performed. Upon completion, the image processing unit 14 proceeds to the process in step S6 without moving to the next position (No in S4). In step S6, the similarity (cross-correlation coefficient C) at a plurality of different positions in the input image 21 is compared in magnitude, whereby the value is the largest, and the similarity with the template image 22 is the highest. The extraction position (X 2 , Y 2 ) of the partial image 24 is specified as the matching position (Χ, Υ,). This completes the template matching process for the input image 21. ·
上記のように、 第 1実施形態のテンプレートマッチングでは、 演算用の部分画 TJP2005/007487 As described above, in the template matching of the first embodiment, TJP2005 / 007487
10 像 24の抽出位置(X2,Y2)を少しずつ移動させる際、 現在までに求めた類似度 (現在の位置での類似度を含む) のうち少なくとも 1つを考慮して、 式(2)また は式(3)により、 現在の位置から次の位置への移動量 Mx, Myを計算する (図 4のステップ S 12, S 14参照)。 10 When the extraction position (X 2 , Y 2 ) of the image 24 is moved little by little, at least one of the similarities obtained up to now (including the similarity at the current position) is considered, and the equation ( 2) Or calculate the movement amount Mx, My from the current position to the next position by using equation (3) (see steps S12 and S14 in Fig. 4).
したがって、 例えば抽出位置(X2,Y2)を横方向に移動させる場合、 現在の位置 での類似度が小さければ式(2)の結果 (移動量 Μχ) が大きくなるため、 合致位 置(Χ1; Υ,)から離れたところでは、抽出位置 (Χ2, Υ2)を大きな間隔で効率よく適 切に移動させることができる。 また逆に、 現在の位置での類似度が大きければ式 (2)の結果 (移動量 Μχ) が小さくなるため、 合致位置(Χ,, Υ)に近づいたとこ ろでは、抽出位置(Χ2, Υ2)を小さな間隔で適切に移動させることができる。特に、 合致位置(Χ,, Υ,)の近傍に到達した場合は、抽出位置(Χ2, Υ2)を "1画素" に相 当する間隔で適切に移動させることができる。 Therefore, for example, when the extraction position (X 2 , Y 2 ) is moved in the horizontal direction, if the similarity at the current position is small, the result of equation (2) (the amount of movement Μχ) becomes large. At positions away from Χ 1; Υ,), the extraction positions (Χ 2 , Υ 2 ) can be moved efficiently and appropriately at large intervals. Conversely, if the similarity at the current position is large, the result of equation (2) (the amount of movement 小 さ く) becomes small, and when the position approaches the matching position (Χ, Υ), the extraction position (Χ 2 , Υ 2 ) can be moved appropriately at small intervals. In particular, when it reaches the vicinity of the matching position (Χ ,, Υ,), the extraction position (Χ 2 , Υ 2 ) can be appropriately moved at an interval corresponding to “1 pixel”.
このような合致位置(Χ,,Υ,)との位置関係に応じた移動間隔 (移動量 Μχ) の 大小変化を図示すると、 例えば図 6Α、 図 6 Βのようになる。 図 6 Αには、 抽出 位置(X2, Y2)と合致位置(Χμ Υ,)との位置関係のステップ変化を時間順に並べ て示した。 図 6Αにおいて、 縦方向に隣り合う抽出位置(Χ2, Υ2)'どうしのズレ量 が、 移動間隔 (移動量 Μχ) に相当する。 また、 図 6Βには、 抽出位置(Χ2,Υ2) の軌跡を " · " で示した。 これらの図においても、 抽出位置(Χ2, Υ2)の移動は、 合致位置(Χ,,Υ,)から離れたところで大きく、合致位置(Xい Υ に近づくほど小 さくなることが分かる。 FIG. 6 (a) and FIG. 6 (b) show, for example, the magnitude change of the movement interval (movement amount Μχ) according to the positional relationship with the matching position (Χ, Υ, Υ). FIG 6 Alpha, extraction position (X 2, Y 2) and the matching position μ Υ,) a position step change in the relationship between the shown side by side in order of time. In FIG 6.alpha., Mutually extracted position adjacent in the longitudinal direction (Χ 2, Υ 2) 'How the deviation amount of and corresponds to the moving distance (moving amount Μχ). Further, FIG 6.beta, extraction position (Χ 2, Υ 2) the trajectory of the indicated "-". Also in these figures, it can be seen that the movement of the extraction position (Χ 2 , Υ 2 ) is large at a distance from the matching position (Χ, Υ,), and becomes smaller as the position approaches the matching position (XΥ).
一方、 抽出位置( , Υ2)を縦方向に移動させる場合も同様であり、 現在の走査 線での平均的な類似度が小さければ式(3)の結果 (移動量 My) が大きくなるた め、 合致位置(Χ^Υ,)から離れたところでは、 抽出位置(Χ2, Υ2)を大きな間隔で 効率よく適切に移動させることができる。 また逆に、 現在の走査線での平均的な 類似度が大きければ式(3)の結果(移動量 My)が小さくなるため、合致位置(X |; Y に近づいたところでは、 抽出位置(Χ22)を小さな間隔で適切に移動させ ることができる。 On the other hand, the same is true when the extraction position (, Υ 2 ) is moved in the vertical direction. If the average similarity at the current scanning line is small, the result of Equation (3) (the amount of movement My) increases. Therefore, the extraction position (Χ 2 , Υ 2 ) can be efficiently and appropriately moved at large intervals away from the matching position (Χ ^ Υ,). Conversely, if the average similarity at the current scan line is large, the result of equation (3) (the amount of movement My) will be small, and when the position approaches the match position (X |; Y), the extraction position ( Χ 2 , Υ 2 ) are moved appropriately at small intervals. Can.
第 1実施形態のテンプレートマッチングによれば、 現在までに求めた類似度 (現在の位置での類似度を含む) のうち少なくとも 1つをフィードバックして、 合致位置(Xい Ύ から離れたところで大きく部分画像 24の抽出位置(Χ2, Υ2) を移動させるため、 マッチング演算の繰り返し回数を減らすことができ、 テンプ レートマッチングの処理時間を短縮できる。 さらに、 合致位置(Χ,, Υ,)に近づく ほど小さく部分画像 24の抽出位置(X2,Y2)を移動させるため (ここで、 移動量 の最小単位は "1画素" である)、 正確に合致位置(Χ^,Υ,)を特定することがで さる。 According to the template matching of the first embodiment, at least one of the similarities obtained up to the present (including the similarity at the current position) is fed back, and the matching position (the position away from X い) becomes larger. Since the extraction position (Χ 2 , Υ 2 ) of the partial image 24 is moved, the number of repetitions of the matching operation can be reduced, and the processing time of the template matching can be shortened. Since the extraction position (X 2 , Y 2 ) of the partial image 24 moves as the distance approaches (the minimum unit of the movement amount is “1 pixel”), the exact matching position (Χ ^, Υ,) Can be specified.
したがって、 第 1実施形態のテンプレートマッチングによれば、 従来のよう Jこ 部分画像 24の抽出位置( X 2, Y 2)を少しずつ移動させる際の間隔を予め適切な 一定値に設定しなくても.、 テンプレートマッチングの最中に合致位置はい Υ,)と の位置関係に応じて移動間隔 (移動量 Mx,My) を設定するため、 入力画像 2 1の中の合致位置(ΧιΥ|)を短時間で正確に効率よく特定できる。 また、 従来の ような移動間隔を予め適切な一定値に設定するという難しい前処理が不要なた め、 入力画像 21を取り込むと直ぐにテンプレートマッチング (図 3の処理) を 開始することができ、 処理が簡単化する。 ' Therefore, according to the template matching of the first embodiment, the interval at which the extraction position (X 2 , Y 2 ) of the J partial image 24 is moved little by little as in the related art does not need to be set in advance to an appropriate constant value. During the template matching, the moving interval (moving amount Mx, My) is set according to the positional relationship with the matching position yes (Υ,). Therefore , the matching position ( Χι , Υ | ) Can be accurately and efficiently specified in a short time. In addition, since there is no need for the difficult preprocessing of setting the movement interval to an appropriate constant value in advance as in the past, template matching (the processing in Fig. 3) can be started immediately after the input image 21 is captured. Is simplified. '
さらに、 第 1実施形態のテンプレートマッチングによれば、 演算用の部分画像 24の抽出位置(Χ22)を予め定めた方向 (例えばラスタ走査の方向) に沿って 移動させると共に、 少なくとも現在の位置での類似度を考慮して (例えば式(2) または式(3)を用いて) 次の位置への移動量 Mx, Myを計算するため、 テンプ レートマッチングの最中に合致位置(ΧιΥι)との位置関係に応じて簡単に適切 な移動間隔を設定できる。 各位置で逐次行われる移動量 Mx, Myの計算は非常 に簡単なものであり、 この計算を追加したことによってテンプレートマッチング の処理が複雑化することはない。 Furthermore, according to the template matching of the first embodiment, the extraction position (Χ 2 , Υ 2 ) of the calculation partial image 24 is moved along a predetermined direction (for example, the direction of raster scanning) and at least the current Considering the degree of similarity at the position (for example, using Equation (2) or Equation (3)), to calculate the movement amount Mx, My to the next position, the matching position ( 移動 ι , Υι ) can easily set an appropriate movement interval according to the positional relationship. The calculation of the amount of movement Mx, My performed sequentially at each position is very simple, and the addition of this calculation does not complicate the template matching process.
また、 第 1実施形態のテンプレートマッチングによれば、 例えば式(2), (3) 7487 Also, according to the template matching of the first embodiment, for example, equations (2) and (3) 7487
12 のように、 次の位置への移動量 M x, Myを計算する際にテンプレート画像 2 2 の大きさ(画素数 T x, T y : ここで、 テンプレート画像の大きさは画素数で表わ すものとする)を考慮するため、 演算用の部分画像 2 4の抽出位置(X2, Y2)をテ ンプレート画像 2 2の大きさを基準にして効率よく移動させることができる。 さらに、 第 1実施形態のテンプレートマッチングによれば、 移動量 M x , M y の最大値をテンプレート画像 2 2の大きさ(画素数 T x , T y )の 1 Z 4に設定す るため、 演算用の部分画像 2 4の抽出'位置(X2,Y2)を大きく移動させる際に、 部 分画像 2 4が夕ーゲット 2 3を通り過ぎてしまうといった事態を回避できる。 さらに、 第 1実施形態のテンプレートマッチングによれば、 演算用の部分画像 2 4の抽出位置(Χ2,Υ2)をラスタ走査の方向に沿って移動させると共に、現在の 走査線上の各位置 (例えば全ての位置) での類似度を考慮して次の走査線への移 動量 M yを計算するため、 テンプレートマッチングの最中に合致位置(X , , Y と の位置関係に応じて簡単に適切な走査線間隔を設定できる。 As shown in Fig. 12, when calculating the amount of movement M x and My to the next position, the size of the template image 22 (the number of pixels T x, T y: where the size of the template image is represented by the number of pixels) Therefore, the extraction position (X 2 , Y 2 ) of the calculation partial image 24 can be moved efficiently with reference to the size of the template image 22. Furthermore, according to the template matching of the first embodiment, since the maximum value of the movement amounts M x, My is set to 1 Z 4 of the size of the template image 22 (the number of pixels T x, T y), When the extraction position (X 2 , Y 2 ) of the partial image 24 for calculation is largely moved, it is possible to avoid a situation in which the partial image 24 passes through the evening get 23. Further, according to the template matching of the first embodiment, the extraction position (Χ 2 , Υ 2 ) of the calculation partial image 24 is moved along the raster scanning direction, and at the same time each position (上 のIn order to calculate the amount of movement My to the next scanning line in consideration of the similarity at all positions, for example, it is easy to match the position of the match (X,, Y) during template matching. An appropriate scanning line interval can be set.
また、 第 1実施形態のテンプレートマッチングによれば、 現在の走査線上の各 位置 (例えば全ての位置) での類似度の平均値に基づいて次の走査線への移動量 M yを計算するため (例えば式(3 )を用いて)、 ノイズの影響を受けることなく 安定して適切な走査線間隔を設定できる。  Further, according to the template matching of the first embodiment, the moving amount My to the next scanning line is calculated based on the average value of the similarities at each position (for example, all positions) on the current scanning line. (For example, using equation (3)), an appropriate scanning line interval can be set stably without being affected by noise.
(第 2実施形態)  (Second embodiment)
上記した第 1実施形態では、演算用の部分画像 2 4の抽出位置(X2,Y2)を横方 向に移動させる際、 現在までに求めた類似度のうち 「現在の位置での類似度」 の みを考慮して次の位置への移動量 Μ χを計算したが、 本発明はこれに限定されな レ^ 第 2実施形態では、 現在の位置での類似度に加えて 「現在の位置より 1つ前 の位置での類似度」 をも考慮する場合について一例を説明する。 In the first embodiment described above, when the extraction position (X 2 , Y 2 ) of the calculation partial image 24 is moved in the horizontal direction, the “similarity at the current position” The degree of movement 次 へ to the next position was calculated by taking only the degree into account. However, the present invention is not limited to this. In the second embodiment, in addition to the similarity at the current position, An example will be described below in which the “similarity at a position immediately before the current position” is also considered.
第 2実施形態のテンプレートマッチングは、 既に説明した図 4のフローチヤ一 トのステップ S 1 3に代えて、 図 7に示すフローチャートのステップ S 2 1〜S 2 5の処理を行うものである。 画像処理部 1 4は、 図 4のステップ S 1 2におい 7487 In the template matching of the second embodiment, the processing of steps S21 to S25 of the flowchart shown in FIG. 7 is performed instead of step S13 of the flowchart of FIG. 4 described above. The image processing unit 14 is used in step S 12 in FIG. 7487
13 て、 現在の位置での類似度を考慮して次の位置への移動量 Mxを計算し終えると、 演算用の部分画像 24の抽出位置(X2,Y2)を実際に移動させる前に、 図 7のステ ップ S 21~S 23の処理を行う。 After calculating the movement amount Mx to the next position in consideration of the similarity at the current position, the extraction position (X 2 , Y 2 ) of the partial image 24 for operation is actually moved. Then, the processing of steps S21 to S23 in FIG. 7 is performed.
ステップ S 21において、 画像処理部 14は、 入力画像 21の中での現在の位 置が走査線の始点 (つまり入力画像 21の左端) に相当するか否かを判断する。 そして走査線の始点に位置する場合 (すなわち、 S 21が Ye sの場合)、 ステ ップ S 24に進んで、演算用の部分画像 24の抽出位置(X2,Y2)を横方向に移動 量 Mxだけ移動させる (図 8A参照)。 その後、 図 3のステップ S 1の処理に戻 る。 In step S21, the image processing unit 14 determines whether or not the current position in the input image 21 corresponds to the starting point of the scanning line (that is, the left end of the input image 21). If it is located at the start point of the scanning line (that is, if S21 is Yes), the process proceeds to step S24, and the extraction position (X 2 , Y 2 ) of the partial image 24 for calculation is set in the horizontal direction. Move by the movement amount Mx (see Fig. 8A). After that, the process returns to step S1 in FIG.
—方、走査線の始点に位置しない場合(すなわち、 S 21が N 0の場合)には、 ステップ S 22に進み、 現在の位置での類似度 (相互相関係数 C) に基づいて、 次の条件式(4)を満足するか否かの判定を行う。 この条件式(4)のうち係数 は、 上記した式(2)の係数 と同じである。 閾値 Tsは、 入力画像 21の全体か ら求めた統計値 (つまり平均濃度および濃度範囲) を用いて、 次の式(5)により 計算したものである。 . On the other hand, if it is not located at the start point of the scanning line (that is, if S 21 is N 0), the process proceeds to step S 22, and based on the similarity (cross-correlation coefficient C) at the current position, It is determined whether or not conditional expression (4) is satisfied. The coefficient in the conditional expression (4) is the same as the coefficient in the above-mentioned expression (2). Threshold T s, using the entire or al determined statistical value of the input image 21 (i.e. the average density and density range) is obtained by calculation by the following equation (5). .
(1— 現在の類似度) < Ts -(4) (1—current similarity) <T s- (4)
Ts = 平均濃度/濃度範囲 (5) T s = average concentration / concentration range (5)
ステップ S 22の条件式(4)を満足する場合とは、 現在の類似度に相当する相 互相関係数 Cが大きく (つまり 「1」 に近く)、 現在の位置で抽出された部分画 像 24とテンプレート画像 22との類似性が高く、現在の抽出位置(X2, Y2)が合 致位置(Χ,,Υ,)の近傍に到達した場合である。 そして、 ステップ S 22における 判定の結果、 現在の位置での類似度が 「抽出位置は2, Υ2)は合致位置はい Υ,) の近傍に到達した」 ことを示す場合 (すなわち、 S 22が Ye sの場合)、 次の ステップ S 23に進む。 If the condition (4) in step S22 is satisfied, the cross-correlation coefficient C corresponding to the current similarity is large (that is, close to “1”), and the partial image extracted at the current position 24 And the template image 22 has a high similarity, and the current extraction position (X 2 , Y 2 ) reaches the vicinity of the matching position (Χ, Υ,). Then, as a result of the determination in step S22, the similarity at the current position indicates that “the extraction position is 2 , Υ 2 ) has reached the vicinity of the matching position yes Υ,)” (that is, if S 22 If Yes, go to the next step S23.
ステップ S 23では、 現在.の位置での類似度と 「現在の位置より 1つ前の位置 での類似度」 とに基づいて、 次の条件式(6)を満足するか否かの判定を行う。 こ の条件式( 6 )のうち係数 k 3は、 0 < k 3≤ 1を満たす範囲で定めた経験値である。 閾値 TBは、 入力画像 2 1の全体から求めた統計値 (つまり標準偏差および濃度 範囲) を用いて、 次の式(7)により計算したものである。 . In step S23, it is determined whether or not the following conditional expression (6) is satisfied based on the similarity at the current position and the “similarity at the position immediately before the current position”. Do. This In the conditional expression (6), the coefficient k 3 is an empirical value determined within a range satisfying 0 <k 3 ≤1. The threshold value T B is calculated by the following equation (7) using statistical values (that is, standard deviation and density range) obtained from the entire input image 21. .
(現在の類似度一 1つ前の類似度) X k3 > TB -(6) (Similarity of the current similarity one previous) X k 3 > T B- (6)
' TB = 標準偏差/濃度範囲 ·_·(7) 'T B = standard deviation / concentration range_ (7)
ステップ S 23の条件式(6)を満足する場合とは、 現在の類似度が 1つ前の類 似度と比較して大きく上昇した場合である。 つまり、 1つ前の類似度が現在の類 似度と比較して極端に小さかった場合である。 このため、 条件式(6)を満足する 場合とは、 1つ前の類似度に相当する相互相関係数 Cが小さく (つまり 「0」 に 近く)、 1つ前の位置で抽出された部分画像 24とテンプレート画像 22との類 似性が低く、 1つ前の抽出位置(X2, Y2)が合致位置(X,, Y から離れている場合 と考えられる。 そして、 ステップ S 23における判定の結果、 1つ前の位置での 類似度が「抽出位置(Χ2, Υ2)は合致位置 い Υ から離れている」 ことを示す場 合 (すなわち、 S 23が Ye sの場合) は、 次のステップ S 25に進む。 The case where the conditional expression (6) in step S23 is satisfied is a case where the current similarity greatly increases as compared with the previous similarity. In other words, the previous similarity was extremely small compared to the current similarity. Therefore, the case where the conditional expression (6) is satisfied means that the cross-correlation coefficient C corresponding to the previous similarity is small (that is, close to “0”), and the part extracted at the previous position It is considered that the similarity between the image 24 and the template image 22 is low, and the previous extraction position (X 2 , Y 2 ) is far from the matching position (X, Y). When the result of the judgment indicates that the similarity at the previous position indicates that “the extracted position (Χ 2 , Υ 2 ) is far from the matching position Υ” (that is, if S 23 is Yes) Goes to the next step S25.
ステップ S 22の条件式(4)を満足し、 且つ、 ステップ S 23の条件式(6)を 満足する場合とは、 1つ前の小さな類似度を考慮して抽出位置(X2, Y2)を大きく 移動させたところ現在の位置で急激に類似度が大きくなった場合であり、 例えば 入力画像 2 1の真っ黒の背景(濃度値が最小) に含まれる白い点(濃度値が最大) を探索するようなテンプレートマッチングで起こりうる。 条件式(4), (6)を満 足する場合、仮に現在の大きな類似度を考慮して抽出位置(Χ22)を小さく移動 させても、 このまま前進させると合致位置はい Υ,)を通り過ぎてしまう可能性が ある。 The case where the conditional expression (4) in step S22 is satisfied and the conditional expression (6) in step S23 is satisfied is that the extraction position (X 2 , Y 2 This is the case where the similarity sharply increases at the current position when the) is greatly moved. For example, a white point (maximum density value) included in the black background (minimum density value) of the input image 21 is This can happen with template matching like searching. When the conditional expressions (4) and (6) are satisfied, even if the extraction position (Χ 2 , Υ 2 ) is moved small considering the current large similarity, if the extraction position is moved forward as it is, the matching position will be ).
このため、 ステップ S 25の処理では、 次の位置を現在の位置と 1つ前の位置 との間に設定し (図 8Β参照)、 抽出位置(Χ2, Υ.2)を 1つ前の位置に戻してから 移動量 Μχだけ前方に移動させる。 つまり、 前回(1つ前の位置—現在の位置)の 移動量 Μ Xの計算結果と、 今回 (現在の位置—次の位置)の移動量 Μ Xの計算結果 05 007487 For this reason, in the processing of step S25, the next position is set between the current position and the immediately preceding position (see FIG. 8 Β), and the extraction position (Χ 2 , Υ. 2 ) is set to the immediately preceding position. After returning to the position, move it forward by the amount of movement Μχ. In other words, the previous (current position—current position) travel amount Μ X and the current (current position—next position) travel amount Μ X 05 007487
15 との差分に応じて、 抽出位置(X2, Y2)を後方に移動させる。 その後、 図 3のステ ップ S 1の処理に戻る。 The extraction position (X 2 , Y 2 ) is moved backward according to the difference from 15. After that, the process returns to the process of step S1 in FIG.
なお、 上記の条件式(4 )を満足しない場合 (すなわち、 S 2 2が N oの場合) と、 条件式(4 )は満足するが条件式(6 )を満足しない場合 (すなわち、 S 2 3が N oの場合) には、 ステップ S 2 5ではなく、 ステップ S 2 4に進み、 抽出位置 (X2, Y2)を前方に移動量 M xだけ移動させる。 その後、 図 3のステップ S 1の処 理に戻る。 In addition, when the above-mentioned conditional expression (4) is not satisfied (that is, when S22 is No), when the conditional expression (4) is satisfied but the conditional expression (6) is not satisfied (that is, S2 3 the cases of N o), step S 2 instead 5, proceeds to step S 2 4, thereby extracting position (X 2, Y 2) is moved by the amount of movement M x forward. After that, the process returns to the process of step S1 in FIG.
したがって、 第 2実施形態のテンプレートマッチングによれば、 演算用の部分 画像 2 4が夕一ゲット 2 3を通り過ぎてしまう、つまり抽出位置(X2, Y2)が合致 位置( Xい Υ を通り過ぎてしまうといつた事態を確実に回避することができる。 このため、 入力画像 2 1の中の合致位置(Χ,, Υ,)を確実に特定できる。 第 2実施 形態のテンプレートマッチングでも、 上記した第 1実施形態のテンプレートマツ チングと同様、合致位置(χ,, γ の特定を短時間で正確に効率よく行えるのは言 うまでもない。 Therefore, according to the template matching of the second embodiment, the partial image 24 for calculation passes through the evening get 23, that is, the extraction position (X 2 , Y 2 ) passes the matching position (X い). As a result, it is possible to reliably avoid a situation that may occur when the template matching is performed, so that the matching position (確 実 ,, Υ,) in the input image 21 can be reliably specified. As in the template matching of the first embodiment described above, it is needless to say that the matching position (χ, γ) can be specified accurately and efficiently in a short time.
(第 3実施形態;) +  (3rd embodiment;) +
上記した第 1実施形態では、 図 3のステップ S 2において相互相関法によるマ ツチング演算 (式(1 )参照) を行う例で説明したが、 本発明はこれに限定されな レ^ 第 3実施形態では、 残差逐次検定法(S S D A法)によりマッチング演算を行 う場合について一例を説明する。  In the first embodiment described above, an example is described in which the matching operation (see equation (1)) is performed by the cross-correlation method in step S2 of FIG. 3, but the present invention is not limited to this. In the embodiment, an example will be described in which a matching operation is performed by a residual sequential test method (SSDA method).
残差逐次検定法によるマッチング演算は、 図 5に示す部分画像 2 4の位置(m, n)における濃度値 B と、 テンプレート画像 2 2の同じ位置 (m, n)における濃 度値 Α„ιηとを用い、 次の式(8 )または式(9 )により行われる。 式(8 )の Dは濃度 差の絶対値和である。 式(9 )の Eは濃度差の二乗和である。 マッチング演算の結 果 D , Eは、 部分画像 2 4とテンプレート画像 2 2との類似度に相当し、 その値 (つまり残差) が小さいほど、 部分画像 2 4とテンプレート画像 2 2との類似性 が高く、 抽出位置(X2, Y2)が合致位置 (X,, Υ,)に近いことを表す。 残差逐次検定 法によるマッチング演算は、 その計算量が少ないため、 さらなる高速化が可能と なる。 The matching operation by the residual sequential test method is based on the density value B at the position (m, n) of the partial image 24 shown in FIG. 5 and the density value テ ン プ レ ー ト ιη at the same position (m, n) of the template image 22. This is performed by the following equation (8) or equation (9), where D is the sum of absolute values of the density differences, and E in equation (9) is the sum of squares of the density differences. The results D and E of the matching operation correspond to the degree of similarity between the partial image 24 and the template image 22. The smaller the value (that is, the residual), the more similar the partial image 24 and the template image 22 are. This means that the extraction position (X 2 , Y 2 ) is close to the matching position (X ,, Υ,). Since the amount of calculation is small in the matching operation by the method, further speedup is possible.
^> = } ,? , l Amn - B mn l -- ( 8 )  ^> =},? , l Amn-B mn l-(8)
m n  m n
E = ) , '. (Amn - B mn )2 … (9 ) また、 残差逐次検定法によるマッチング演算を図 3のステップ S 2で行う場合、 図 4のステップ S 12, S 14における移動量 Mx,Myの計算には、 次の式(1 0),(11)を用いればよい。 , E =), '. (Amn-B mn) 2 … (9) When the matching operation by the residual sequential test method is performed in step S2 in FIG. 3, the movement amount in steps S12 and S14 in FIG. The following equations (10) and (11) may be used to calculate Mx and My. ,
Mx= floor [(Tx/4) X (k,x類似度)] —(10)  Mx = floor [(Tx / 4) X (k, x similarity)] — (10)
My= floor [(Ty/4) X (k2x類似度の行平均)] ·'·(1 1) 移動量 Μχを計算する際には、 現在の位置での類似度 (マッチング演算の結果 D, E) を正規化し、 正規化した値 (0〜: L) を式(10)の "類似度" に代入す る。 移動量 Myを計算する際には、 現在の走査線上の各位置での類似度 (マッチ ング演算の結果 D,E) を正規化し、正規化した値(0~1) の平均値を式(11) の "類似度の行平均" に代入する。 このような計算により、 上記と同様、 テンプ レートマッチングの最中に合致位置はい Υ,)との位置関係に応じて簡単に適切 な移動間隔 (移動量 Mx,My) を設定できる。 My = floor [(Ty / 4) X (k 2 x average of similarity)] · '· (1 1) When calculating 移動, the similarity at the current position (result of matching operation D, E) is normalized, and the normalized value (0 to: L) is substituted into the “similarity” of equation (10). When calculating the movement amount My, the similarity at each position on the current scan line (results of the matching operation D, E) is normalized, and the average value of the normalized values (0 to 1) is calculated by the formula ( Substitute it into "Similarity row average" in 11). By such a calculation, an appropriate moving interval (moving amount Mx, My) can be easily set according to the positional relationship with the matching position (Υ,) during template matching, as described above.
さらに、 残差逐次検定法によるマッチング演算を図 3のステップ S 2で行う場 合、 図 7のステップ S 22, S 23における判定 (つまり抽出位置(X2, Y2)を 1 つ前の位置に戻すか否かの判定) には、 次の条件式(12),(13)を用いればよ い。 Furthermore, when the matching operation by the residual sequential test method is performed in step S2 in FIG. 3, the determination in steps S22 and S23 in FIG. 7 (that is, the extraction position (X 2 , Y 2 ) The following conditional expressions (12) and (13) may be used to determine whether or not to return to.
(k, X現在の類似度) く Ts —(12) (k, X current similarity) ku T s — (12)
(1つ前の類似度一現在の類似度) X k 3 > TB :-(13) (Previous similarity-Current similarity) X k 3 > T B :-( 13)
この場合にも、 上記と同様、 類似度 (マッチング演算の結果 D, Ε) を正規化 し、 正規化した値 (0~1) を条件式(12), (13)に代入する。 ちなみに、 条 件式(12)を上記条件式(4)の代わりに用い、 条件式(13)を上記条件式(6)の 代わりに用いる。 条件式(12)の閾値 Tsは上記式(5)と同じである。 条件式(1. 3)の閾値 TBは上記式(7)と同じである。 このような条件式(12), (13)を用 いることにより、 上記と同様、 演算用の部分画像 24がターゲット 23を通り過 ぎてしまう (つまり抽出位置(X2, Y2)が合致位置(X,, Υ を通り過ぎてしまう) といった事態を確実に回避できる。 In this case as well, the similarity (result of matching operation D, Ε) is normalized, and the normalized value (0 to 1) is substituted into conditional expressions (12) and (13). By the way, conditional expression (12) is used instead of conditional expression (4), and conditional expression (13) is replaced by conditional expression (6). Use instead. Threshold T s of the condition (12) is the same as the formula (5). Threshold T B of the condition (1.3) is the same as the formula (7). By using such conditional expressions (12) and (13), the partial image 24 for the calculation passes through the target 23 in the same manner as described above (that is, the extraction position (X 2 , Y 2 ) The position (by passing X ,, Υ) can be reliably avoided.
(第 4実施形態)  (Fourth embodiment)
図 3のステップ S 2におけるマッチング演算としては、 上記した相互相関法や 残差逐次検定法に限らず、 濃度ヒストグラムまたは慣性モーメントなどの特徴量 を用いることもできる。 第 4実施形態では、 濃度ヒストグラム及び慣性モーメン トに基づいてマッチング演算を行う場合について一例を説明する。  The matching operation in step S2 in FIG. 3 is not limited to the cross-correlation method and the residual sequential test method described above, but may be a feature amount such as a density histogram or a moment of inertia. In the fourth embodiment, an example will be described in which a matching calculation is performed based on a density histogram and an inertia moment.
濃度ヒストグラムに基づくマッチング演算では、 例えば図 9 Αに示す通り、 テ ンプレート画像 22の濃度ヒストグラム H が予め作成され、 演算用の部分画像 24が抽出される毎に、その部分画像 24の濃度ヒストグラム H24が作成される。 濃度ヒストグラム H24,H22の横軸は濃度値、 縦軸は画素数である。 In the matching operation based on the density histogram, a density histogram H of the template image 22 is created in advance, for example, as shown in FIG. 9Α, and each time a partial image 24 for calculation is extracted, the density histogram H of the partial image 24 is extracted. H 24 is created. The horizontal axis concentration values of concentration histograms H 24, H 22, the vertical axis is the number of pixels.
そして、 2つの濃度ヒストグラム H24,H22の重なり部分 (図 9 Bの斜線部分) の画素数を集計することで、 マッチング演算が行われる。 この場合のマッチング 演算の結果としての集計値 Fは、 部分画像 24とテンプレート画像 22との類似 度に相当し、 その値が大きいほど、 部分画像 24とテンプレート画像 22との類 似性が高く、 抽出位置(X2, Y2)が合致位置(Χ,, Υ,)に近いことを表す。 Then, the matching calculation is performed by counting the number of pixels in the overlapping portion of the two density histograms H 24 and H 22 (the hatched portion in FIG. 9B). The aggregate value F as a result of the matching operation in this case corresponds to the similarity between the partial image 24 and the template image 22. The larger the value, the higher the similarity between the partial image 24 and the template image 22. It indicates that the extraction position (X 2 , Y 2 ) is close to the matching position (Χ ,, Υ,).
慣性モーメントとは下記式 (14) 〜 (16) に示すように画像内のある領域 のすベての画素のその領域の原点からの距離 (xi,yi) と濃度値 wiを原点周りの 慣性モーメントの式に代入した値である。 ·  The moment of inertia is the distance (xi, yi) from the origin of all pixels of a certain area in the image and the density value wi to the inertia around the origin, as shown in the following equations (14) to (16). This is the value assigned to the moment formula. ·
原点周りの慣性モーメント =∑ (xiHyi2) wi … (14) 各軸周りの慣性モーメント =∑xi2 · wi 、 又は ·'· (15) Moment of inertia around the origin = ∑ (xiHyi 2 ) wi… (14) Moment of inertia around each axis = ∑xi 2 · wi or · '· (15)
各軸周りの慣性モーメント二∑yi2' wi … (16) 2005/007487 Moment of inertia around each axis ∑yi 2 'wi… (16) 2005/007487
18 慣性モーメントに基づくマッチング演算では、 例えばテンプレート画像 22の 慣性モーメント 122が予め作成され、 演算用の部分画像 24力抽出される毎に、 その部分画像 24の慣性モーメント 124が作成される。 2つの慣性モーメント I24, lnの差分の絶対値が演算されその値が小さいほど、 部分画像 24とテンプレ 一卜画像 22との類似性が高く、抽出位置(X2, Y2)が合致位置(Χ,, Υ,)に近いこ とを表す。 18 the matching operation based on the moment of inertia, for example created inertia 1 22 of the template image 22 in advance, for each extracted partial image 24 power for operation, the moment of inertia 1 24 of the partial image 24 is created. The absolute value of the difference between the two moments of inertia I 24 and l n is calculated, and the smaller the value is, the higher the similarity between the partial image 24 and the template image 22 is, and the extraction positions (X 2 , Y 2 ) match. Indicates that it is close to the position (Χ ,, Υ,).
図 9Α、 図 9 Βに説明されているような、 濃度ヒストグラムによるマッチング 演算や慣性モーメントによるマツチング演算を図 3のステップ S 2で行う場合、 図 4のステップ S 1 2, S 14における移動量 Mx, Myの計算には、 上記式(2), (3)を用いればよい。  When the matching operation based on the density histogram and the matching operation based on the moment of inertia are performed in step S2 in FIG. 3 as described in FIGS. 9Α and 9 9, the movement amount Mx in steps S12 and S14 in FIG. , My can be calculated using the above equations (2) and (3).
移動量 Mxを計算する際には、 現在の位置での類似度である集計値 Fを正規化 し、 正規化した値 (0〜1) を式(2)の "類似度" に代入する。 移動量 Myを計 算する際には、 現在の走査線上の各位置での類似度である集計値 Fを正規化し、 正規化した値 (0〜1) の平均値を式(3)の "類似度の行平均" に代入する。 こ のような計算により、上記と同様、テンプレートマッチングの最中に合致位置(X ,,Υ,)との位置関係に応じて簡単に適切な移動間隔 (移動量 Mx,My) を設定で きる。  When calculating the movement amount Mx, the total value F, which is the similarity at the current position, is normalized, and the normalized value (0 to 1) is substituted for the “similarity” in equation (2). When calculating the movement amount My, the totalized value F, which is the similarity at each position on the current scan line, is normalized, and the average value of the normalized values (0 to 1) is calculated as "" in equation (3). Substituting into "Line mean of similarity". By such a calculation, an appropriate moving interval (moving amount Mx, My) can be easily set according to the positional relationship with the matching position (X ,, Υ,) during template matching as described above. .
また、 図 9A、 図 9 Bに説明されているように、 濃度ヒストグラムによるマツ チング演算を図 3のステップ S 2で行う場合、 図 7のステップ S 22, S 23に おける判定(つまり抽出位置(X2, Y2)を 1つ前の位置に戻すか否かの判定)には、 上記条件式(4), (6)を用いればよい。 Also, as described in FIGS. 9A and 9B, when the matching calculation based on the density histogram is performed in step S2 in FIG. 3, the determination in steps S22 and S23 in FIG. X 2 , Y 2 ) can be determined using the above conditional expressions (4) and (6).
この場合にも、上記と同様、 類似度(集計値 F) を正規化し、正規化した値(0 〜1) を条件式(4), (6)に代入する。 この場合にも、 上記と同様、 演算用の部 分画像 24がターゲット 23を通り過ぎてしまう (つまり抽出位置(Χ2, Υ2)が合 致位置(Χ,, Υ,)を通り過ぎてしまう) といった事態を確実に回避できる。 In this case, as in the above case, the similarity (total value F) is normalized, and the normalized value (0 to 1) is substituted into conditional expressions (4) and (6). In this case, as described above, parts of image 24 for computation will past the target 23 (i.e. extraction position (chi 2, Upsilon 2) will past means to match the position (chi ,, Upsilon,)) Such a situation can be reliably avoided.
さらに、 濃度ヒストグラムに基づくマツチング演算は、 例えば図 9 Αに示す 2 つの濃度ヒストグラム H24,H22の差分の絶対値 (図 9 Cの斜線部分) の画素数を 集計することにより行ってもよい。 この場合のマツチング演算の結果である集計 値 Gは、 部分画像 24とテンプレート画像 22との類似度に相当し、 その値が小 さいほど、部分画像 24とテンプレート画像 22との類似性が高く、抽出位置(X 2, Υ,)が合致位置(X Υ に近いことを表す。 Furthermore, the matching operation based on the density histogram is performed, for example, as shown in Fig. 9Α. This may be performed by counting the number of pixels of the absolute value of the difference between the two density histograms H 24 and H 22 (the hatched portion in FIG. 9C). The aggregate value G, which is the result of the matching operation in this case, corresponds to the similarity between the partial image 24 and the template image 22, and the smaller the value, the higher the similarity between the partial image 24 and the template image 22. It indicates that the extraction position (X 2 , Υ,) is close to the matching position (X Υ).
図 9Α、 図 9 Cに説明されているように、 濃度ヒストグラムによるマッチング 演算を図 3のステップ S 2で行う場合、 図 4のステップ S 1 2, S 14における 移動量 Mx, Myの計算には、 上記式(1 0), (1 1)を用いればよい。  As described in Fig. 9Α and Fig. 9C, when the matching calculation using the density histogram is performed in step S2 in Fig. 3, the calculation of the movement amounts Mx and My in steps S12 and S14 in Fig. 4 The above equations (10) and (11) may be used.
移動量 を計算する際には、現在の位置での類似度(集計値 G)を正規化し、 正規化した値 (0〜1) を式(10)の "類似度" に代入する。 移動量 Myを計算 する際には、 現在の走査線上の各位置での類似度 (集計値 G) を正規化し、 正規 化した値 (0〜1) の平均値を式(1 1)の "類似度の行平均" に代入する。 この ような計算により、 上記と同様、 テンプレートマッチングの最中に合致位置(X,, Υ,)との位置関係に応じて簡単に適切な移動間隔(移動量 Mx,My) を設定でき る。  When calculating the amount of movement, the similarity (total value G) at the current position is normalized, and the normalized value (0 to 1) is substituted for the “similarity” in equation (10). When calculating the movement amount My, the similarity (total value G) at each position on the current scanning line is normalized, and the average value of the normalized values (0 to 1) is calculated as " Substituting into "Line mean of similarity". By such a calculation, an appropriate moving interval (moving amount Mx, My) can be easily set according to the positional relationship with the matching position (X ,, Υ,) during template matching, as described above.
また、 図 9A、 図 9 Cに説明されているように、 濃度ヒストグラムによるマツ チング演算を図 3のステップ S 2で行う場合、 図 7のステップ S 22, S 23に おける判定(つまり抽出位置(X2, Y2)を 1つ前の位置に戻すか否かの判定)には、 上記条件式(1 2), (1 3)を用いればよい。 ただし、 条件式(1 3)の閾値 ΤΒは、 次の式(17)により計算する。 Further, as described in FIGS. 9A and 9C, when the matching calculation based on the density histogram is performed in step S2 in FIG. 3, the determination in steps S22 and S23 in FIG. X 2 , Y 2 ) can be determined using the above conditional expressions (1 2) and (1 3). However, the threshold value Τ of the conditional expression (13) is calculated by the following expression (17).
ΤΒ= (標準偏差) Χ 2/濃度範囲 〜(17) Τ Β = (standard deviation) Χ 2 / concentration range ((17)
この場合にも、 上記と同様、類似度(集計値 G) を正規化し、正規化した値(0 〜 1) を条件式(1 2), (13)に代入する。 したがって、 上記と同様、 演算用の 部分画像 2 がターゲット 23を通り過ぎてしまう (つまり抽出位置(Χ2, Υ2)が 合致位置は ,,Υ,)を通り過ぎてしまう) といった事態を確実に回避できる。 In this case as well, the similarity (total value G) is normalized, and the normalized values (0 to 1) are substituted into conditional expressions (12) and (13). Therefore, as in the above, it is possible to reliably avoid the situation in which the partial image 2 for calculation passes the target 23 (that is, the extraction position (Χ 2 , 位置2 ) passes the ,, Υ,) at the matching position). it can.
なお、 上記した実施形態 1〜4では、 演算用の部分画像 24の抽出位置(Χ2, Y2)を少しずつ移動させる際、テンプレート画像 22の大きさ(画素数 T x, Ty) を考慮し、 その 1Z4に相当する大きさを移動量 Mx, Myの最大値としたが、 本発明はこれに限定されない。移動量 Mx, Myの最大値を "画素数 Tx,'Tyの 1Z4" 以外の値 (例えば画素数 Tx, Tyの 1ノ2) に設定してもよい。 移動 量 Mx, Myの最大値の設定をマッチング演算の種類に応じて変更してもよい。 例えば、 濃度ヒストグラムに基づくマッチング演算の際には、 相互相関法や残差 逐次検定法と比較して、 移動量 M X, M yの最大値を大きく設定することができ る。 このため、 さらなる高速化が可能となる。 In the first to fourth embodiments, the extraction position (位置2 , When moving Y 2 ) little by little, the size (number of pixels T x, Ty) of the template image 22 is taken into account, and the size corresponding to 1Z4 is taken as the maximum value of the movement amount Mx, My. Is not limited to this. The maximum values of the movement amounts Mx and My may be set to values other than “1Z4 of the number of pixels Tx and 'Ty” (for example, 1 × 2 of the number of pixels Tx and Ty). The setting of the maximum value of the movement amount Mx, My may be changed according to the type of the matching operation. For example, when performing a matching operation based on the density histogram, the maximum values of the movement amounts MX and My can be set larger than those of the cross-correlation method and the residual sequential test method. Therefore, it is possible to further increase the speed.
また、 上記した実施形態では、 ラスタ走査の次の走査線への移動量 Myを計算 する際に、 現在の走査線上の各位置 (例えば全ての位置) での "類似性に関する 指標" を考慮したが、 本発明はこれに限定されない。 全ての位置に限らず、 現在 の走査線上の一部 (例えば 1つ置き) の位置を選択的に考慮する場合にも、 本発 明を適用できる。 その場合、 現在の位置での "類似性に関する指標" 力考慮され なくても構わない。  In the above embodiment, when calculating the movement amount My of the raster scan to the next scan line, the “index of similarity” at each position (for example, all positions) on the current scan line is considered. However, the present invention is not limited to this. The present invention can be applied not only to all positions but also to a case where a part (for example, every other position) on the current scanning line is selectively considered. In that case, the "similarity indicator" at the current position need not be considered.
さらに、 上記した実施形態では、 ラスタ走査の次の走査線への移動量 Myを計 算する際に、現在の走査線上の各位置(少なくとも一部の位置)での平均的な "類 似性に関する指標" を考慮したが、 本発明はこれに限定されない。 平均値に限ら ず、 現在の走査線上の各位置 (全部または一部) で最も大きい "類似性に関する 指標" を考慮する場合にも、 本発明を適用できる。  Further, in the above embodiment, when calculating the movement amount My of the raster scan to the next scan line, the average “similarity” at each position (at least a part of positions) on the current scan line is calculated. However, the present invention is not limited to this. The present invention is applicable not only to the average value but also to the case where the largest “index of similarity” at each position (all or part) on the current scanning line is considered.
また、 上記した実施 態では、 演算用の部分画像 24の抽出位置(X2,Y2)をラ スタ走査の方向に沿って移動させる例を説明したが、 本発明はこれに限定されな い。 その他の予め定めた方向 (例えば一次元方向など) に沿って抽出位置(Χ2, Υ2)を移動させる場合にも、 上記と同様の移動量の計算式 (例えば式(2)) を用 いることで、 同様の効果を得ることができる。 Further, in the above-described embodiment, an example has been described in which the extraction position (X 2 , Y 2 ) of the partial image 24 for calculation is moved along the raster scanning direction, but the present invention is not limited to this. . When moving the extraction position (Χ 2 , Υ 2 ) along another predetermined direction (for example, one-dimensional direction), the same calculation formula for moving amount (for example, formula (2)) as above is used. By doing so, a similar effect can be obtained.
さらに、 上記した実施形態では、 抽出位置(Χ22)の移動方向を予め定めてお く例 (例えばラスタ走査の方向に沿って移動させる例) を説明したが、 本発明は これに限定されない。 抽出位置(X2, Y2)の移動方向を予め定めず、 現在までに求 めた "類似性に関する指標" のうち少なくとも 1つを考慮して、 抽出位置(χ2, Υ2)の移動方向と移動量との双方を決定しても構わない。 その場合、 現在の位置 での "類似性に関する指標" を考慮しなくても構わない。 Further, in the above-described embodiment, an example in which the moving direction of the extraction position (Χ 2 , Υ 2 ) is determined in advance (for example, an example of moving along the raster scanning direction) has been described. It is not limited to this. The moving direction of the extraction position (χ 2 , Υ 2 ) is determined in advance without considering the moving direction of the extraction position (X 2 , Y 2 ) and considering at least one of the “similarity indicators” obtained so far. Both the direction and the movement amount may be determined. In this case, the "similarity indicator" at the current position need not be considered.
(第 5実施形態)  (Fifth embodiment)
第 1実施形態から第 4実施形態は、 テンプレートマツチング処理を類似度判定 に基づきステップ制御するものであるが、 第 5実施形態は、 テンプレートマッチ ング処理を類似度判定に基づきマツチング演算処理をカット制御するものであ る。  In the first to fourth embodiments, the template matching processing is step-controlled based on the similarity determination. In the fifth embodiment, the matching processing is cut off based on the similarity determination in the template matching processing. Control.
本実施形態のテンプレートマッチングは、 図 1 0に示すフローチャートの手順 (ステップ S 1 ~ S 8 ) にしたがって行われる。  The template matching according to the present embodiment is performed according to the procedure (steps S1 to S8) of the flowchart shown in FIG.
図 1 0の処理では、 入力画像 2 1の中から抽出した演算用の部分画像 2 4とテ ンプレート画像 2 2とのマッチング演算 (S 4 ) が、 演算用の部分画像 2 4の抽 出位置(X2,Y2)を少しずつ移動させながら、 必要に応じて繰り返し行われる。 な お、 入力画像 2 1は、 「画像情報を含む入力信号」 に対応する。 テンプレート画 像 2 2は、 「画像情報を含むテンプレート信号」 に対応する。 演算用の部分画像 2 4は、 「画像情報を含む演算用の部分信号」 に対応する。 In the processing of FIG. 10, the matching operation (S 4) between the operation partial image 24 extracted from the input image 21 and the template image 22 is performed to extract the operation partial image 24. It is repeated as needed while moving the position (X 2 , Y 2 ) little by little. The input image 21 corresponds to “input signal including image information”. The template image 22 corresponds to a “template signal including image information”. The calculation partial image 24 corresponds to “calculation partial signal including image information”.
また、 本実施形態のテンプレートマッチングでは、 マッチング演算 (S 4 ) を 行うか否かの判断処理 (S 3 ) の 1回目まで (こ、 テンプレート画像 2 2の歪度 S 22を計算する。 この場合の歪度 S 22は、 テンプレート画像 2 2の濃度ヒストグラ ムの分布形状の非対称性を示す統計的な尺度 (skewness) である。 具体的には、 次の式(1 8 )の "Xran" に、 図 5 Aに示すテンプレート画像 2 2の位置 (m, に おける濃度値 A„raを代入することより、 テンプレート画像 2 2の歪度 S 22の計算 が行われる。式(1 8 )の Nはテンプレート画像 2 2の画素の総数, ひは標準偏差 である。
Figure imgf000024_0001
In the template matching according to the present embodiment, the skewness S22 of the template image 22 is calculated up to the first time of the determination processing (S3) of whether or not to perform the matching operation (S4). Is a statistical scale (skewness) indicating the asymmetry of the distribution shape of the density histogram of the template image 22. Specifically, “X ran ” in the following equation (18) Then, the skewness S22 of the template image 22 is calculated by substituting the density value A „ ra at the position (m,) of the template image 22 shown in Fig. 5A. N is the total number of pixels in the template image 22, and is the standard deviation.
Figure imgf000024_0001
S= TO( 8) S = TO(8)
X : Xmnの平均値 テンプレート画像 22の歪度 S22について、 図 11A乃至図 11 Cに示す濃度 ヒストグラムを用いて説明する。 図 11 A—図 1 1 Cに示す濃度ヒストグラムの 横軸は濃度値、 縦軸は画素数である。 図 1 1 Aに示す濃度ヒストグラムのように 分布形状が左右対称の場合、 歪度 S22=0となる。 図 1 I Bに示す濃度ヒストグ ラムのように分布形状が非対称で左側に偏っている (すなわち、 濃度小の画素が 多い) 場合、 歪度 S22<0となる。 図 1 1 Cに示す濃度ヒストグラムのように分 布形状が非対称で右側に偏っている (すなわち、 濃度大の画素が多い) 場合、 歪 度 S22>0となる。 テンプレート画像 22の歪度 S22の計算は、 上記の通り、 マツ チング演算 (S 4) を行うか否かの判断処理 (S 3) の 1回目までに行われる。 図 10の処理 (S 1〜S 8) について順に説明する。 X: The skewness S 22 of the mean value template image 22 of Xmn, is described with reference to concentration histograms shown in FIGS. 11A-11 C. The horizontal axis of the density histogram shown in Fig. 11A-Fig. 11C is the density value, and the vertical axis is the number of pixels. When the distribution shape is symmetric as in the density histogram shown in FIG. 11A, the skewness S 22 = 0. When the distribution shape is asymmetric and skewed to the left (that is, there are many pixels with low density) as in the density histogram shown in FIG. 1 IB, the skewness S 22 <0. When the distribution shape is asymmetric and skewed to the right (that is, many pixels with high density) as in the density histogram shown in FIG. 11C, the skewness S 22 > 0. Calculation of skewness S 22 of the template image 22, as described above, is performed until the first pine quenching operation (S 4) performs judging whether processing of (S 3). The processing (S1 to S8) in FIG. 10 will be described in order.
ステップ S 1において、 画像処理部 14は、 入力画像 21の中から演算用の部 分画像 24を抽出する。 演算用の部分画像 24は、 テンプレート画像 22と縦横 各々同じ大きさ(画素数)の矩形状である。演算用の部分画像 24とテンプレート 画像 22は、 共に、 入力画像 21より小さい (画素数が少ない)。  In step S1, the image processing unit 14 extracts a partial image 24 for calculation from the input image 21. The calculation partial image 24 has a rectangular shape having the same size (number of pixels) in both the vertical and horizontal directions as the template image 22. The calculation partial image 24 and the template image 22 are both smaller than the input image 21 (the number of pixels is small).
次に (ステップ S 2)、 画像処理部 14は、 ステップ S 1で抽出した演算用の 部分画像 24の歪度 S24を計算する。 この場合の歪度 S24は、 部分画像 24の濃 度ヒストグラムの分布形状の非対称性を示す統計的な尺度 (skeraess) である。 具体的には、 上記の式(1)の "X に、 図 5 Bに示す部分画像 24の位置(m, n)における濃度値 Bmnを代入することより、 演算用の部分画像 24の歪度 S24の 計算が行われる。 この場合、 式(1)の Nは部分画像 24の画素の総数, σは標準 偏差である。 Next (Step S 2), the image processing unit 14 calculates the skewness S 24 of the partial image 24 for computation extracted in step S 1. Skewness S 24 in this case is a statistical measure of the asymmetry of the concentration histograms of the distribution shape of the partial image 24 (skeraess). Specifically, by substituting the density value B mn at the position (m, n) of the partial image 24 shown in FIG. 5B into “X” of the above equation (1), the distortion of the partial image 24 for calculation is obtained. The calculation of the degree S 24 is performed, where N in Equation (1) is the total number of pixels of the partial image 24, and σ is the standard deviation.
部分画像 24の歪度 S24も、 テンプレート画像 22の歪度 S22と同様、 図 11 Aに示す濃度ヒストグラムのように分布形状が左右対称の場合、 歪度 S24= 0と なる。 図 1 1 Bに示す濃度ヒストグラムのように分布形状が非対称で左側に偏つ ている (濃度小の画素が多い) 場合、 歪度 S24<0となる。 図 1 1 Cに示す濃度 ヒストグラム(c)のように分布形状が非対称で右側に偏っている (濃度大の画素 が多い) 場合、 歪度 S24>0となる。 Skewness S 24 of the partial image 24 is also similar to the skewness S 22 of the template image 22, FIG. 11 When the distribution shape is symmetric as in the density histogram shown in A, the skewness S 24 is zero. If the distribution shape is asymmetric and skewed to the left (many pixels with low density) as in the density histogram shown in FIG. 11B, the skewness S 24 <0. When the distribution shape is asymmetric and skewed to the right (many pixels with high density) as in the density histogram (c) shown in Fig. 11C, the skewness S 24 > 0.
次に (ステップ S 3)、 画像処理部 1 4は、 ステップ S 2で計算した部分画像 24の歪度 24と既に計算済みのテンプレート画像 22の歪度 SMとの比較によ り、 歪度の絶対差 I S22— S24 Iを計算する。歪度の絶対差 I S22— S24 Iは、 テン プレート画像 2 2の濃度ヒストグラムと部分画像 24の濃度ヒストグラムとの 類似性に関する指標である。 2つの濃度ヒストグラムの類似性が高いほど、 歪度 の絶対差 I S22— S24 Iは小さな値を示す。逆に、 2つの濃度ヒストグラムの類似 性が低いほど、 歪度の絶対差 I S22— S24 |は大きな値を示す。 Next (Step S 3), the image processing unit 1 4, Ri by the comparison of the skewness S M already computed the template image 22 and skewness 24 of the partial image 24 calculated in step S 2, the skewness Calculate the absolute difference IS 22 — S 24 I. The absolute difference in skewness IS 22 —S 24 I is an index relating to the similarity between the density histogram of the template image 22 and the density histogram of the partial image 24. The higher the similarity of the two density histograms, the smaller the absolute difference in skewness IS 22 — S 24 I. Conversely, the lower the similarity between the two density histograms, the greater the absolute skewness difference IS 22 — S 24 |.
さらに、 歪度の絶対差 I S22— S24 Iが大きな値を示し、 2つの濃度ヒストグラ ムの類似性が低い場合、 テンプレート画像 2 2と部分画像 24とは、 明かに類似 性が低い (相違している) と考えられる。 逆に、 歪度の絶対差 I S22— S24 lが小 さな値を示し、 2つの濃度ヒストグラムの類似性が高い場合、 テンプレート画像 2 2と部分画像 24との類似性は高い可能性がある。 つまり、 類似性が低い可能 性もあるが、 類似性が高い可能性もある。 したがって、 歪度の絶対差 I S22— S24 Iは、 テンプレート画像 22と部分画像 24との類似性に関する概略値と考えら れる。 Furthermore, when the absolute difference in skewness IS 22 — S 24 I shows a large value and the similarity of the two density histograms is low, the similarity between the template image 22 and the partial image 24 is clearly low (the difference it seems to do. Conversely, if the absolute difference in skewness IS 22 — S 24 l shows a small value and the two density histograms have a high similarity, the similarity between the template image 22 and the partial image 24 may be high. is there. In other words, similarity may be low, but similarity may be high. Therefore, the absolute difference in skewness IS 22 —S 24 I is considered to be an approximate value regarding the similarity between the template image 22 and the partial image 24.
画像処理部 14は、 歪度の絶対差 I S22_S24 | を計算した後、 これを予め定め た閾値 α (>0) と大小比較する。 そして、 次の条件式(1 9)を満足するか否か の判断 (ステップ S 3) を行う。 After calculating the absolute difference in skewness IS 22 _S 24 |, the image processing unit 14 compares the absolute value with a predetermined threshold α (> 0). Then, it is determined whether or not the following conditional expression (19) is satisfied (step S3).
I Sn-Su \ < ー(1 9) IS n -S u \ <ー (1 9)
条件式(1 9)を満足しない場合 (S 3が No)、 上記のようにテンプレート画 像 2 2と部分画像 24とは明かに類似性が低い (相違している) ため、 マツチン グ演算 (S 4) によって、 部分画像 24とテンプレート画像 2 2との類似性に関 する正確な指標 (つまり類似度) を求める必要がない。 したがって、 条件式(1 9)を満足しない場合 (S 3が No) にはマッチング演算 (S 4) を省略し、 後 述のステップ S 6に進む。 When conditional expression (19) is not satisfied (No in S3), the similarity between template image 22 and partial image 24 is clearly low (different) as described above. It is not necessary to determine an accurate index (that is, similarity) regarding the similarity between the partial image 24 and the template image 22 by the log operation (S4). Therefore, when the conditional expression (19) is not satisfied (S3 is No), the matching operation (S4) is omitted, and the process proceeds to step S6 described later.
一方、 条件式(1 9)を満足する場合 (すなわち、 S 3が Y e sの場合)、 上記 のようにテンプレート画像 2 2と部分画像 24との類似性は高い可能性がある ため、 マッチング演算 (S 4) によって、 部分画像 24とテンプレート画像 2 2 との類似性に関する正確な指標 (つまり類似度) を求める意味がある。 したがつ て、 条件式(1 9)を満足する場合 (S 3が Y e s) にはステップ S 4に進み、 マ ツチング演算 (S 4) を実行する。  On the other hand, when the conditional expression (19) is satisfied (that is, when S 3 is Yes), the similarity between the template image 22 and the partial image 24 may be high as described above, so that the matching operation is performed. By (S4), it is meaningful to obtain an accurate index (that is, similarity) regarding the similarity between the partial image 24 and the template image 22. Therefore, when the conditional expression (19) is satisfied (S3 is Yes), the process proceeds to step S4, and the matching operation (S4) is executed.
このように、 本実施形態のテンプレートマッチング (図 1 0) では、 ステップ S 3において、 演算用の部分画像 24とテンプレート画像 22との類似性に関す る概略値 (つまり歪度の絶対差 I S22— S24l)に基づいて、 部分画像 24とテン プレート画像 2 2とのマッチング演算 (S 4) を行うか否かを判断する。 ステツ プ S 3の判断処理は、 部分画像 24とテンプレート画像 2 2との類似性を大雑巴 に判断する処理である。 したがって、 この演算処理は、 マッチング演算よりも短 い時間で行うことができる。 つまり、 演算速度が速い。 そして、 マッチング演算 を 「行わない」 と判断した場合にはその演算を省略し、 「行う」 と判断した場合 のみその演算を実行する。 As described above, in the template matching (FIG. 10) of the present embodiment, in step S3, the approximate value (that is, the absolute difference in skewness IS 22 ) relating to the similarity between the calculation partial image 24 and the template image 22 is obtained. - based on the S 24 l), it determines whether or not to perform the matching operation between the partial image 24 and the template image 2 2 (S 4). The determination process of step S3 is a process of determining the similarity between the partial image 24 and the template image 22 roughly. Therefore, this calculation process can be performed in a shorter time than the matching calculation. In other words, the calculation speed is high. Then, when it is determined that the matching calculation is not performed, the calculation is omitted, and only when it is determined that the matching calculation is performed, the calculation is performed.
ステップ S 3の条件式(1 9)を満足する場合、 画像処理部 1 4は、 ステップ S 4において、 演算用の部分画像 24とテンプレート画像 2 2とのマッチング演算 (類似度の演算) を行う。 ここでは、 マッチング演算の一例として、 周知の相互 相関法を用いる。 この場合のマッチング演算は、 図 5 Bに示す部分画像 24の位 置 (m, n)における濃度値 BMと、図 5 Aに示すテンプレート画像 2 2の同じ位置 (m, n)における濃度値 Amとを用い、 次の式(2 0)により行われる。 _, _,(Amn- A)(Bmn- 1")
Figure imgf000027_0001
If the conditional expression (19) in step S3 is satisfied, the image processing unit 14 performs a matching operation (operation of similarity) between the operation partial image 24 and the template image 22 in step S4. . Here, a known cross-correlation method is used as an example of the matching operation. In this case, the matching calculation is performed based on the density value B M at the position (m, n) of the partial image 24 shown in FIG. 5B and the density value at the same position (m, n) of the template image 22 shown in FIG. 5A. using the a m, it is performed by the following equation (2 0). _, _, (Amn- A) (B mn -1 ")
Figure imgf000027_0001
A : Amnの平均値 ' B : Bmnの平均値 A: Average value of Amn 'B: Average value of B mn
マッチング演算の結果は、正規化された相互相関係数 Cであり (一 1 C≤ 1)、 演算用の部分画像 24とテンプレート画像 22との類似度に相当する。 類似度は、 部分画像 24とテンプレート画像 22との「類似性に関する指標」の 1つであり、 「類似性に関する正確な指標」 である。 傾向としては、 類似度に相当する相互相 関係数 Cが大きい (つまり 「1」 に近い) ほど、 部分画像 24とテンプレート画 像 22との類似性が高く、部分画像 24の抽出位置(X2, Y2)が合致位置(Χ,, Υ,) に近いことを表す。 The result of the matching operation is a normalized cross-correlation coefficient C (1 1 C ≤ 1), which corresponds to the similarity between the operation partial image 24 and the template image 22. The similarity is one of the “index of similarity” between the partial image 24 and the template image 22, and is an “exact index of similarity”. The tendency is that the larger the mutual correlation number C corresponding to the degree of similarity is (the closer to “1”), the higher the similarity between the partial image 24 and the template image 22 is, and the extraction position (X 2 , Y 2 ) is close to the matching position (Χ ,, Υ,).
上記のマッチング演算が終了すると、 画像処理部 14は、 次のステップ S 5に おいて、 マッチング演算の結果である類似度 (相互相関係数 C) を、 部分画像 2 4の抽出位置(Χ2,Υ2)と対応づけてメモリに保存する。 これらのステップ S 1〜 S 5の処理を経て、 入力画像 21の中の 1つの抽出位置(Χ2, Υ2)に対する処理が 終わる。 そして、 演算用の部分画像 24の抽出位置(Χ2,Υ2)を次の位置へ移動さ せる場合 (すなわち、 ステップ S 6が Ye sの場合) には、 ステップ S 7の処理 に進む。 When the above-described matching calculation is completed, the image processing unit 14 determines the similarity (cross-correlation coefficient C), which is the result of the matching calculation, in the next step S5 by using the extraction position (Χ 2 , Υ 2 ) and store them in memory. After the processing of these steps S 1~ S 5, 1 single extraction position (Χ 2, Υ 2) in the input image 21 processing for ends. When the moving extraction position of the partial image 24 for computation (chi 2, Upsilon 2) the next position (i.e., when the step S 6 is Ye s), the processing proceeds to step S 7.
ステップ S 7の処理は、演算用の部分画像 24の抽出位置(X2, Y2)の移動処理 である。 画像処理部 14は、 部分画像 24の抽出位置(Χ22)を現在の位置から 次の位置へ移動させる。その後、ステップ S 1の処理に戻り、新たな抽出位置(X 22)において、 演算用の部分画像 24の抽出 (S 1) —歪度 S24の計算 (S 2) —マッチング演算の実行/省略の判断 (S 3) → 〔必要に応じてマッチング演算 (S 4) —結果保存 (S 5)〕 を繰り返す。 The process of step S7 is a process of moving the extraction position (X 2 , Y 2 ) of the partial image 24 for calculation. The image processing section 14, extraction position of the partial image 24 (Χ 2, Υ 2) to move from the current position to the next position. Thereafter, the flow returns to the processing step S 1, in the new extraction position (X 2, Υ 2), extraction of the partial image 24 for computation (S 1) - calculation of the skewness S 24 (S 2) - the matching operation Judgment of execution / omission (S3) → [Matching operation (S4)-Save result (S5) if necessary] is repeated.
このようにして、 ステップ S 1→S 2→S 3→ 〔S4→S 5〕 →S 6→S 7→ S 1…の処理を繰り返すことにより、演算用の部分画像 24の抽出位置(X2,Y2) 2005/007487 In this way, by repeating the processing of steps S 1 → S 2 → S 3 → [S 4 → S 5] → S 6 → S 7 → S 1…, the extraction position (X 2 , Y 2 ) 2005/007487
26 を少しずつ移動させながら、 各々の位置で部分画像 2 4を順に抽出し、 部分画像 2 4を抽出する毎に、 マッチング演算 (S 4 ) を行うか否かを判断することがで きる。 また、 その判断の内容が 「行う」 ことを示す場合のみテンプレート画像 2 2とのマッチング演算を行い、 その結果を保存する。  While moving 26 little by little, the partial images 24 are sequentially extracted at each position, and each time the partial images 24 are extracted, it can be determined whether or not to perform the matching operation (S 4). Only when the content of the judgment indicates “perform”, the matching operation with the template image 22 is performed, and the result is stored.
そして、 演算用の部分画像 2 4の抽出位置(X2, Y2)が終点に到達し、 そこでの ステップ S 1〜S 5の処理が終了すると、 画像処理部 1 4は、 次の位置への移動 を行わずに (S 6が N o )、 ステップ S 8の処理に進む。 ステップ S 8では、 入 力画像 2 1の中の異なる複数の位置で実際に求められた類似度 (相互相関係数 C ) を大小比較することにより、 その値が最も大きく、 テンプレート画像 2 2と の類似性が最も高い部分画像 2 4の抽出位置(X2, Y2)を合致位置(Χ,, Υ,)と特 定する。 以上で入力画像 2 1に対するテンプレートマッチングの処理は終了とな る。 - 上記のように、 本実施形態のテンプレートマッチングでは、 演算用の部分画像 2 4を抽出する毎に、 部分画像 2 4とテンプレート画像 2 2とのマッチング演算 を行うか否かを判断し、 「行わない」 と判断した場合にはマッチング演算を省略 する。 そして、 「行う」 と判断した場合のみマッチング演算を実行する。 このた め、 確実に時間を短縮して効率よく合致位置(Χ Υ,)を特定できる。 つまり、 テ ンプレートマツチングの処理速度が飛躍的に向上する。 Then, when the extraction position (X 2 , Y 2 ) of the partial image 24 for operation reaches the end point, and the processing of steps S1 to S5 there ends, the image processing unit 14 moves to the next position. Without moving (S6 is No), the process proceeds to step S8. In step S8, the magnitude of the similarity (cross-correlation coefficient C) actually obtained at a plurality of different positions in the input image 21 is compared with each other to obtain the largest value. The extraction position (X 2 , Y 2 ) of the partial image 24 having the highest similarity is identified as the matching position (Χ, Υ,). This is the end of the template matching processing for the input image 21. -As described above, in the template matching of the present embodiment, each time a partial image 24 for calculation is extracted, it is determined whether or not to perform a matching calculation between the partial image 24 and the template image 22. If not, skip the matching operation. Then, the matching operation is performed only when it is determined to “perform”. For this reason, the matching position (Χ Υ,) can be specified efficiently with a reduced time. In other words, the processing speed of template matching is dramatically improved.
また、 本実施形態のテンプレートマッチングでは、 演算用の部分画像 2 4とテ ンプレート画像 2 2との類似性に関する概略値(つまり歪度の絶対差 I S 22— S 24 I ) に基づいて、 マッチング演算を行うか否かを判断する。 このため、 テンプレ ート画像 2 2と部分画像 2 4とが明かに相違している場合 (すなわち、 明かに類 似性が低い場合) の不要なマツチング演算を効率よく省略することができる。 条件式(1 9 )の閾値 α は、 例えば、 テンプレート画像 2 2のコントラストを 変化させた場合の各々において、 歪度 (skewnes s) の計算を行い、 得られた計算 結果のレンジ値 (=最大歪度一最小歪度) を考慮して設定することが好ましい。 JP2005/007487 In the template matching according to the present embodiment, matching is performed based on an approximate value (ie, absolute difference in skewness IS 22 —S 24 I) regarding the similarity between the partial image 24 for calculation and the template image 22. It is determined whether to perform the operation. Therefore, when the template image 22 and the partial image 24 are clearly different (that is, when the similarity is clearly low), unnecessary matching calculation can be efficiently omitted. The threshold value α of the conditional expression (19) is calculated by, for example, calculating the skewness (skewnes s) in each case where the contrast of the template image 22 is changed, and calculating the range value (= maximum value) of the obtained calculation result. It is preferable to set in consideration of (skewness-minimum skewness). JP2005 / 007487
27  27
—例として、 閾値 α ==レンジ値とすることが考えられる。 また、 閾値 α =レン ジ値 X係数 kとしてもよい。この場合の係数 kは、 1 / 2〜1の任意の値である。 ちなみに、 閾値 α の設定値が大きすぎると、 マッチング演算の省略率が減って 処理速度の向上が望めなくなる。 逆に、 閾値 の設定値が小さすぎると、 演算用 の部分画像 2 4のコントラスト変化やノイズなどの影響を受けて正確な合致位 置(Χ1 ; Υ の特定が難しくなる。 —As an example, it is conceivable to set the threshold value α == range value. Also, the threshold α may be set to the range value X coefficient k. The coefficient k in this case is an arbitrary value of 1/2 to 1. By the way, if the set value of the threshold value α is too large, the omission rate of the matching calculation decreases, and the improvement of the processing speed cannot be expected. Conversely, if the set value of the threshold value is too small, it is difficult to specify the exact matching position (Χ 1; Υ) due to the influence of the contrast change and noise of the partial image 24 for calculation.
なお、 上記した実施形態 5では、 演算用の部分画像 2 4とテンプレート画像 2 2との類似性に関する概略値として歪度の絶対差 I S 22— S 24 I を用い、マツチン グ演算を行うか否かを判断したが、 本発明はこれに限定されない。 マッチング演 算よりも短い時間で演算を行うことができ、 類似性を判断できるのであれば、 他 の演算でもよい。 In the fifth embodiment, whether or not to perform the matching operation by using the absolute difference of skewness IS 22 —S 24 I as an approximate value related to the similarity between the calculation partial image 24 and the template image 22 However, the present invention is not limited to this. Other operations may be used as long as the operation can be performed in a shorter time than the matching operation and the similarity can be determined.
その他、 次の式(2 1 )によりテンプレート画像 2 2の 3次のモーメント M22を 計算し、 同様に、 演算用の部分画像 2 4の 3次のモーメント M24を計算し、 これ らのモーメント M22,MMの絶対差 I M22— M24 I を上記の概略値として用い、 マツ チング演算を行うか否かを判断してもよい。 また、 3次に限らず、 n次 (nは 5 以上の奇数) のモーメントを用いてもよい。 奇数次のモーメントは、 既に説明し た歪度 (skewnes s) と同様、 濃度ヒストグラムの偏り方向 (左側または右側) を 示すため、 マツチング演算を行うか否かを判断する際の良好な指標となる。
Figure imgf000029_0001
… (21 )
In addition, the third moment M22 of the template image 22 is calculated by the following equation (2 1). Similarly, the third moment M24 of the partial image 24 for calculation is calculated, and these moments are calculated. M 22, M M of absolute differences IM 22 - using M 24 I as an approximate value of the above may be determined whether or not to perform pine quenching operation. Also, not limited to the third order, an nth order (n is an odd number of 5 or more) moments may be used. The odd-order moments, like the skewness (skewnes s) already described, indicate the bias direction (left or right) of the density histogram, and are good indicators for determining whether or not to perform a matching operation. .
Figure imgf000029_0001
… (twenty one )
m n 特に、 3次のモーメントを用いる場合、 歪度 (skewness) と比較して計算量が 少ないため、 マッチング演算の要不要の判断を高速に行うことができる。 そのた め、 マッチング演算を計算量の少ない方法 (例えば後述の残差逐次検定法など) により行う場合でも、 確実に処理速度の向上に対応できる。  mn In particular, when a third-order moment is used, the amount of calculation is smaller than that of skewness, so that the necessity of the matching operation can be determined at high speed. Therefore, even when the matching operation is performed by a method with a small amount of calculation (for example, a residual sequential test method described later), it is possible to reliably improve the processing speed.
さらに、 上記の概略値の他の具体例としては、 テンプレート画像 2 2の平均濃 度と部分画像 2 4の平均濃度との比較により求めた 「平均濃度の絶対差」 を用い ることもできる。 この場合には、 さらに計算量が少なく、 上記の概略値を簡単に 計算できる。 その結果、 さらなる高速化が実現する。 Further, as another specific example of the above approximate values, the “absolute difference of the average density” obtained by comparing the average density of the template image 22 with the average density of the partial image 24 is used. You can also. In this case, the calculation amount is further reduced, and the above approximate value can be easily calculated. As a result, higher speeds are realized.
また、 上記した本実施形態では、 図 1 0のステップ S 4において相互相関法に よるマッチング演算 (式(2 0 )参照) を行う例で説明したが、 本発明はこれに限 定されない。 その他、 残差逐次検定法(S S D A法)によりマッチング演算を行つ てもよいし、 濃度ヒストグラムまたは慣性モーメントなどの特徴量を用いてマツ チング演算を行ってもよい。  Further, in the above-described embodiment, an example has been described in which the matching operation (see equation (20)) is performed by the cross-correlation method in step S4 of FIG. 10, but the present invention is not limited to this. In addition, the matching operation may be performed by a residual sequential test method (SSDA method), or the matching operation may be performed using a feature amount such as a density histogram or an inertia moment.
残差逐次検定法によるマッチング演算は、 図 5 Bに示す部分画像 2 4の位置 (m, n )における濃度値 Bmと、 テンプレート画像 2 2の同じ位置 (m, n)におけ る濃度値 Amnとを用い、 次の式(2 2 )または式(2 3 )により行われる。 式(2 2 ) の Dは濃度差の絶対値和である。 式(2 3 )の Eは濃度差の二乗和である。 マッチ ング演算の結果 D, Eは、 部分画像 2 4とテンプレート画像 2 2との類似度に相 当し、 その値 (つまり残差) が小さいほど、 部分画像 2 4とテンプレート画像 2 2との類似性が高く、 抽出位置(X2, Y2)が合致位置(Xい Υ,)に近いことを表す。 残差逐次検定法によるマッチング演算は、 その計算量が少ないため、 さらなる高 速化が可能となる。 ' The matching operation by the residual sequential test method is based on the density value B m at the position (m, n) of the partial image 24 shown in FIG. 5B and the density value at the same position (m, n) of the template image 22. This is performed by the following equation (2 2) or equation (2 3) using A mn . D in equation (2 2) is the sum of absolute values of the density difference. E in equation (2 3) is the sum of squares of the concentration difference. The results D and E of the matching operation correspond to the similarity between the partial image 24 and the template image 22. The similarity is high, indicating that the extraction position (X 2 , Y 2 ) is close to the matching position (X い,). Since the matching operation by the residual sequential test method requires a small amount of calculation, it can be further speeded up. '
D = m n - B m n | … ( 22 )
Figure imgf000030_0001
濃度ヒストグラムに基づくマッチング演算では、 例えば図 9 Aに示す通り、 テ ンプレー卜画像 2 2の濃度ヒストグラム H22が予め作成され、 演算用の部分画像 2 4が抽出される毎に、その部分画像 2 4の濃度ヒストグラム HMが作成される。 濃度ヒス卜グラム HM, H22の横軸は濃度値、 縦軸は画素数である。
D = mn -B mn |… (22)
Figure imgf000030_0001
In the matching calculation based on the density histogram, for example, as shown in FIG. 9A, a density histogram H22 of the template image 22 is created in advance, and each time a partial image 24 for calculation is extracted, the partial image 2 A density histogram H M of 4 is created. The horizontal axis of the density histograms H M and H 22 is the density value, and the vertical axis is the number of pixels.
そして、 2つの濃度ヒストグラム H24,H22の重なり部分 (図 9 Bの斜線部分) の画素数を集計することで、 マッチング演算が行われる。 この場合のマッチング 演算の結果 (集計値 F ) は、 部分画像 2 4とテンプレート画像 2 2との類似度に 相当し、 その値が大きいほど、 部分画像 2 4とテンプレート画像 2 2との類似性 が高く、 抽出位置(X2, Y2)が合致位置( , Υ に近いことを表す。 Then, the matching calculation is performed by counting the number of pixels in the overlapping portion of the two density histograms H 24 and H 22 (the hatched portion in FIG. 9B). In this case, the result of the matching operation (total value F) is the similarity between the partial image 24 and the template image 22. Correspondingly, the larger the value, the higher the similarity between the partial image 24 and the template image 22, indicating that the extraction position (X 2 , Y 2 ) is closer to the matching position (, Υ).
さらに、 濃度ヒストグラムに基づくマッチング演算は、 例えば図 9 Αに示す 2 つの濃度ヒストグラム Η24, Η22の差分の絶対値 (図 9 Cの斜線部分) の画素数を 集計することにより行ってもよい。この場合のマッチング演算の結果(集計値 G) は、 部分画像 2 4とテンプレート画像 2 2との類似度に相当し、 その値が小さい ほど、 部分画像 2 4とテンプレート画像 2 2との類似性が高く、 抽出位置(Χ2, Ύ2)が合致位置(Χ,, Υ に近いことを表す。 Further, the matching calculation based on the density histogram may be performed by, for example, summing up the number of pixels of the absolute value of the difference between the two density histograms Η 24 and Η 22 shown in FIG. 9 (the hatched portion in FIG. 9C). . The result of the matching operation (total value G) in this case corresponds to the similarity between the partial image 24 and the template image 22. The smaller the value, the more similar the partial image 24 and the template image 22 are. Is high and the extraction position (Χ 2 , Ύ 2 ) is close to the matching position (Χ, Χ).
(第 6実施形態)  (Sixth embodiment)
本発明の第 6実施形態は、 第 1〜4実施形態と第 5実施形態とを併せたもので ある。 第 6実施形態のテンプレートマッチング装置は、 第 5実施形態に開示され たマッチング演算のカツト制御と、 第 1〜4実施形態に開示するテンプレートマ ッチング処理のステップ制御とを組合せたものである。  The sixth embodiment of the present invention is a combination of the first to fourth embodiments and the fifth embodiment. The template matching apparatus of the sixth embodiment combines the cut control of the matching operation disclosed in the fifth embodiment with the step control of the template matching process disclosed in the first to fourth embodiments.
具体的には、 第 6実施形態のテンプレートマッチング処理は、 図 1 0のステツ プ S 1からステップ S 8までの処理 (マッチング演算カット制御) を行うが、 そ の際に図 1 0のステップ S 7の 「演算用の部分画像の抽出位置の移動処理」 は、 図 4のステップ S I 1からステップ S 1 5の処理 (ステップ制御) を実行する。 これにより、 両実施形態の効果が相乗され、 飛躍的にテンプレートマッチング 処理の高速化が達成される。  More specifically, the template matching processing of the sixth embodiment performs the processing from step S1 to step S8 in FIG. 10 (matching calculation cut control). At that time, the step S1 in FIG. The “movement processing of the extraction position of the partial image for calculation” of 7 executes the processing (step control) from step SI1 to step S15 in FIG. As a result, the effects of both embodiments are synergistically achieved, and the speed of the template matching process is dramatically increased.
また、 上記した実施形態 1〜6では、 演算用の部分画像 2 4とテンプレート画 像 2 2の形状が矩形状である例を説明したが、 本発明はこれに限定されない。 部 分画像 2 4とテンプレート画像 2 2は、 その形状と大きさ(画素数)が同一であれ ば、 矩形状である必要はない。 他の形状でも本質的な処理は同じである。  Further, in the above-described first to sixth embodiments, an example has been described in which the shapes of the calculation partial image 24 and the template image 22 are rectangular, but the present invention is not limited to this. The partial image 24 and the template image 22 need not be rectangular as long as they have the same shape and size (number of pixels). The essential processing is the same for other shapes.
さらに、 上記した実施形態 1〜 6では、 図 1の観察装置 1 0のような光学顕微 鏡装置を例にテンプレートマッチングの説明を行ったが、 本発明はこれに限定さ れない。 その他、 試料の局所領域を電子線で走査して画像を取り込む電子顕微鏡 5 007487 Furthermore, in Embodiments 1 to 6 described above, template matching has been described using an optical microscope apparatus as the observation apparatus 10 in FIG. 1 as an example, but the present invention is not limited to this. In addition, an electron microscope that scans a local area of the sample with an electron beam and captures images 5 007487
30 装置にも、 本発明を適用できる。 試料の局所領域の画像に限らず、 試料の全面の 画像を一括で取り込む装置にも、 本発明を適用できる。 観察装置 1 0などに接続 された外部のコンピュータを用いた場合でも、 同様の効果を得ることができる。 また、 上記した実施形態 1〜6では、 図 1の観察装置 1 0のカメラ 1 3から取 り込んだ入力画像 (画像情報を含む入力画像信号) に対してテンプレートマッチ ングを行う例について説明したが、 本発明はこれに限定されない。 その他、 音声 情報を含む入力画像信号 (入力音声) に対してテンプレートマッチングを行う場 合 (信号処理) にも、 本発明を適用できる。 入力音声のような一次元の入力画像 信号を対象とする場合、 上述の 「画像の濃度」 を 「信号の強度」 に置き換えて考 えればよい。 「平均濃度」 は 「強度の平均値」 に対応する。  The present invention can be applied to 30 devices. The present invention can be applied not only to the image of the local region of the sample but also to an apparatus which collectively captures the image of the entire surface of the sample. Similar effects can be obtained even when an external computer connected to the observation device 10 or the like is used. In the above-described first to sixth embodiments, examples have been described in which template matching is performed on an input image (input image signal including image information) captured from the camera 13 of the observation device 10 in FIG. However, the present invention is not limited to this. In addition, the present invention can be applied to a case where template matching is performed on an input image signal (input audio) including audio information (signal processing). When a one-dimensional input image signal such as input sound is targeted, the above-mentioned “image density” may be replaced with “signal strength”. “Average concentration” corresponds to “average intensity”.

Claims

請 求 の 範 囲 The scope of the claims
1. 入力画像信号の中から、 順次抽出位置を変えて演算用の部分画像信号を抽出 する抽出手段と、 1. extracting means for sequentially changing the extraction position from the input image signal to extract a partial image signal for calculation;
5 前記抽出手段により前記部分画像信号が抽出される毎に、 該部分画像信号と既 知のテンプレート信号との類似性に関する指標を求める演算手段と、  5 calculating means for calculating an index regarding similarity between the partial image signal and a known template signal each time the partial image signal is extracted by the extracting means;
前記入力画像信号の複数の位置での前記類似性に関する指標に基づいて、 前記 入力画像信号の中の前記テンプレート信号との合致位置を特定する特定手段と を備え、  Identifying means for identifying a matching position with the template signal in the input image signal, based on an index regarding the similarity at a plurality of positions of the input image signal.
前記抽出手段は、 前記演算手段が求めた現在の抽出位置における前記類似性に 関する指標を考慮して、 前記現在の抽出位置から次の抽出位置への移動量を決定 する  The extraction means determines a movement amount from the current extraction position to a next extraction position in consideration of the similarity index at the current extraction position obtained by the calculation means.
' ことを特徴とするテンプレートマッチング装置。  'A template matching device characterized in that:
2 . 入力画像信号の中から、 順次抽出位置を変えて演算用の部分画像信号を抽 出する抽出手段と、 2. Extraction means for extracting a partial image signal for calculation by sequentially changing the extraction position from the input image signal;
前記抽出手段により前記部分画像信号が抽出される毎に、 該部分画像信号と既 知のテンプレート信号との類似性に関する指標を求める演算手段と、  Calculating means for obtaining an index relating to the similarity between the partial image signal and a known template signal each time the partial image signal is extracted by the extracting means;
前記入力画像信号の複数の位置での前記類似性に関する指標に基づいて、 前記 入力画像信号の中の前記テンプレート信号との合致位置を特定する特定手段と、 前記複数の位置での前記類似性に関する指標を記憶する記憶手段とを備え、 前記抽出手段は、 前記記憶手段に記憶された、 前記演算手段が現在までに求め た前記類似性に関する指標のうちの少なくとも 1つを考慮して、 次の抽出位置へ の移動量を決定することを特徴とするテンプレートマッチング装置。  Specifying means for specifying a matching position of the input image signal with the template signal based on the index regarding the similarity at a plurality of positions; Storage means for storing an index, wherein the extraction means considers at least one of the indices relating to the similarity, which is stored in the storage means, and which has been obtained by the arithmetic means up to now. A template matching device for determining a moving amount to an extraction position.
3 . 請求項 2に記載のテンプレートマッチング装置において、 前記抽出手段は、 少なくとも前記現在の位置での前記類似性に関する指標を考 慮すると共に、 前記テンプレート信号の大きさを考慮して、 前記現在の抽出位置 から前記次の抽出位置への移動量を決定することを特徴とするテンプレートマ ツチング装置。 3. The template matching apparatus according to claim 2, The extraction means considers at least an index regarding the similarity at the current position, and considers the magnitude of the template signal, and calculates a movement amount from the current extraction position to the next extraction position. A template matching device characterized in that it is determined.
4 . 請求項 1または請求項 2に記載のテンプレートマッチング装置において、 前記抽出手段は、 前記現在の位置での前記類似性に関する指標が 「前記抽出位 置は前記合致位置の近傍に到達した」 ことを示す場合で、 且つ、 前記現在の位置 より 1つ前の位置での前記類似性に関する指標が「前記抽出位置は前記合致位置 から離れている」 ことを示す場合に、 前記次の抽出位置を前記現在の抽出位置と 前記 1つ前の抽出位置との間に決定する 4. The template matching apparatus according to claim 1 or 2, wherein the extraction unit determines that the index regarding the similarity at the current position is “the extraction position has reached the vicinity of the matching position”. , And when the index regarding the similarity at the position immediately before the current position indicates that “the extracted position is distant from the matching position”, the next extracted position is Determine between the current extraction position and the previous extraction position
ことを特徴とするテンプレートマッチング装置。  A template matching apparatus characterized in that:
5 . 請求項 1または請求項 2に記載のテンプレートマッチング装置において、 前記入力画像信号と前記部分画像信号と前記テンプレート信号は、 各々、 画像 情報を含み、 5. The template matching apparatus according to claim 1 or 2, wherein the input image signal, the partial image signal, and the template signal each include image information,
前記抽出手段は、 前記抽出位置を複数の走査線からなるラスタ走査の方向に沿 つて移動させながら前記部分画像信号を順に抽出すると共に、 前記抽出位置を現 在の走査線から次の走査線へ移動させる際、 前記現在の走査線上の各位置での前 記類似性に関する指標を考慮して、 前記現在の走査線から前記次の走査線への移 動量を計算し、 該移動量に基づいて前記抽出位置を移動させることを特徴とする テンプレ一トマッチング装置。  The extracting means sequentially extracts the partial image signals while moving the extraction position along a raster scanning direction including a plurality of scanning lines, and also shifts the extraction position from a current scanning line to a next scanning line. At the time of moving, the movement amount from the current scanning line to the next scanning line is calculated in consideration of the similarity index at each position on the current scanning line, and based on the moving amount. A template matching device, wherein the extraction position is moved.
6 . 請求項 3に記載のテンプレートマッチング装置において、 6. The template matching apparatus according to claim 3,
前記入力画像信号と前記部分画像信号と前記テンプレート信号は、 各々、 画像 情報を含み、 前記抽出手段は、 前記抽出位置を複数の走査線からなるラスタ走査の方向に沿 つて移動させながら前記部分画像信号を順に抽出すると共に、 前記抽出位置を現 在の走査線から次の走査線へ移動させる際、 前記現在の走査線土の各位置での前 記類似性に関する指標を考慮して、 前記現在の走査線から前記次の走査線への移 動量を計算し、 該移動量に基づいて前記抽出位置を移動させることを特徴とする テンプレートマッチ—ング装置。 The input image signal, the partial image signal, and the template signal each include image information, The extracting means sequentially extracts the partial image signals while moving the extraction position along a raster scanning direction including a plurality of scanning lines, and also shifts the extraction position from a current scanning line to a next scanning line. At the time of moving, the moving amount from the current scanning line to the next scanning line is calculated in consideration of the similarity index at each position of the current scanning line soil, and based on the moving amount. A template matching apparatus, wherein the extraction position is moved.
7 . 請求項 4に記載のテンプレートマッチング装置において、 7. The template matching apparatus according to claim 4,
前記入力画像信号と前記部分画像信号と前記テンプレート信号は、 各々、 画像 情報を含み、 .  The input image signal, the partial image signal, and the template signal each include image information.
前記抽出手段は、 前記抽出位置を複数の走査線からなるラスタ走査の方向に沿 つて移動させながら前記部分画像信号を順に抽出すると共に、 前記抽出位置を現 在の走査線から次の走査線へ移動させる際、 前記現在の走査線上の各位置での前 記類似性に関する指標を考慮して、 前記現在の走査線から前記次の走査線への移 動量を計算し、 該移動量に基づいて前記抽出位置を移動させることを特徴とする テンプレートマッチング装置。  The extracting means sequentially extracts the partial image signals while moving the extraction position along a raster scanning direction including a plurality of scanning lines, and also shifts the extraction position from a current scanning line to a next scanning line. At the time of moving, the amount of movement from the current scanning line to the next scanning line is calculated in consideration of the similarity index at each position on the current scanning line, and based on the moving amount A template matching apparatus, wherein the extraction position is moved.
8 . 入力画像信号の中の異なる複数の位置から演算用の部分画像信号を順に抽 出する抽出手段と、 8. Extraction means for sequentially extracting partial image signals for calculation from a plurality of different positions in the input image signal,
前記抽出手段により抽出された前記部分画像信号と既知のテンプレート信号 との類似度の演算を行う第 1の演算手段と、  First calculating means for calculating the similarity between the partial image signal extracted by the extracting means and a known template signal;
前記第 1の演算手段が求めた前記類似度を大小比較することにより、 前記入力 画像信号の中の.前記テンプレート信号との合致位置を特定する特定手段と、 前記抽出手段により抽出される複数の前記部分画像信号ごとに、 該部分画像信 号と既知のテンプレート信号との類似性を判断するために、 前記第 1の演算手段 が行う演算よりも演算速度が速い簡易マツチング演算を行う第 2の演算手段と、 前記第 2の演算手段による演算結果に基づいて、 前記第 1の演算手段で前記部 分画像信号と既知のテンプレート信号との類似度の演算を行うか否かを判斬す る判断手段とを備えた ことを特徴とするテンプレートマッチング装置。 By comparing the similarities obtained by the first calculating means, the specifying means for specifying a matching position with the template signal in the input image signal; In order to determine the similarity between the partial image signal and a known template signal for each of the partial image signals, a second matching operation that performs a simple matching operation at a higher operation speed than the operation performed by the first arithmetic unit is performed. Arithmetic means; Determining means for determining whether or not to calculate the similarity between the partial image signal and a known template signal by the first calculating means based on a calculation result by the second calculating means. A template matching device, comprising:
9 . 請求項 8に記載のテンプレートマッチング装置において、 - 前記第 2の演算手段は、 前記抽出手段により前記部分画像信号が抽出される毎. に、 該部分画像信号と既知のテンプレート信号との類似性に関する指標を求める ことを特徴とするテンプレートマッチング装置。 9. The template matching apparatus according to claim 8, wherein:-each time the second image processing unit extracts the partial image signal by the extracting unit, a similarity between the partial image signal and a known template signal is generated. A template matching device for determining an index regarding gender.
1 0 . 請求項 8に記載のテンプレートマッチング装置において、 10. The template matching apparatus according to claim 8,
前記第 2の演算手段は、 前記部分画像信号の歪度と前記テンプレート信号の歪 度との比較により類似性に関する値を求め、  The second calculation means obtains a value related to similarity by comparing the skewness of the partial image signal and the skewness of the template signal,
前記判断手段は、 前記類似性に関する値に基づいて、 前記第 1の演算手段での 演算を行うか否かを判断する  The determining means determines whether or not to perform the calculation in the first calculating means based on the value regarding the similarity.
ことを特徴とするテンプレートマッチング装置。  A template matching apparatus characterized in that:
1 1 . 請求項 8に記載のテンプレートマッチング装置において、 11. The template matching apparatus according to claim 8,
前記第 2の演算手段は、 前記部分画像信号の強度の平均値と前記テンプレート 信号の強度の平均値との比較により類似性に関する値を求め、 ' 前記判断手段は、 前記類似性に関する値に基づいて、 前記第 1の演算手段での 演算を行うか否かを判断する  The second calculating means obtains a value related to similarity by comparing the average value of the intensity of the partial image signal and the average value of the intensity of the template signal, and the determination means determines the value based on the value related to the similarity. To determine whether or not to perform the calculation by the first calculating means.
ことを特徴とするテンプレートマッチング装置。  A template matching apparatus characterized in that:
1 2 . 入力画像信号の中から、 順次抽出位置を変えて演算用の部分画像信号を 抽出する抽出手段と、 1 2. Extraction means for sequentially changing the extraction position from the input image signal to extract a partial image signal for operation,
前記抽出手段により抽出された前記部分画像信号と既知のテンプレート信号 との類似度の演算を行う第 1の演算手段と、 The partial image signal extracted by the extraction unit and a known template signal First calculating means for calculating the degree of similarity with
前記第 1の演算手段が求めた前記類似度を大小比較することにより、 前記入力 画像信号の中の前記テンプレート信号との合致位置を特定する特定手段と、 前記抽出手段により前記部分画像信号が抽出される毎に、 該部分画像信号と既 知のテンプレート信号との類似性に関する指標を求める第 2の演算手段と、 前記第 2の演算手段が求めた現在の抽出位置における前記類似性に関する指 標を考慮して、 前記現在の抽出位置から次の抽出位置への前記抽出手段における 移動量を決定する移動量決定手段と、  Specifying means for specifying a matching position of the input image signal with the template signal by comparing the degree of similarity obtained by the first calculating means; and extracting the partial image signal by the extracting means Each time the partial image signal and a known template signal are indexed, a second calculating means for obtaining an index regarding the similarity between the partial image signal and the known template signal; In consideration of the movement amount determination means for determining the movement amount in the extraction means from the current extraction position to the next extraction position,
前記第 2の演算手段による演算結果に基づいて、 前記第 1の演算手段で前記部 分画像信号と既知のテンプレート信号との類似度の演算を行うか否かを判断す る判断手段とを備えた ことを特徴とするテンプレートマッチング装置。 -  Determining means for determining whether or not to perform a similarity calculation between the partial image signal and a known template signal by the first calculating means based on a calculation result by the second calculating means. A template matching apparatus characterized in that: -
PCT/JP2005/007487 2004-04-13 2005-04-13 Template matching device WO2005101313A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006512405A JP4208011B2 (en) 2004-04-13 2005-04-13 Template matching device

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2004117980 2004-04-13
JP2004-117979 2004-04-13
JP2004117979 2004-04-13
JP2004-117980 2004-04-13

Publications (1)

Publication Number Publication Date
WO2005101313A1 true WO2005101313A1 (en) 2005-10-27

Family

ID=35150202

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2005/007487 WO2005101313A1 (en) 2004-04-13 2005-04-13 Template matching device

Country Status (2)

Country Link
JP (1) JP4208011B2 (en)
WO (1) WO2005101313A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007285781A (en) * 2006-04-14 2007-11-01 Tohoku Univ Ground penetrating radar system and image signal processing method
WO2008111290A1 (en) * 2007-03-13 2008-09-18 Nikon Corporation Template matching device, camera with template matching device, and program for allowing computer to carry out template matching
JP2009123266A (en) * 2007-11-13 2009-06-04 Sony Disc & Digital Solutions Inc Evaluation device, method for evaluating, program
JP2009294668A (en) * 2009-08-31 2009-12-17 Nippon Telegr & Teleph Corp <Ntt> Signal detection device, signal detection method, signal detection program and recording medium
JP2010140315A (en) * 2008-12-12 2010-06-24 Secom Co Ltd Object detection device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6431741A (en) * 1987-07-29 1989-02-02 Tsumura & Co Novel lignan, diuretic and cardiac comprising said lignan as active ingredient
JPH0922406A (en) * 1995-05-02 1997-01-21 Yamatake Honeywell Co Ltd Pattern collation device
JPH11110559A (en) * 1997-10-03 1999-04-23 Nec Corp Method for detecting object and removing background, and record medium recorded with program
JPH11298923A (en) * 1998-02-27 1999-10-29 Tektronix Inc Image alignment detection method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6431741A (en) * 1987-07-29 1989-02-02 Tsumura & Co Novel lignan, diuretic and cardiac comprising said lignan as active ingredient
JPH0922406A (en) * 1995-05-02 1997-01-21 Yamatake Honeywell Co Ltd Pattern collation device
JPH11110559A (en) * 1997-10-03 1999-04-23 Nec Corp Method for detecting object and removing background, and record medium recorded with program
JPH11298923A (en) * 1998-02-27 1999-10-29 Tektronix Inc Image alignment detection method

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007285781A (en) * 2006-04-14 2007-11-01 Tohoku Univ Ground penetrating radar system and image signal processing method
JP4644816B2 (en) * 2006-04-14 2011-03-09 国立大学法人東北大学 Ground penetrating radar apparatus and image signal processing method
WO2008111290A1 (en) * 2007-03-13 2008-09-18 Nikon Corporation Template matching device, camera with template matching device, and program for allowing computer to carry out template matching
US8260058B2 (en) 2007-03-13 2012-09-04 Nikon Corporation Template matching device, camera with template matching device, and program for allowing computer to carry out template matching
JP5099120B2 (en) * 2007-03-13 2012-12-12 株式会社ニコン Template matching device, camera equipped with template matching device, computer matching program for computer
JP2009123266A (en) * 2007-11-13 2009-06-04 Sony Disc & Digital Solutions Inc Evaluation device, method for evaluating, program
US8121008B2 (en) 2007-11-13 2012-02-21 Sony Disc & Digital Solutions Inc. Evaluation apparatus, evaluation method, and program
JP2010140315A (en) * 2008-12-12 2010-06-24 Secom Co Ltd Object detection device
JP2009294668A (en) * 2009-08-31 2009-12-17 Nippon Telegr & Teleph Corp <Ntt> Signal detection device, signal detection method, signal detection program and recording medium

Also Published As

Publication number Publication date
JP4208011B2 (en) 2009-01-14
JPWO2005101313A1 (en) 2008-03-06

Similar Documents

Publication Publication Date Title
JP5075757B2 (en) Image processing apparatus, image processing program, image processing method, and electronic apparatus
WO2014017337A1 (en) Matching process device, matching process method, and inspection device employing same
TWI492165B (en) Pattern matching method and device
US20060029276A1 (en) Object image detecting apparatus, face image detecting program and face image detecting method
KR101524421B1 (en) Defect observation method and defect observation device
US8188429B2 (en) Scanning electron microscope for determining quality of a semiconductor pattern
WO2005101313A1 (en) Template matching device
CN103198468B (en) Image processing apparatus, image processing method and image processing system
JP5651428B2 (en) Pattern measuring method, pattern measuring apparatus, and program using the same
TW510966B (en) Straight line defect detection
WO2017043258A1 (en) Calculating device and calculating device control method
CN111340693B (en) Interpolation method and device of Bayer image and electronic equipment
JP2015169978A (en) Image processor and image processing program
CN111095351A (en) Charged particle microscope device and wide-angle image generation method
JP5099120B2 (en) Template matching device, camera equipped with template matching device, computer matching program for computer
US8971627B2 (en) Template matching processing device and template matching processing program
JP2005293334A (en) Template matching device
JP2005354201A (en) Apparatus and method for image processing
JP5316309B2 (en) Image processing apparatus and image processing method
JP2013250104A (en) Dimension measuring instrument and computer program
CN103067643B (en) Image processing apparatus, image processing method, and image processing system
JP2001314374A (en) Corneal endothelial cell measuring apparatus
JP2011171991A (en) Image processing apparatus, electronic device, image processing method and image processing program
JP2007163417A (en) Image position measuring method and image position measuring instrument
JP5547942B2 (en) Defect observation method and apparatus

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KM KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SM SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2006512405

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

WWW Wipo information: withdrawn in national office

Country of ref document: DE

122 Ep: pct application non-entry in european phase