Method for extracting artificial landmark features from remote sensing images
By projecting the earth coordinates of the target center point in the aerospace remote sensing image, combining binarization and connectivity domain analysis, the problem of target recognition difficulty in aerospace remote sensing image is solved, and automated subpixel-level target center extraction is realized, which improves the Geometric calibration and accuracy inspection efficiency.
Patent Information
- Application Number
- CN202210321003.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-29
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-03-29
AI Technical Summary
The prior art methods for automatically identifying artificial marking targets in aerospace remote sensing images are difficult, especially in the case of complex backgrounds, dispersed target distribution and diverse shapes, manual assistance is often required, resulting in large workloads and low efficiency.
By projecting the earth coordinates of the target center point onto the remote sensing image, intercepting the region of interest, performing binarization and connection domain analysis, calculating the pixel center coordinates of the connection domain as the initial value of the target center, and using sub-pixel-level processing methods to accurately Position the target center.
It realizes automatic extraction of the central coordinates of the subpixel-level cross-pindle target, reduces manual intervention, and improves the geometric calibration and accuracy inspection efficiency of aerospace remote sensing images.
Smart Images

Figure CN114663459B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of digital image processing, and in particular to a method for extracting artificial marker features of remote sensing images. Background Art
[0002] High-precision remote sensing image geometric calibration and verification is not only to achieve remote sensing target identification and precise positioning, but also an important prerequisite for conducting on-orbit remote sensing radiation calibration and radiation performance testing, thereby conducting quantitative remote sensing image product production and business applications. The core of geometric calibration and verification is to select a certain number of control points with significant features on the image, and complete it by comparing their image point coordinates with the measured geodetic coordinates. Due to the small number of natural land features that meet the requirements, the method of laying artificial marker targets is also widely used in the practice of geometric positioning of meter-level or decimeter-level remote sensing data. Existing studies have shown that the black and white cross diagonal-shaped markers have the most obvious structural features in the image, and the position of the target center image point is determined with the highest accuracy, and is currently the most widely used.
[0003] Most existing methods for extracting cross targets from aerospace remote sensing images at the sub-pixel level manually select the initial position of the target on the image and then automatically extract the center of the mark. However, this method requires manual selection of the initial value of the target center point position. When the number of targets on the image is large or multiple images need to be processed in batches, manual interaction will undoubtedly bring a large workload.
[0004] At present, most of the research on automatic identification of artificial targets from images is concentrated in the field of close-range photography. The designed target group is drawn on the target board for shooting, and the target center is extracted from the image. In these methods, the targets are concentrated on the target board with a fixed shape, with a large foreground range and a relatively simple background. In contrast, the cross targets on aerospace remote sensing images have the characteristics of small pixel ratio, complex background, and scattered distribution on the image. When shooting the image, there may be different shooting directions, and different shapes and sizes of different artificial marks, which greatly increase the difficulty of target identification. This is also an important reason why current conventional methods still require manual assistance. Summary of the invention
[0005] In view of this, the present invention provides a method for extracting artificial marker features from remote sensing images, comprising: projecting the geodetic coordinates of the center points of each target onto the remote sensing image to obtain the image point coordinates of the center points of each target on the remote sensing image; intercepting the image of the region of interest with the image point coordinates corresponding to the target within the range of the remote sensing image as the center; binarizing the image of the region of interest to distinguish the white block of the target from other areas; performing connected domain analysis on the binarized image of the region of interest to obtain the connected domain of the image of the region of interest; counting the number of pixels in the connected domain, and determining the effective connected domain according to the number of pixels; calculating the central coordinates of the pixels in the effective connected domain as the initial value of the central coordinate of the target; and calculating the sub-pixel coordinates of the target based on the initial value of the central coordinate of the target.
[0006] According to an embodiment of the present invention, the remote sensing image includes a geometrically coarsely corrected image for calibration or a geometrically finely corrected image for accuracy verification.
[0007] According to an embodiment of the present invention, projecting the geodetic coordinates of each target center point onto a remote sensing image to obtain the image point coordinates of each target center point on the remote sensing image includes: projecting the geodetic coordinates of each target center point onto a geometrically precisely corrected image to obtain the image point coordinates of each target center point on the geometrically precisely corrected image.
[0008] According to an embodiment of the present invention, projecting the geodetic coordinates of the center point of each target onto the remote sensing image to obtain the image point coordinates of the center point of each target on the remote sensing image includes: aligning the geometrically coarsely corrected image with the reference orthophoto to establish an affine transformation relationship between the geometrically coarsely corrected image and the orthophoto; projecting the geodetic coordinates of the center point of each target onto the geometrically coarsely corrected image to obtain the initial image point coordinates of the center point of each target on the geometrically coarsely corrected image; and transforming the initial image point coordinates using the affine transformation relationship to obtain the image point coordinates.
[0009] According to an embodiment of the present invention, projecting the geodetic coordinates of each target center point onto a remote sensing image to obtain the image point coordinates of each target center point on the remote sensing image includes: registering the geometrically coarsely corrected image with a reference orthophoto to establish an affine transformation relationship between the geometrically coarsely corrected image and the orthophoto; performing geometric correction on the geometrically coarsely corrected image using the affine transformation relationship; projecting the geodetic coordinates of each target center point onto the geometrically corrected image, and then calculating the target center image point coordinates on the geometrically coarsely corrected image based on the affine transformation relationship.
[0010] According to an embodiment of the present invention, the geodetic coordinates of each target center point are projected onto a remote sensing image to obtain the image point coordinates of each target center point on the remote sensing image, including: based on the image category, based on rational polynomial parameters or image header files, the geodetic coordinates of each target center point are projected onto the remote sensing image.
[0011] According to an embodiment of the present invention, taking the image point coordinates corresponding to the target within the image range as the center, intercepting the image of the area of interest includes: determining whether the image point coordinates are within the remote sensing image, and for the image point coordinates within the remote sensing image range, intercepting the image of the area of interest based on the geometric positioning accuracy of the remote sensing image and the size of the target.
[0012] According to an embodiment of the present invention, binarizing the image of the region of interest includes: binarizing the image of the region of interest using a method such as Otsu's method, a bimodal method, or an iterative method.
[0013] According to an embodiment of the present invention, performing a connected domain analysis on the binarized image of the region of interest to obtain the connected domain of the image of the region of interest includes: inverting the color of the binarized image of the region of interest; and analyzing the four-connected domain of the inverted image of the region of interest to obtain the connected domain of the image of the region of interest.
[0014] According to an embodiment of the present invention, counting the number of pixels in a connected domain and determining a valid connected domain based on the number of pixels includes: calculating the size of a black block area in the middle of a target on a remote sensing image to obtain a pixel threshold; counting the number of pixels in a connected domain; and determining that a connected domain whose number of pixels is less than the pixel threshold is a valid connected domain.
[0015] According to an embodiment of the present invention, calculating the center coordinates of pixels in a valid connected domain as the initial value of the center coordinates of the target includes:
[0016]
[0017] Calculate the initial value of the target center coordinates, where (x center ,y center ) is the initial value of the center coordinate, (x i ,y i ) is the pixel coordinates of each pixel in the effective connected domain, and m is the number of pixels in the effective connected domain.
[0018] According to an embodiment of the present invention, calculating the sub-pixel coordinates of the target based on the initial value of the center coordinate of the target includes: using a function curve fitting method, a difference method based on black and white alternation, a knife edge fitting method, a template matching method, or a gradient method to calculate the sub-pixel coordinates of the target based on the initial value of the center coordinate of the target.
[0019] The method for extracting artificial marker features of remote sensing images provided by the present invention can solve the problem of manually giving initial values in the existing methods, meet the demand for automatically extracting the target center, and can solve the problem of diversity of target shapes and automatically extract the sub-pixel level cross-vertex angle target center coordinates. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0021] Figure 1 The flowchart of the method for extracting artificial marker features of remote sensing images according to an embodiment of the present invention is schematically shown.
[0022] Figure 2 The figure schematically shows the result of distinguishing the white block from other areas according to an embodiment of the present invention.
[0023] Figure 3 The result diagram after connected domain analysis according to an embodiment of the present invention is schematically shown. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0026] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or can communicate with each other; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0027] In the description of the present invention, it should be understood that the terms "longitudinal", "length", "circumferential", "front", "rear", "left", "right", "top", "bottom", "inside", "outside", etc., indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the subsystem or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0028] Throughout the drawings, the same elements are represented by the same or similar reference numerals. Conventional structures or configurations will be omitted when they may cause confusion in the understanding of the present invention. The shapes, sizes, and positional relationships of the components in the drawings do not reflect the actual size, proportion, and actual positional relationship. In addition, in the present invention, any reference symbol between brackets should not be constructed as a limitation to the present invention.
[0029] Similarly, in order to simplify the present invention and help understand one or more of the various disclosed aspects, in the above description of exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. The description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0030] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0031] In order to overcome the shortcomings of the prior art solutions, the present invention provides a method for extracting remote sensing image targets, which is characterized by high automation and precision, and can improve the efficiency of geometric calibration or geometric precision inspection of aviation / aerospace remote sensing images. The automatic high-precision extraction method for remote sensing image targets is introduced below in conjunction with the accompanying drawings.
[0032] Figure 1 The flowchart of the method for extracting artificial marker features of remote sensing images according to an embodiment of the present invention is schematically shown.
[0033] like Figure 1 As shown, the method for extracting artificial marker features of remote sensing images may include, for example, operations S101 to S106.
[0034] In operation S101, the geodetic coordinates of the center points of each target are projected onto the remote sensing image to obtain the image point coordinates of the center points of each target on the remote sensing image.
[0035] In an embodiment of the present invention, the target may include a black and white cross diagonal mark target. The remote sensing image used to extract the target center may include a rough geometric correction image for calibration or a fine geometric correction image for accuracy verification. The main difference between these two types of images is the different geometric positioning accuracy. For a fine geometric correction image with higher positioning accuracy, it is sufficient to directly project the image point coordinates of the center point of each target on the fine geometric correction image; for an image with poor geometric positioning accuracy, directly projecting the target geodetic coordinates onto the remote sensing image will result in a large error with the target position on the image. At this time, the following measures can be taken.
[0036] A projection method for roughly geometrically correcting an image provided by an embodiment of the present invention may be:
[0037] Firstly, the rough geometric correction image is registered with the reference orthophoto to establish the affine transformation relationship between the rough geometric correction image and the reference orthophoto.
[0038] Using the same-name points obtained by image registration, an affine transformation relationship between the rough geometric correction image to be processed and the reference orthophoto image is established, for example, it can be:
[0039]
[0040] Among them, (x, y) is the coordinate of the image to be processed, (x', y') is the coordinate of the reference orthophoto image, and a i , b i , c i (i=1, 2) is the affine transformation parameter.
[0041] Then, the geodetic coordinates of the center points of each target corresponding to the rough geometric correction image are projected onto the rough geometric correction image to obtain the initial image point coordinates of the center points of each target on the rough geometric correction image.
[0042] Finally, the initial image point coordinates are transformed using the affine transformation relationship to obtain the image point coordinates (x, y).
[0043] Another projection method for roughly geometrically correcting an image provided by an embodiment of the present invention may be:
[0044] First, the rough geometric correction image is registered with the orthophoto image to establish an affine transformation relationship between the reference orthophoto image and the rough geometric correction image. The affine transformation relationship is as described above and will not be repeated here.
[0045] Then, the geometrically roughly corrected image is geometrically corrected using the affine transformation relationship.
[0046] Finally, the geodetic coordinates of the center points of each target are projected onto the geometrically corrected image, and then the coordinates (x, y) of the center image point of the target on the geometrically roughly corrected image are calculated based on the affine transformation relationship.
[0047] Both of the above two projection methods can obtain relatively accurate target center image point coordinates corresponding to the rough geometric correction image. The specific selection is made according to the actual application, and the present invention does not impose any limitation.
[0048] In the embodiment of the present invention, the geodetic coordinates of the center point of each target can be projected onto the remote sensing image based on the geometric imaging model of the image according to the image category. For remote sensing images with attached rpb parameter files, the rational polynomial model is used for projection; for remote sensing images after geometric correction, the image vertex coordinates and image resolution recorded in the image header file are used for projection.
[0049] In operation S102, an image of a region of interest is captured with the coordinates of an image point corresponding to a target within the range of the remote sensing image as the center.
[0050] In the embodiment of the present invention, for the target center image point coordinates obtained in operation S101, it is determined point by point whether they are located within the remote sensing image range. For each target located within the remote sensing image range, the image of the region of interest is intercepted according to the geometric positioning accuracy of the remote sensing image and the size of the target. That is, the image of the region of interest is intercepted with the aforementioned image point coordinates (x, y) as the center, and the size of the image of the region of interest depends on the geometric positioning accuracy of the image and the size of the target, but should be as small as possible within the accuracy range.
[0051] In operation S103, the image of the region of interest is binarized to distinguish the white block of the target.
[0052] In the embodiment of the present invention, the image of the region of interest can be binarized using the Otsu method, the bimodal method, the iterative method, or other methods. The binarization method is selected based on the actual application, and the present invention does not limit it.
[0053] Figure 2 The diagram schematically shows the result of distinguishing the white color block from other areas (background and black color block on the target) according to an embodiment of the present invention.
[0054] The white color on the target has a clear contrast with the background in the image. Through binarization, the white blocks in the target can be distinguished from the background and the black blocks on the target. Figure 2 As shown, only two colors are shown in the figure, a white block displays one color correspondingly, and a background and a black block display one color correspondingly, wherein W represents a white block, and O represents a background and a black block.
[0055] In operation S104, a connected domain analysis is performed on the binarized ROI image to obtain a connected domain of the ROI image, and the number of pixels in the connected domain is counted. A valid connected domain is determined based on the number of pixels, wherein the valid connected domain is the target diagonal black block area.
[0056] Due to different construction batches and design objectives, the targets may have different outer contour shapes, such as square, round or Figure 2 The cross-shaped image shown has a different appearance, which makes it difficult to extract the target. However, to ensure that the target is easier to identify in the image, the outer part is usually white, that is, the shape of the black block on different targets is more stable. Therefore, the embodiment of the present invention uses a black block when calculating the target center.
[0057] Figure 3 The result diagram after connected domain analysis according to an embodiment of the present invention is schematically shown.
[0058] like Figure 3 As shown in FIG. 1 , the process of obtaining the effective connected domain based on the connected domain analysis can be as follows: invert the color of the region of interest image after binary conversion, analyze the four connected domains of the inverted region of interest image, and divide the foreground of the region of interest image into three regions, as shown in FIG. Figure 3 As shown in A, B, and C in the figure. In the binarization process, the white block can be directly assigned as the background, and the background and black block can be directly assigned as the foreground, so as to omit the inversion process and directly perform the connected domain analysis.
[0059] In one embodiment of the present invention, the number of pixels of the black block area in the middle of the target on the remote sensing image is calculated and used as the pixel threshold to analyze the three connected domains A, B, and C. The effective connected domain with a pixel number less than the pixel threshold is the diagonal black block of the target.
[0060] For example, based on the image resolution and the actual size of the target, the size of the black and white block in the middle of the target on the image is calculated as n×n, and the number of pixels occupied by a single black block on the image is n×n / 4. Then the number of pixels in each connected domain is counted, and the connected domain with a number of pixels less than (n+ε)×(n+ε) / 4 is regarded as a valid connected domain (i.e., the diagonal black block area of the target). Among them, for the value of ε, since the background area is much larger than the target size, ε can be 1 to 3 pixels according to the image quality.
[0061] In operation S105 , the center coordinates of the pixels in the valid connected domain are calculated as the initial values of the center coordinates of the target.
[0062] For each pixel in the aforementioned valid connected domain, according to
[0063]
[0064] Calculate the initial value of the target center coordinates, where (x center ,y center ) is the initial value of the center coordinate, (x i ,y i ) is the pixel coordinates of each pixel in the effective connected domain, and m is the number of pixels in the effective connected domain.
[0065] In operation S106 , the sub-pixel coordinates of the target are calculated according to the initial value of the center coordinates of the target.
[0066] In the embodiment of the present invention, the sub-pixel coordinates of the target may be calculated based on the initial value of the center coordinate of the target using a function curve fitting method, a difference method based on black and white alternation, a knife edge fitting method, a template matching method, or a gradient method.
[0067] For example, the process of using the Boltzmann function curve fitting method is: taking the initial value of the target center coordinate obtained in operation S105 as the initial value, selecting appropriate pixel points in the row and column directions to perform Boltzmann function curve fitting to obtain the black and white boundary center of the row / column, and then fitting the black and white boundary line, and obtaining the coordinates of the intersection of the boundary lines in the row and column directions as the sub-pixel coordinates of the target.
[0068] Therefore, according to the method for extracting artificial marker features of remote sensing images provided by an embodiment of the present invention, the geodetic coordinates of the target center are projected to the image to be processed, combined with the reference orthophoto registration to preliminarily obtain the image point coordinates of the target, and then the region of interest is extracted and the connected domain analysis is performed to calculate the initial value of the center coordinate of the target black block, and then the sub-pixel target center is obtained, which solves the problem of manually giving the initial value in the existing method and meets the demand for automatic extraction of the target center. Moreover, taking into account the differences in payload resolution and the cost of target production, the designed targets may have a variety of external contour styles, such as round, square, cross, etc.; due to different shooting directions or target layout directions, the black and white blocks of different targets may be rotated or flipped; affected by lighting conditions or the point spread function of the payload and the atmosphere, the white block of the target expands in the image, making the target image different from the ideal black and white diagonal image shape, etc., which can cause the target to appear differently on different payloads or different images, making it difficult to extract using a unified image template. The problem of target shape diversity is solved by analyzing the four-connected domain to calculate the center of the target black block. The characteristics of large contrast between the white block and the background and stable shape structure of the diagonal black block are fully considered to accurately locate the target center and automatically provide initial values for sub-pixel cross diagonal target center coordinate extraction.
[0069] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, the features described in the various embodiments of the present invention may be combined and / or combined in various ways without departing from the spirit and teachings of the present invention. All of these combinations and / or combinations fall within the scope of the present invention.
[0070] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for extracting artificial landmark features from remote sensing images, comprising: Projecting the geodetic coordinates of the center points of each target onto the remote sensing image to obtain the image point coordinates of the center points of each target on the remote sensing image; Taking the image point coordinates corresponding to the target within the remote sensing image range as the center, intercept the image of the area of interest; Binarizing the image of the region of interest to distinguish the white block of the target from other regions; Performing a connected domain analysis on the binarized region of interest image to obtain a connected domain of the region of interest image, including: analyzing four connected domains on the background and black block area of the region of interest image to obtain a connected domain of the region of interest image; Counting the number of pixels in the connected domain, and determining a valid connected domain according to the number of pixels, including: calculating the size of the black block area in the middle of the target on the remote sensing image to obtain a pixel threshold; counting the number of pixels in the connected domain; determining the connected domain with a pixel number less than the pixel threshold as the valid connected domain; Calculating the center coordinates of the pixels in the effective connected domain as the initial value of the center coordinates of the target includes: Calculate the initial value of the target center coordinates, where (x center , y center ) is the initial value of the center coordinate, (x i , y i ) is the pixel coordinates of each pixel in the effective connected domain, and m is the number of pixels in the effective connected domain; The sub-pixel coordinates of the target are calculated based on the initial value of the center coordinates of the target.
2. The method for extracting artificial landmark features from remote sensing images according to claim 1, wherein: The remote sensing image includes a coarse geometric correction image used for calibration or a fine geometric correction image used for accuracy verification.
3. The method for extracting artificial landmark features from remote sensing images according to claim 2, wherein: The projecting the geodetic coordinates of the center points of each target onto the remote sensing image to obtain the image point coordinates of the center points of each target on the remote sensing image comprises: Registering the rough geometric correction image with the orthophoto image to establish an affine transformation relationship between the rough geometric correction image and the orthophoto image; Projecting the geodetic coordinates of the center points of each target corresponding to the rough geometric correction image onto the rough geometric correction image to obtain the initial image point coordinates of the center points of each target on the rough geometric correction image; The initial image point coordinates are transformed using the affine transformation relationship to obtain the image point coordinates.
4. The method for extracting artificial landmark features from remote sensing images according to claim 2, wherein: The projecting the geodetic coordinates of the center points of each target onto the remote sensing image to obtain the image point coordinates of the center points of each target on the remote sensing image comprises: Registering the rough geometric correction image with the orthophoto image to establish an affine transformation relationship between the rough geometric correction image and the orthophoto image; Performing geometric correction on the geometrically roughly corrected image using the affine transformation relationship; The geodetic coordinates of the center points of each target corresponding to the rough geometric correction image are projected onto the rough geometric correction image after geometric correction, and then the image point coordinates are calculated according to the affine transformation relationship.
5. The method for extracting artificial landmark features from remote sensing images according to claim 1, wherein: The method of capturing an image of an area of interest with the coordinates of an image point corresponding to a target within the remote sensing image as the center includes: Determining whether the image point coordinates are within the remote sensing image; For the image point coordinates in the remote sensing image, the image of the region of interest is intercepted according to the geometric positioning accuracy of the remote sensing image and the size of the target.
6. The method for extracting artificial landmark features from remote sensing images according to claim 1, wherein: The binarization of the image of the region of interest comprises: The image of the region of interest is binarized using Otsu's method, bimodal method or iterative method.
7. The method for extracting artificial landmark features from remote sensing images according to claim 1, wherein: The step of calculating the sub-pixel coordinates of the target according to the initial value of the center coordinates of the target comprises: The sub-pixel coordinates of the target are calculated based on the initial value of the center coordinate of the target using a function curve fitting method, a difference method based on black and white alternation, a knife edge fitting method, a template matching method, or a gradient method.
