Template map coordinate conversion circuit and target matching device

By using matrix operations and linear accumulation submodules in the template graph coordinate transformation circuit, the problem of insufficient speed and accuracy of template graph transformation in embedded systems is solved, and fast and accurate target matching and recognition are achieved.

CN117173027BActive Publication Date: 2026-07-03HUAZHONG UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAZHONG UNIV OF SCI & TECH
Filing Date
2023-08-17
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In existing technologies, the transformation of template graph coordinate system is slow and lacks accuracy in embedded systems, making it difficult to meet the requirements of both real-time performance and accuracy.

Method used

A template image coordinate transformation circuit is adopted, including an interface module, a reference coordinate system transformation module, and an intermediate buffer memory. The matrix operation submodule performs rotation coordinate transformation, the linear accumulation submodule performs pixel coordinate reconstruction and weighted accumulation, and the stripe filtering and bilinear interpolation modules are combined to optimize image quality.

Benefits of technology

It improves the speed and accuracy of template image transformation, achieving fast and accurate target matching and recognition, while balancing processing speed and image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117173027B_ABST
    Figure CN117173027B_ABST
Patent Text Reader

Abstract

The application discloses a template image coordinate transformation circuit and a target matching device, and belongs to the technical field of image matching and recognition. The circuit comprises an interface module, a reference coordinate system transformation module and an intermediate cache memory. The reference coordinate system transformation module comprises a matrix operation submodule and a linear accumulation submodule. The interface module is used for receiving an original template image. The matrix operation submodule is used for performing a rotating coordinate transformation on the original template image according to a rotation angle of a to-be-matched image, so as to obtain pixel coordinates of each pixel point. The linear accumulation submodule is used for performing a weighted accumulation on the gray values of the pixel coordinates adjacent to the reconstructed pixel coordinates, so as to obtain a reconstructed gray value of the reconstructed pixel coordinates and store the reconstructed gray value into the intermediate cache memory, and thus a rotated template image is obtained. The template image coordinate transformation circuit takes into account the speed and accuracy of template image transformation. The template image coordinate transformation circuit is used to generate a template image, which is beneficial to the deployment on an embedded system and the fast and accurate realization of target matching and recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image matching and recognition technology, and more specifically, relates to a template image coordinate transformation circuit and a target matching device. Background Technology

[0002] Target matching and recognition technology is a crucial technique in computer vision, applied in numerous fields such as aircraft guidance, remote sensing image processing, and facial recognition. Target matching, also known as template matching, involves locating the region in the image to be matched that is most similar to a template image. However, in practical applications, the shooting angle of the image to be matched varies due to the rotation of the acquisition device or the scene being photographed, resulting in different images of the same target at different angles. If a template image with a fixed angle is used, it becomes difficult to identify the target from the image to be matched when the shooting angles of the image to be matched and the template image differ. Therefore, it is necessary to transform the template image according to the rotation angle of the image to be photographed, rotating it to the same angle so that the image to be matched and the template image are at the same shooting angle, thus achieving accurate target matching and recognition.

[0003] Since template matching technology is often used in embedded systems with limited power consumption and size, the template graph coordinate system transformation module also needs to be deployed on the embedded system to provide the template matching task module with the real-time rotated and transformed template graph. The template graph coordinate system transformation process requires a large number of multiplication and division operations. While embedded software can be used for rapid development, its processing speed is severely limited by the processing power of general-purpose processors, resulting in slow speeds that are unacceptable for applications with high real-time requirements. Another approach is to use fixed-point arithmetic on the embedded platform, which can accelerate computation, reduce resource consumption and system power consumption, but its accuracy is usually greatly affected by the calculation process. Real-time template matching tasks have high requirements for both the accuracy and real-time performance of the template graph coordinate system transformation. Therefore, designing a template graph coordinate system transformation scheme that balances accuracy and computational speed is a pressing issue that needs to be addressed. Summary of the Invention

[0004] In view of the above-mentioned defects or improvement needs of the prior art, the present invention provides a template image coordinate transformation circuit and a target matching device, which aims to solve the technical problem that the accuracy and processing speed of template image coordinate transformation cannot be balanced.

[0005] To achieve the above objectives, according to one aspect of the present invention, a template graph coordinate transformation circuit is provided, comprising: an interface module, a reference coordinate system transformation module, and an intermediate buffer memory, wherein the reference coordinate system transformation module includes a matrix operation submodule and a linear accumulation submodule, wherein...

[0006] The interface module is used to receive an original template image with M pixels, which is a template image used for matching when the image to be matched has no rotation angle;

[0007] The matrix operation submodule is used to perform a rotation coordinate transformation on the original template image according to the rotation angle of the image to be matched, so as to obtain the pixel coordinates (x, y, y) of each pixel i in the original template image after rotation. i (o) ,y i (o) ), i = 1, 2, 3, ..., M;

[0008] The linear accumulation submodule is used to reconstruct pixel coordinates (x) j ,y j ) neighboring pixel coordinates (x i (o) ,y i (o) The grayscale value g(x) i (o) y i (o) The weighted summation is performed to obtain the reconstructed pixel coordinates (x). j ,y j The grayscale value G(x) j ,y j The reconstructed pixel coordinates (x) j ,y j Let ) be the coordinates of the j-th pixel after the original template image is divided into N uniformly distributed pixels, where j = 1, 2, 3, ..., N;

[0009] The intermediate cache memory is used to store the grayscale value G(x). j ,y j Once the grayscale values ​​of all reconstructed pixel coordinates have been stored, the rotated template image is obtained.

[0010] In one embodiment, the template graph coordinate transformation circuit further includes:

[0011] The stripe removal module is used to soften the rotated template image: the grayscale value G(x) is adjusted using the following formula. j ,y j Convert the resulting grayscale value H(x) to a softened grayscale value. j ,y j The softened template image is obtained using the following formula:

[0012]

[0013] In the formula, addcount(x j ,yj To obtain the grayscale value G(x) j ,y j The number of neighboring pixels accumulated.

[0014] In one embodiment, the stripe filtering module is a divider, and the grayscale value G(x) j ,y j The divider is processed sequentially in a pipeline mode to soften the result.

[0015] In one embodiment, the template graph coordinate transformation circuit further includes:

[0016] The bilinear interpolation module is used to perform linear interpolation on the softened template image to reduce local zero points. It is also used to adjust the size of the softened template image to output a template image of a set size.

[0017] In one embodiment, the linear accumulation submodule is used to reconstruct pixel coordinates (x... j ,y j ) neighboring pixel coordinates (x i (o) ,y i (o) The grayscale value g(x) i (o) ,y i (o) The weighted summation is performed to obtain the reconstructed pixel coordinates (x). j ,y j The grayscale value G(x) j ,y j The formula is:

[0018]

[0019] In the formula, β i grayscale value g(x) i (o) ,y i (o) The weighting coefficients.

[0020] In one embodiment, the linear accumulation submodule performs accumulation in any of the following ways: nearest neighbor accumulation, bilinear accumulation, or bicubic accumulation.

[0021] When using the nearest neighbor accumulation method:

[0022]

[0023] In the formula, w is the distance between adjacent reconstructed pixels in the same row or column;

[0024] When using the bilinear accumulation method:

[0025]

[0026] When using the bicubic cumulative method

[0027]

[0028] In the formula, d is the pixel coordinate (x... i (o) ,y i (o) ) and reconstructed pixel coordinates (x j ,y j The distance.

[0029] In one embodiment, the interface module includes a data input interface and a parameter configuration interface:

[0030] The data input interface is used to receive the original template image;

[0031] The parameter configuration interface is used to receive parameter configuration information from the coordinate transformation circuit.

[0032] In one embodiment, the linear accumulation submodule includes an addition component and a control component:

[0033] The control component is used to receive each pixel coordinate (x) i (o) ,y i (o) ) and its grayscale value g(x) i (o) ,y i (o) After that, identify the coordinates (x, y) of the reconstructed pixels that are close to it. j ,y j The grayscale value G(x) corresponding to the reconstructed pixel coordinates is then used to... j ,y j The grayscale value G(x) is read from the intermediate cache memory, added using the addition component, and its output is written back to the intermediate cache memory to update the grayscale value G(x). j ,y j ).

[0034] In one embodiment, the rotation coordinate transformation process performed by the matrix operation submodule is divided into two steps:

[0035] The first step is to rotate and transform the original template image from the world coordinate system to the camera coordinate system, thereby obtaining the camera coordinates (x, y, y) of each pixel i in the rotated camera coordinate system. i (c) ,yi (c) ,z i (c) );

[0036] The second step is to transform the camera coordinate system to the pixel coordinate system. The transformation formula is as follows:

[0037]

[0038] In the formula, f is the focal length of the data acquisition device, and u0 and v0 are half the length and half the width of the original template image, respectively.

[0039] According to another aspect of the present invention, a target matching device is provided, comprising:

[0040] The data acquisition module is used to acquire the image to be matched;

[0041] The template image coordinate transformation circuit described above is used to perform a rotation coordinate transformation on the original template image according to the rotation angle of the image to be matched, so as to obtain a rotated template image;

[0042] The matching module is used to match the image to be matched based on the rotated template image, and to determine whether the target in the template image exists in the image to be matched.

[0043] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects:

[0044] The template image coordinate transformation circuit proposed in this invention includes a matrix operation submodule and a linear accumulation submodule in its reference coordinate system transformation module. The matrix operation submodule performs the rotation coordinate transformation, while the linear accumulation submodule linearly accumulates the irregularly distributed pixel coordinates after the linear transformation, reconstructing them into uniformly distributed pixels, storing them, and outputting the rotated template image. By setting up the linear accumulation submodule, on the one hand, reconstructing the transformed pixel coordinates into regularly arranged pixel coordinates facilitates pixel coordinate indexing and improves the template image generation rate; on the other hand, calculating the grayscale values ​​of the reconstructed pixels through linear accumulation preserves as much image information as possible, ensuring the output accuracy of the rotated template image. Therefore, the template image coordinate transformation circuit proposed in this invention balances the speed and accuracy of template image transformation. Using this template image coordinate transformation circuit for template image rotation transformation facilitates rapid and accurate target matching and recognition.

[0045] Furthermore, the template image coordinate transformation circuit also includes a stripe filtering module, which can remove bright stripes and most of the dark stripes, thus optimizing image quality.

[0046] Furthermore, the template image coordinate transformation circuit also includes a bilinear interpolation module, which can further remove the remaining dark stripes in the image while scaling the image size, outputting an image of the set size and optimizing image quality. Attached Figure Description

[0047] Figure 1 This is an overall block diagram of the template coordinate transformation circuit provided in an embodiment of the present invention;

[0048] Figure 2 This is a schematic diagram of the relationship between storage space address and reconstructed pixel coordinates provided in an embodiment of the present invention, wherein (a) is storing the gray value of each pixel into the storage space, and (b) is the coordinate arrangement of each pixel.

[0049] Figure 3 This is an overall block diagram of the template coordinate transformation circuit provided in another embodiment of the present invention;

[0050] Figure 4 This is an example diagram of the state machine of the interface module used in an embodiment of the present invention;

[0051] Figure 5 This is a hardware structure diagram of a template graph coordinate transformation circuit provided in an embodiment of the present invention;

[0052] Figure 6 This is an example diagram of a satellite image template used in an embodiment of the present invention;

[0053] Figure 7 This is an example diagram showing the coordinate processing effect of the reference coordinate system transformation module used in an embodiment of the present invention;

[0054] Figure 8 This is an example image of a stripe removal module processed according to an embodiment of the present invention;

[0055] Figure 9 This is an example image of an image scaled up using the bilinear interpolation module employed in an embodiment of the present invention. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0057] like Figure 1The diagram shown is an overall block diagram of a template graph coordinate transformation circuit in one embodiment, including an interface module, a reference coordinate system transformation module, and an intermediate buffer memory. The reference coordinate system transformation module includes a matrix operation submodule and a linear accumulation submodule. The various components are described below.

[0058] The interface module is used to receive an original template image with M pixels, which is a template image used for matching when the image to be matched has no rotation angle.

[0059] The original template image is the initial template image prepared for target matching. Based on the template image, target matching and recognition can be performed on the image to be matched. The image to be matched has no rotation angle, meaning that the image to be matched and the original template image were captured from the same angle. The original template image is divided into M pixels, and the coordinate information and grayscale value of each pixel are also known.

[0060] The matrix operation submodule is used to perform a rotation coordinate transformation on the original template image according to the rotation angle of the image to be matched, so as to obtain the pixel coordinates (x, y, y) of each pixel i in the original template image after rotation. i (o) ,y i (o) ), i = 1, 2, 3, ..., M.

[0061] Specifically, if the shooting angle of the image to be matched is rotated, the coordinate system of the template image also needs to be rotated in order to better perform target matching and recognition.

[0062] In the reference coordinate system transformation module, the matrix operation submodule is used to realize the rotation transformation of the coordinate system. Specifically, the original template image can be transformed from the world coordinate system to the camera coordinate system, then the coordinates of the camera coordinate system are projected onto the image coordinate system, and finally the image coordinate system is transformed into the pixel coordinate system. The specific transformation process can be implemented according to conventional algorithms.

[0063] In this embodiment, for ease of hardware implementation, the transformation from the camera coordinate system to the image coordinate system and then from the image coordinate system to the pixel coordinate system is combined into one step. The above-mentioned rotation coordinate transformation can be divided into two steps:

[0064] The first step is to transform the coordinates of the received original template image from the world coordinate system to the camera coordinate system.

[0065] When the original image lacks height information, the height can be set to 0.

[0066] This step achieves the rotation and translation of the coordinate system. When the coordinate system is rotated clockwise by an angle α around the z-axis, the coordinates (x, y, y) of pixel i in the world coordinate system change. i (w) ,y i(w) ,z i (w) The coordinates of ) in the transformed camera coordinate system are (x i (c1) ,x i (c1) ,z i (c1) Let r1 be the transformation matrix for the rotation around the z-axis. The transformation process can be represented by a matrix as follows:

[0067]

[0068]

[0069] Similarly, the transformation matrices for rotation around the x-axis and y-axis can be represented as r2 and r3, respectively. Therefore, after transforming from the world coordinate system to the camera coordinate system, the coordinates of pixel i can be represented as (x... i (c) ,y i (c) ,z i (c) The calculation formula is as follows:

[0070]

[0071] In the formula, T is the translation vector, and the values ​​of T, r1, r2, and r3 are related to the rotation angle α. The specific values ​​can be determined by referring to the coordinate transformation algorithm.

[0072] The second step is to transform the camera coordinate system to the pixel coordinate system.

[0073] For ease of hardware implementation, this step combines the transformation from the camera coordinate system to the image coordinate system, and then the transformation from the image coordinate system to the pixel coordinate system into a single step, implemented using a single transformation matrix. The specific transformation formula is as follows:

[0074]

[0075] In the formula, f is the camera focal length, u0 and v0 are half the length and half the width of the original input template image, respectively, (x i (o) ,y i (o) ) represents the pixel coordinates of the i-th point in the transformation result.

[0076] Specifically, in terms of hardware implementation, the above two transformation steps can be completed in a pipelined manner, that is, the above vector multiplication can be completed in a pipelined manner.

[0077] The matrix operation submodule is used to rotate the coordinates of the original template image, obtaining the rotated pixel coordinates (x, y) of each pixel i.i (o) ,y i (o) In other words, after rotation, the pixel coordinates of each pixel i change, and after complex transformations, the pixel coordinates of each point have no regular arrangement. In the hardware circuit, after the coordinate transformation, it is necessary to store the coordinates and grayscale values ​​of each pixel, and finally generate the transformed image based on the stored coordinates and grayscale values ​​of each coordinate.

[0078] If the coordinates of each pixel are arranged in a regular pattern, the grayscale values ​​of each pixel can be stored sequentially in the storage space, establishing a relationship between the storage space address and the coordinates of each pixel. For each stored grayscale value, the corresponding pixel coordinates can be obtained based on the relationship between the storage address and the pixel coordinates, thus eliminating the need to store the pixel coordinates and perform complex indexing. However, since the pixel coordinates are not arranged in a regular pattern after rotation, it is impossible to establish a relationship between the storage address and the pixel coordinates, and the indexing of the pixel coordinates is more complex, reducing the processing speed of generating the rotated template image. Directly using interpolation will introduce significant errors; when some points of the transformation coincide, a large amount of input information will be lost.

[0079] To address the aforementioned problems, this invention further includes a linear accumulation submodule within the reference coordinate system transformation module. This linear accumulation submodule is used to process the reconstructed pixel coordinates (x... j ,y j ) neighboring pixel coordinates (x i (o) ,y i (o) The grayscale value g(x) i (o) ,y i (o) The weighted summation is performed to obtain the reconstructed pixel coordinates (x). j ,y j The grayscale value G(x) j ,y j The reconstructed pixel coordinates (x) j ,y j Let be the coordinates of the j-th pixel after the original template image is divided into N uniformly distributed pixels, where j = 1, 2, 3, ..., N.

[0080] The linear accumulation submodule divides the original template image into N uniformly distributed pixels based on its size, and the reconstructed pixel coordinates (x, y, y) of each pixel are... j ,y j The parameters are known. At this point, the reconstructed pixel coordinates (x...) j ,y jThe pixels are uniformly distributed, allowing the construction of a relationship between reconstructed pixel coordinates and storage addresses. The grayscale value of each reconstructed pixel coordinate is stored in its corresponding storage address. By directly reading each grayscale value and determining its corresponding reconstructed pixel coordinate based on its storage address, a rotated template image can be generated. Figure 2 For example, suppose there are 8 evenly distributed pixels, with their corresponding gray values ​​1 to 8 stored sequentially in the storage space, with addresses k to k+7. For instance, if address k corresponds to the coordinates of pixel 1 (1,1), then address k+5 corresponds to the coordinates of pixel 6 (2,2). Therefore, reading the gray values ​​within each address and quickly calculating the corresponding pixel coordinates can improve the template image generation rate.

[0081] In this invention, for each pixel point (x) that is irregularly distributed due to rotational transformation... i (o) ,y i (o) The reconstructed pixel coordinates (x, y) can be calculated using a linear accumulation method. j ,y j The grayscale value of ) is specifically the value relative to the reconstructed pixel coordinates (x j ,y j ) neighboring pixel coordinates (x i (o) ,y i (o) The grayscale value g(x) i (o) ,y i (o) The weighted summation is performed to obtain the reconstructed pixel coordinates (x). j ,y j The grayscale value G(x) j ,y j Then, the grayscale value G(x) is calculated. j ,y j Store sequentially.

[0082] In one embodiment, the grayscale value G(x) j ,y j The formula for calculating ) can be expressed as:

[0083]

[0084] In the formula, β i grayscale value g(x) i (o) ,y i (o) The weighting coefficients.

[0085] In one embodiment, the linear accumulation submodule performs accumulation in any of the following manner: nearest neighbor accumulation, bilinear accumulation, or bicubic accumulation.

[0086] Specifically, when using the nearest neighbor accumulation method:

[0087]

[0088] In the formula, w is the distance between adjacent pixels in the same row or column, which is generally taken as 1.

[0089] Specifically, when using the bilinear accumulation method:

[0090]

[0091] Specifically, when using the bicubic cumulative method,

[0092]

[0093] In the formula, d is the pixel coordinate (x... i (o) ,y i (o) ) and reconstructed pixel coordinates (x j ,y j The distance.

[0094] It should be noted that the accumulation methods are not limited to those mentioned above. As long as the reconstructed pixel coordinates (x... j ,y j The coordinates of several neighboring pixels (x) i (o) ,y i (o) The grayscale values ​​of the reconstructed pixels are then summed using a weighted method. In this invention, calculating the grayscale values ​​of the reconstructed pixels using the above-described summation method preserves as much image information as possible, ensuring the output accuracy of the rotated template image.

[0095] Intermediate cache memory is used to store the grayscale value G(x) j ,y j Once the grayscale values ​​of all reconstructed pixel coordinates have been stored, the rotated template image is obtained.

[0096] In one embodiment, such as Figure 3 As shown, the interface module includes a data input interface and a parameter configuration interface. The data input interface is used to receive the original template image; the parameter configuration interface is used to receive the parameter configuration information of the coordinate transformation circuit. That is, the interface module needs to receive both the input image data and the parameter configuration information from the processor, and update the circuit's operating mode before processing each frame of image.

[0097] Specifically, the interface module is characterized by its ability to receive template image data from the microprocessor via a data input interface and to receive instructions from the microprocessor via a parameter configuration interface. Before each frame of image input, the interface module checks if there is new instruction data in the instruction FIFO. If new instruction data is present, it needs to be loaded before receiving the next frame of template image data. The instruction data includes information such as whether to receive data continuously or paused, coordinate system transformation parameters, and output image size.

[0098] like Figure 4 The diagram shows the state machine of the interface module. When the circuit needs to be started, it is reset, and the interface is in an idle state. When the circuit malfunctions, the interface remains in an idle state. When the circuit can operate normally, the interface module begins to receive information. Specifically, it first checks the instruction FIFO for new instructions via the parameter configuration interface. When there are new instructions in the instruction FIFO, the interface module reads the new parameters and updates them to the circuit. If the parameters are updated and the instruction indicates that the circuit should pause, the circuit continues to check the instruction FIFO until a new instruction arrives. If the parameters are updated and the instruction indicates that the circuit should operate, the circuit will receive one frame of input data and then jump to the idle state after completion. When there are no new instructions in the instruction FIFO and the circuit is not paused, the interface circuit will receive one frame of input data and then jump to the idle state after completion.

[0099] like Figure 5 The diagram shows the hardware structure of the template image coordinate transformation circuit in one embodiment. The world coordinates in the original template image are processed by three stages of multiplication in the multiplication pipeline, outputting the rotated and transformed pixel coordinates, with each pixel coordinate corresponding to a grayscale value. The reconstructed pixel coordinates (x, y, z) are stored in the intermediate buffer memory. j ,y j The grayscale value G(x) j ,y j ), during initialization, each grayscale value G(x) j ,y j The linear accumulation submodule can be configured with multiple accumulation methods, from which one can be selected for accumulation. The linear accumulation submodule includes an addition component and a control component (not shown): the control component is used to accumulate data for each received pixel coordinate (x, y). i (o) ,y i (o) ) and its grayscale value g(x) i (o) ,y i (o) After that, identify the coordinates (x, y) of the reconstructed pixels that are close to it. j ,y j The grayscale value G(x) corresponding to the reconstructed pixel coordinates is then used to... j ,yj The grayscale value G(x) is read from the intermediate cache memory, added using the addition component, and its output is written back to the intermediate cache memory to update the grayscale value G(x). j ,y j ). Figure 8 The diagram shown is a schematic diagram of the coordinate system transformation module provided in an embodiment of the present invention.

[0100] In one embodiment, the template image coordinate transformation circuit further includes a stripe filtering module for softening the rotated template image: the grayscale value G(x) is transformed using the following formula. j ,y j Convert the resulting grayscale value H(x) to a softened grayscale value. j ,y j The softened template image is obtained using the following formula:

[0101]

[0102] In the formula, addcount(x j ,y j To obtain the grayscale value G(x) j ,y j The number of neighboring pixels accumulated.

[0103] The stripe removal module is characterized by its ability to soften bright stripes caused by local size changes due to image angle transformations.

[0104] In one embodiment, the template image coordinate transformation circuit further includes a bilinear interpolation module, used to perform linear interpolation on the softened template image to reduce local zero points, and also used to adjust the size of the softened template image to output a template image of a set size. In the circuit, the stripe filtering module is completed using a divider pipeline, and can output the grayscale result of one pixel per clock cycle to the bilinear interpolation module.

[0105] Figure 6 The image shown is an example of a satellite image template used in an embodiment, with an image size of 512x512.

[0106] Figure 7 The image shown is a template diagram output after processing by the linear accumulation submodule, as used in an embodiment of the present invention. Figure 6 The satellite image shown has been transformed to the target pixel coordinate system after undergoing coordinate transformation and linear accumulation by the reference coordinate system transformation module.

[0107] Figure 8 The image shown is an example of an image processed by the stripe removal module used in an embodiment of the present invention. Figure 7After coordinate system transformation, the image may contain numerous bright and dark stripes. The stripe removal module can remove almost all bright stripes and most of the dark stripes. An example of the result is shown below. Figure 8 Subsequent circuitry can then use interpolation to remove almost all the dark stripes.

[0108] Figure 9 The image shown is an example of an image scaled up using the bilinear interpolation module employed in this embodiment of the invention. Since the template image required by the target matching network during operation is often a portion of the image to be matched, its size is usually smaller than the image to be matched, while the actual satellite image size is larger. Therefore, the circuit needs to be able to flexibly change the size of the output result. The size change uses the bilinear interpolation method, which can further remove remaining dark stripes in the image while scaling it up. For example... Figure 9 After image interpolation, the dark stripes basically disappear, and the image size is transformed to the target size.

[0109] This invention also relates to a target matching device, comprising a data acquisition module for acquiring an image to be matched; a template image coordinate transformation circuit for performing a rotation coordinate transformation on the original template image according to the rotation angle of the image to be matched, to obtain a rotated template image; and a matching module for matching the image to be matched based on the rotated template image, determining whether a target from the template image exists in the image to be matched. This target matching device can be used in numerous fields such as aircraft guidance, remote sensing image processing, and facial recognition.

[0110] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A template diagram coordinate transformation circuit, characterized in that, include: The system comprises an interface module, a reference coordinate system transformation module, and an intermediate cache memory. The reference coordinate system transformation module includes a matrix operation submodule and a linear accumulation submodule. The interface module is used to receive an original template image with M pixels, which is a template image used for matching when the image to be matched has no rotation angle; The matrix operation submodule is used to perform a rotation coordinate transformation on the original template image according to the rotation angle of the image to be matched, so as to obtain the pixel coordinates (x, y, y) of each pixel i in the original template image after rotation. i (o) y i (o) ), i=1,2,3,...,M; The linear accumulation submodule is used to reconstruct pixel coordinates (x) j y j ) neighboring pixel coordinates (x i (o) y i (o) The grayscale value g(x) i (o) y i (o) The weighted summation is performed to obtain the reconstructed pixel coordinates (x). j y j The grayscale value G(x) j y j The reconstructed pixel coordinates (x) j y j Let ) be the coordinates of the j-th pixel after the original template image is divided into N uniformly distributed pixels, where j = 1, 2, 3, ..., N; The intermediate cache memory is used to store the grayscale value G(x). j y j Once the grayscale values ​​of all reconstructed pixel coordinates have been stored, the rotated template image is obtained.

2. The template diagram coordinate transformation circuit as described in claim 1, characterized in that, The template graph coordinate transformation circuit further includes: The stripe removal module is used to soften the rotated template image: the grayscale value G(x) is adjusted using the following formula. j y j Convert the resulting grayscale value H(x) to a softened grayscale value. j y j The softened template image is obtained using the following formula: In the formula, addcount(x j y j To obtain the grayscale value G(x) j y j The number of neighboring pixels accumulated.

3. The template diagram coordinate transformation circuit as described in claim 2, characterized in that, The stripe filtering module is a divider, and the grayscale value G(x) j y j The divider is processed sequentially in a pipeline mode to soften the result.

4. The template diagram coordinate transformation circuit as described in claim 2, characterized in that, The template graph coordinate transformation circuit further includes: The bilinear interpolation module is used to perform linear interpolation on the softened template image to reduce local zero points. It is also used to adjust the size of the softened template image to output a template image of a set size.

5. The template diagram coordinate transformation circuit as described in any one of claims 1 to 4, characterized in that, The linear accumulation submodule is used to reconstruct pixel coordinates (x) j y j ) neighboring pixel coordinates (x i (o) y i (o) The grayscale value g(x) i (o) y i (o) The weighted summation is performed to obtain the reconstructed pixel coordinates (x). j y j The grayscale value G(x) j y j The formula is: In the formula, β i grayscale value g(x) i (o) y i (o) The weighting coefficients.

6. The template diagram coordinate transformation circuit as described in claim 5, characterized in that, The linear accumulation submodule performs accumulation in any one of the following methods: nearest neighbor accumulation, bilinear accumulation, or bicubic accumulation. When using the nearest neighbor accumulation method: In the formula, w is the distance between adjacent reconstructed pixels in the same row or column; When using the bilinear accumulation method: When using the bicubic cumulative method In the formula, d is the pixel coordinate (x... i (o) y i (o) ) and reconstructed pixel coordinates (x j y j The distance.

7. The template diagram coordinate transformation circuit as described in claim 1, characterized in that, The interface module includes a data input interface and a parameter configuration interface: The data input interface is used to receive the original template image; The parameter configuration interface is used to receive parameter configuration information from the coordinate transformation circuit.

8. The template diagram coordinate transformation circuit as described in claim 1, characterized in that, The linear accumulation submodule includes an addition component and a control component: The control component is used to receive each pixel coordinate (x) i (o) y i (o) ) and its grayscale value g(x) i (o) y i (o) After that, identify the coordinates (x, y) of the reconstructed pixels that are close to it. j y j The grayscale value G(x) corresponding to the reconstructed pixel coordinates is then used to... j y j The grayscale value G(x) is read from the intermediate cache memory, added using the addition component, and its output is written back to the intermediate cache memory to update the grayscale value G(x). j y j ).

9. The template diagram coordinate transformation circuit as described in claim 1, characterized in that, The rotation coordinate transformation process performed by the matrix operation submodule consists of two steps: The first step is to rotate and transform the original template image from the world coordinate system to the camera coordinate system, thereby obtaining the camera coordinates (x, y, y) of each pixel i in the rotated camera coordinate system. i (c) y i (c) , z i (c) ); The second step is to transform the camera coordinate system to the pixel coordinate system. The transformation formula is as follows: In the formula, f is the focal length of the data acquisition device, and u0 and v0 are half the length and half the width of the original template image, respectively.

10. A target matching device, characterized in that, include: The data acquisition module is used to acquire the image to be matched; The template image coordinate transformation circuit according to any one of claims 1 to 9 is used to perform a rotation coordinate transformation on the original template image according to the rotation angle of the image to be matched, so as to obtain a rotated template image; The matching module is used to match the image to be matched based on the rotated template image, and to determine whether the target in the template image exists in the image to be matched.