Template matching target recognition method and device based on voting statistical bias, and equipment
By performing geometric correction and feature point displacement deviation voting on real-time images, the problem of high computational resource consumption in template matching was solved, and accurate target positioning was achieved in high-speed missile-borne environments.
Patent Information
- Application Number
- CN202310158477.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-23
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2043-02-23
AI Technical Summary
Existing automatic target acquisition schemes consume a lot of computing resources during template matching, making it difficult to achieve accurate target positioning in high-speed missile environments.
By performing geometric correction on real-time images, extracting edge feature maps, constructing displacement deviation voting coordinates, calculating the displacement deviation between feature points, and performing weighted voting, the coordinates of the highest number of votes are traversed as translation parameters for matching and recognition.
While ensuring the accuracy of target recognition, the computational load is greatly reduced and the recognition speed is improved.
Smart Images

Figure CN116152531B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image target recognition, in particular to a template matching target recognition method and device based on voting statistical deviation and equipment. BACKGROUND
[0002] The ground multi-mode imaging guidance system adopts advanced detection and information processing technology to realize accurate attack on targets, and the target recognition technology in complex ground background is the core and difficulty. At present, the target recognition technology mainly includes the following two schemes: (1) a scheme of recognizing targets by extracting information in images, i.e. automatic target recognition (ATR); the scheme includes the following steps: first, constructing a "target knowledge base" based on an expert system; then, recognizing targets by calculating the projection of images in the space formed by the "target knowledge base". Here, the "target knowledge base" can be characteristic information of images or statistical information of images. (2) a scheme of capturing targets by scene matching (image matching), i.e. automatic target capture (ATA); the scheme includes the following steps: first, extracting the matching primitives of the reference image and the real-time image; then, constructing the descriptors of the matching primitives and matching; finally, calculating the image registration parameters by using the matching space relationship between the primitives, so as to capture the targets.
[0003] The automatic target recognition (ATR) scheme strongly depends on the construction of the "target knowledge base", and computer vision usually uses image features to instantiate the expression of the "target knowledge base". Therefore, the ATR scheme either uses feature engineering methods such as sparse representation and bag-of-words model, or uses traditional machine learning methods based on SVM; however, the former cannot effectively solve the robustness problem of the "target knowledge base" under multiple perspective distortion conditions, and the latter can only identify the target categories contained in the image, and cannot give the accurate position of the target in the image. Therefore, the traditional ATR scheme is difficult to be applied to the ground imaging guidance task in the high-speed missile-borne environment. The automatic target capture (ATA) scheme naturally has the ability to accurately position the strike point coordinates. The scheme finds the corresponding position of any point in the reference image in the real-time image through the registration between the reference image and the real-time image. Therefore, the ATA method is still the research direction of the mainstream missile-borne imaging guidance scheme.
[0004] However, the template matching strategy adopted by the existing automatic target capture scheme usually adopts the sliding window method, which consumes a large amount of computing resources. SUMMARY
[0005] Therefore, it is necessary to provide a template matching target recognition method, device and equipment based on voting statistical deviation, which can accurately position targets and reduce the calculation.
[0006] A template matching target recognition method based on voting statistical deviation, the method comprises:
[0007] acquiring a real-time image and a reference image containing position information of a target;
[0008] geometrically correcting the real-time image to obtain a corrected real-time image, and extracting edge feature maps of the reference image and the corrected real-time image respectively, to obtain a reference edge feature map and a real-time edge feature map respectively;
[0009] constructing displacement deviation voting coordinates, and calculating displacement deviations between each feature point in the reference edge feature map and each feature point in the real-time edge feature map, and performing weighted voting on the coordinates corresponding to the displacement deviations in the displacement deviation voting coordinates;
[0010] traversing the displacement deviation voting coordinates to extract a coordinate with the highest voting score, and taking the coordinate as a translation parameter;
[0011] matching the corrected real-time image and the reference image according to the translation parameter, and obtaining a matching recognition position of the target in the corrected real-time image based on the matching relationship.
[0012] In one embodiment, the real-time image is an infrared image.
[0013] In one embodiment, while extracting the edge feature maps of the reference image and the corrected real-time image, the gradient amplitudes and gradient angles of each feature point in the reference image and the corrected real-time image are also extracted.
[0014] binarizing the gradient amplitudes of the feature points in the reference image and the corrected real-time image to obtain binarized gradient amplitudes;
[0015] correcting the gradient angles of the feature points in the reference image and the corrected real-time image, so that each gradient angle ranges from 0 to 180 degrees.
[0016] In one embodiment, before calculating the displacement deviations between each feature point in the reference edge feature map and each feature point in the real-time edge feature map:
[0017] calculating the difference between the corrected gradient angles of the feature points in the reference edge feature map and the real-time edge feature map;
[0018] judging according to the calculation result, if the calculation result is within a preset range, then calculating the displacement deviation between the two feature points;
[0019] if the calculation result is not within the preset range, then not calculating the displacement deviation between the two feature points.
[0020] In one embodiment, the preset range is [0, 45°].
[0021] In one embodiment, when weighted voting is performed, the weighted value is accumulated according to the gradient amplitude similarity measure and the gradient angle similarity measure.
[0022] In one embodiment, the gradient amplitude similarity measure is calculated using the following formula:
[0023]
[0024] In the above formula, S R and S T respectively represent the gradient amplitudes of the feature points of the binarized reference edge feature map and the real-time edge feature map, and a represents an adjustment parameter.
[0025] In one embodiment, the gradient angle similarity measure is calculated using the following formula:
[0026]
[0027] In the above formula, θ R and θ T respectively represent the gradient angles of the feature points of the corrected reference edge feature map and the real-time edge feature map, and σ represents the maximum allowed gradient angle error.
[0028] A template matching target recognition device based on voting statistical deviation, the device comprises:
[0029] An image acquisition module is configured to acquire a real-time image and a reference image, wherein the reference image contains position information of a target.
[0030] An edge feature map extraction module is configured to perform geometric correction on the real-time image to obtain a corrected real-time image, and extract edge feature maps of the reference image and the corrected real-time image, respectively, as a reference edge feature map and a real-time edge feature map.
[0031] A displacement deviation voting module is configured to construct displacement deviation voting coordinates, calculate displacement deviations between each feature point in the reference edge feature map and each feature point in the real-time edge feature map, and perform weighted voting according to the coordinates corresponding to the displacement deviations in the displacement deviation voting coordinates.
[0032] A translation parameter acquisition module is configured to traverse the displacement deviation voting coordinates to extract a coordinate with the highest number of votes, and take the coordinate as a translation parameter.
[0033] A target position recognition module is configured to match the corrected real-time image and the reference image according to the translation coordinates, and obtain a matching recognition position of the target in the corrected real-time image based on a matching relationship.
[0034] A computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0035] Obtaining a real-time image and a reference image, the reference image containing position information of a target;
[0036] Geometrically correcting the real-time image to obtain a corrected real-time image, and extracting edge feature maps of the reference image and the corrected real-time image respectively, as a reference edge feature map and a real-time edge feature map respectively;
[0037] Constructing displacement deviation voting coordinates, and calculating displacement deviations between each feature point in the reference edge feature map and each feature point in the real-time edge feature map, and performing weighted voting on corresponding coordinates of the displacement deviation voting coordinates according to the displacement deviations;
[0038] Traversing the displacement deviation voting coordinates to extract a coordinate with the highest number of votes, and taking the coordinate as a translation parameter;
[0039] Matching the corrected real-time image and the reference image according to the translation coordinates, and obtaining a matching recognition position of the target in the corrected real-time image based on a matching relationship.
[0040] A computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0041] Obtaining a real-time image and a reference image, the reference image containing position information of a target;
[0042] Geometrically correcting the real-time image to obtain a corrected real-time image, and extracting edge feature maps of the reference image and the corrected real-time image respectively, as a reference edge feature map and a real-time edge feature map respectively;
[0043] Constructing displacement deviation voting coordinates, and calculating displacement deviations between each feature point in the reference edge feature map and each feature point in the real-time edge feature map, and performing weighted voting on corresponding coordinates of the displacement deviation voting coordinates according to the displacement deviations;
[0044] Traversing the displacement deviation voting coordinates to extract a coordinate with the highest number of votes, and taking the coordinate as a translation parameter;
[0045] The corrected real-time image and the reference image are matched according to the translation coordinate, and a matching recognition position of the target in the corrected real-time image is obtained based on a matching relationship.
[0046] The template matching target recognition method, device and equipment based on voting statistical deviation, by performing geometric correction on the obtained real-time image, then extracting the edge feature map of the reference image containing target position information and the edge feature map of the corrected real-time image, then constructing displacement deviation voting coordinates, and calculating the displacement deviation between each feature point in the reference edge feature map and each feature point in the real-time edge feature map, weighting voting on the corresponding coordinates of each displacement deviation according to the calculated displacement deviation in the displacement deviation voting coordinates, then traversing the displacement deviation voting coordinates to extract the coordinate with the highest voting number, taking the coordinate as the translation parameter, and finally matching the corrected real-time image and the reference image according to the translation coordinate, and obtaining the matching recognition position of the target in the corrected real-time image based on the matching relationship. The method greatly reduces the operation amount under the premise of ensuring the accuracy of target recognition, and improves the recognition speed. BRIEF DESCRIPTION OF DRAWINGS
[0047] Figure 1 A flowchart of a template matching target recognition method based on voting statistical deviation in an embodiment;
[0048] Figure 2 A schematic diagram of a real-time image in an embodiment;
[0049] Figure 3 A real-time image after geometric correction in an embodiment;
[0050] Figure 4 A reference image and a reference edge feature map in an embodiment;
[0051] Figure 5 A real-time edge feature map in an embodiment;
[0052] Figure 6 A feature point diagram of a real-time image after geometric correction and a reference image in an embodiment;
[0053] Figure 7 A statistical voting result diagram in an embodiment;
[0054] Figure 8 A schematic diagram of two groups of real-time images in an experiment;
[0055] Figure 9 A real-time edge feature map extracted from a real-time image in an experiment;
[0056] Figure 10 A feature matching result diagram of two groups of reference images and real-time images in an experiment;
[0057] Figure 11 Fig. 1 is a schematic diagram of matching results of two groups of images in an experiment;
[0058] Figure 12 Fig. 2 is a schematic diagram of matching performance curves of two groups in an experiment;
[0059] Figure 13 Fig. 3 is a schematic diagram of matching recognition results of two groups of images in an experiment;
[0060] Figure 14 Fig. 4 is a structural block diagram of a template matching target recognition device based on voting statistical bias in an embodiment;
[0061] Figure 15 Fig. 5 is an internal structural diagram of a computer device in an embodiment. DETAILED DESCRIPTION
[0062] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0063] As shown in Fig. 1, a template matching target recognition method based on voting statistical bias is provided, comprising the following steps: Figure 1
[0064] Step S100, acquiring a real-time image and a reference image, wherein the reference image contains position information of a target;
[0065] Step S110, performing geometric correction on the real-time image to obtain a corrected real-time image, and extracting edge feature maps of the reference image and the corrected real-time image respectively, which are respectively a reference edge feature map and a real-time edge feature map;
[0066] Step S120, constructing a displacement bias voting coordinate, and calculating displacement biases between each feature point in the reference edge feature map and each feature point in the real-time edge feature map, and performing weighted voting on the coordinates corresponding to the displacement biases in the displacement bias voting coordinate;
[0067] Step S130, traversing the displacement bias voting coordinate to extract a coordinate with the highest number of votes, and taking the coordinate as a translation parameter;
[0068] Step S140, matching the corrected real-time image and the reference image according to the translation coordinate, and obtaining a matching recognition position of the target in the corrected real-time image based on the matching relationship.
[0069] In step S100, the acquired real-time image is an infrared image, and the reference image used for registration is a visible light image, and the size of the reference image is much smaller than that of the real-time image. A matching region is found on the real-time image according to the reference image, and then the position of the target is determined according to the position information of the target in the reference image in the region.
[0070] In step S110, the real-time image is geometrically corrected to obtain a corrected real-time image, Figure 2 is the real-time image, Figure 3 is the real-time image after geometric correction. The edge feature maps of the reference image and the corrected real-time image are extracted respectively, as shown in Figure 4 (a) is the reference image, Figure 4 (b) is the reference edge feature map, as shown in Figure 4 is the real-time edge feature map. As shown in Figure 5 is the feature point diagram of the real-time image after geometric correction and the reference image in one embodiment. Figure 6
[0071] In step S120, the reference edge feature map and the real-time edge feature map are matched. First, a displacement bias voting coordinate is constructed, and each coordinate point on the coordinate represents a different displacement bias value. Then, the displacement bias between each feature point in the reference edge feature map and each feature point in the real-time edge feature map is calculated, and after each displacement bias is calculated, the corresponding coordinate point on the displacement bias voting coordinate is found and the coordinate point is voted. Thus, when all the displacement biases are calculated, the displacement bias corresponding to the coordinate point with the most votes is the translation parameter. The feature point refers to a pixel point.
[0072] Specifically, the positions of the edge points of the real-time image after geometric correction and the reference image are scanned and recorded point by point, and defined as {(x si ,y si )}, i = 1,...,M, which are the positions of the edge points of the real-time image after geometric correction; {(x rj ,y rj}, j = 1,...,N, which are the positions of the edge points of the reference image.
[0073] In this embodiment, in addition to using the position information of the points, the gradient direction information of the points is also considered, that is, the restriction criterion that the directions of the homonymous point pairs should be the same or substantially the same is used. The gradient amplitude and gradient angle information can be obtained at the same time as the edge feature extraction. Let g R , g T be the gradient amplitudes of a pixel in the real-time image after geometric correction and the reference image respectively, be the gradient angles of a pixel in the real-time image after geometric correction and the reference image respectively.
[0074] In order to further improve the matching speed of the reference image and the real-time image, before calculating the displacement deviation between each feature point in the reference edge feature map and each feature point in the real-time edge feature map, it is determined whether to calculate according to the gradient angles of the two.
[0075] It should be noted that, since the matching between the infrared image and the visible light image is performed in the present method, the gray mapping relationship between the infrared image and the visible light image is quite different, and the same region often shows the same or opposite gradient direction, therefore, when the gradient angle restriction is used to improve the algorithm, the gradient inversion phenomenon needs to be considered. There are two solutions to this problem: one is not to modify the value of the gradient direction θ, and when the gradient direction restriction is performed, the allowed gradient direction error is limited to [0, α] or [180, 180 + α], where α is the maximum error value allowed when performing accumulation calculation; the second is to modify the value of the gradient direction θ to limit it within [0, 180], and then limit the allowed gradient direction error to [0, α]. The second gradient angle modification method is used in the present method.
[0076] Specifically, before calculating the displacement deviation between each feature point in the reference edge feature map and each feature point in the real-time edge feature map, the difference between the modified gradient angles of the feature points of the reference edge feature map and the real-time edge feature map is calculated, and according to the calculation result, if the calculation result is within the preset range, the displacement deviation between the two feature points is calculated, and if the calculation result is not within the preset range, the displacement deviation between the two feature points is not calculated.
[0077] In the present embodiment, the preset range is [0, 45°].
[0078] In one embodiment, a voting procedure is used to count the displacement deviation, and the algorithm flow is as follows:
[0079]
[0080] wherein q is a quantization unit (in the present embodiment, it is taken as 1), which represents the maximum integer operation smaller than x, that is, the rounding operation.
[0081] In the present embodiment, when the weighted voting is performed, the weighted value is obtained by weighted accumulation according to the gradient amplitude similarity measure and the gradient angle similarity measure.
[0082] Due to the difference in gray scale between the infrared image and the visible light image, the gradient amplitudes of the two often differ greatly, therefore, when calculating the gradient amplitude similarity measure, the gradient amplitudes should be binarized first.
[0083] Specifically, the gradient magnitude similarity metric is calculated using the following formula:
[0084]
[0085] In formula (1), S R and S T Let represent the gradient magnitudes of the feature points in the binarized baseline edge feature map and the real-time edge feature map, respectively, and α represent the adjustment parameter. In this embodiment, α is set to 2. Furthermore, as shown in formula (1), when the gradient magnitudes of the edge points are the same, the gradient magnitude similarity measure is 1; the greater the difference in gradient magnitudes, the smaller the gradient magnitude similarity measure.
[0086] Specifically, the gradient angle similarity metric is calculated using the following formula:
[0087]
[0088] In formula (2), θ R and θ T Let represent the gradient angles of the feature points in the corrected baseline edge feature map and the real-time edge feature map, respectively, and σ represent the maximum allowable gradient angle error. In this embodiment, σ equals 15°. As can be seen from formula (2), when the gradient directions of the edge points are consistent, the similarity metric value is 1; the greater the difference in gradient directions, the smaller the similarity metric value.
[0089] The final weighted cumulative value is as follows:
[0090] V weight =S g ·S θ (3)
[0091] As shown in formula (3), the accumulated value is variable, taking into account the weighted influence of the amplitude and direction information of the points. A large accumulated value is assigned to point pairs with high similarity, and a small accumulated value is assigned to point pairs with low similarity.
[0092] After weighting the votes based on the coordinates corresponding to each displacement deviation on the displacement deviation voting coordinate system, we can obtain the following: Figure 7 The diagram shows the statistical voting results.
[0093] In step S130, vote C(D) is selected. x D y The maximum value of ) is located at the coordinate (D) corresponding to the displacement deviation voting coordinate. xm D ym This is the translation parameter (t). x ,t y ).
[0094] from Figure 7The highest value of the final voting number "7" corresponds to the coordinate (5, 6) in the top view, and thus the offset of the reference map relative to the real-time map is (5, 6), which is consistent with the result obtained by the sliding window method. However, the present application is smaller than the method by multiple orders of magnitude in terms of computational complexity. Assuming that a and b points are extracted from the reference map and the real-time map, respectively, a is usually much smaller than n*m, and b is much smaller than M*N; the computational complexity of the sliding window method is O(M*N*n*m), and the present method is O(a*b), which is independent of the number of feature points.
[0095] In step S140, the solved translation parameters are used to match the geometrically corrected real-time image and the reference image, and based on the matching correspondence, the position of the target point determined in the reference image is converted to the corresponding position in the geometrically corrected real-time image, and an inverse geometric correction is performed to obtain the matching recognition position of the target point in the front-down real-time image.
[0096] In this paper, two groups of experiments are also performed according to the present method, Figure 8 (a) and Figure 8 (b) are two groups of real-time images, respectively, Figure 9 (a) and Figure 9 (b) are two groups of real-time edge feature maps extracted from the real-time images, respectively, Figure 10 (a) and Figure 10 (b) are two groups of feature matching results of the reference images and the real-time images, respectively, Figure 11 (a) and Figure 11 (b) are two groups of image matching results, respectively, Figure 12 (a) and Figure 12 (b) are two groups of matching performance curve diagrams, respectively, Figure 13 (a) and Figure 13 (b) are two groups of image matching recognition result diagrams, respectively.
[0097] In the above template matching target recognition method based on voting statistical deviation, the obtained real-time image is geometrically corrected, and then the edge feature maps of the reference image containing target position information and the corrected real-time image are extracted, respectively. Then, the displacement deviation voting coordinates are constructed, and the displacement deviation between each feature point in the reference edge feature map and each feature point in the real-time edge feature map is calculated. According to the corresponding coordinates of each displacement deviation in the displacement deviation voting coordinates, weighted voting is performed, and then the highest voting number coordinate is extracted by traversing the displacement deviation voting coordinates. The coordinate is taken as the translation parameter. Finally, the corrected real-time image and the reference image are matched based on the translation coordinates, and the matching recognition position of the target in the corrected real-time image is obtained based on the matching relationship. The present method greatly improves the operation speed and reduces the operation consumption compared with the sliding window method.
[0098] It should be understood that although the steps in the flowchart of FIG. 1 are shown in sequential order, such that each step must be completed before another step begins, no order should be inferred from the ordering of the steps illustrated in the flowchart of FIG. 1, unless a particular order is clearly stated in the specification. Additionally, Figure 1 At least one of the steps in the flowchart of FIG. 1 can include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but can be performed at different times, and the order of the sub-steps or stages is not necessarily sequential, but can be performed in rotation or alternation with other steps or sub-steps or stages of other steps.
[0099] In one embodiment, as shown in FIG. 2, a template matching target recognition device based on voting statistical deviation is provided, comprising an image acquisition module 200, an edge feature map extraction module 210, a displacement deviation voting module 220, a translation parameter acquisition module 230, and a target position recognition module 240, wherein: Figure 14 The image acquisition module 200 is configured to acquire a real-time image and a reference image containing position information of a target.
[0100] The edge feature map extraction module 210 is configured to perform geometric correction on the real-time image to obtain a corrected real-time image, and extract edge feature maps of the reference image and the corrected real-time image, respectively, as a reference edge feature map and a real-time edge feature map.
[0101] The displacement deviation voting module 220 is configured to construct displacement deviation voting coordinates, calculate displacement deviations between each feature point in the reference edge feature map and each feature point in the real-time edge feature map, and perform weighted voting on the coordinates corresponding to the displacement deviations in the displacement deviation voting coordinates.
[0102] The translation parameter acquisition module 230 is configured to traverse the displacement deviation voting coordinates to extract the coordinate with the highest number of votes, and take the coordinate as a translation parameter.
[0103] The target position recognition module 240 is configured to match the corrected real-time image and the reference image according to the translation coordinates, and obtain a matching recognition position of the target in the corrected real-time image based on the matching relationship.
[0104]
[0105] The specific limitations of the template matching target recognition device based on voting statistical deviation can refer to the limitations of the template matching target recognition method based on voting statistical deviation, which will not be repeated here. Each module in the above template matching target recognition device based on voting statistical deviation can be realized by software, hardware and their combination. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so that the processor calls and executes the operations corresponding to each module.
[0106] In one embodiment, a computer device, which can be a terminal, is provided, and an internal structure diagram of the computer device can be as shown in Figure 15 The computer device includes a processor, a memory, a network interface, a display screen and an input device connected by a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is used to communicate with external terminals through network connection. The computer program is executed by the processor to implement a template matching target recognition method based on voting statistical deviation. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0107] Those skilled in the art can understand that Figure 15 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0108] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the following steps:
[0109] Obtaining a real-time image and a reference image containing position information of a target;
[0110] Geometrically correcting the real-time image to obtain a corrected real-time image, and extracting edge feature maps of the reference image and the corrected real-time image respectively, to obtain a reference edge feature map and a real-time edge feature map respectively;
[0111] constructing displacement deviation voting coordinates, and calculating displacement deviations between each feature point in the reference edge feature map and each feature point in the real-time edge feature map, and performing weighted voting on corresponding coordinates of each displacement deviation in the displacement deviation voting coordinates;
[0112] traversing the displacement deviation voting coordinates to extract a coordinate with the highest number of votes, and taking the coordinate as a translation parameter;
[0113] matching the corrected real-time image and the reference image according to the translation coordinate, and obtaining a matching recognition position of the target in the corrected real-time image based on a matching relationship.
[0114] In one embodiment, a computer readable storage medium is provided, and a computer program is stored on the computer readable storage medium. The computer program is executed by a processor to implement the following steps:
[0115] obtaining a real-time image and a reference image, the reference image containing position information of a target;
[0116] performing geometric correction on the real-time image to obtain a corrected real-time image, and extracting edge feature maps of the reference image and the corrected real-time image respectively, as a reference edge feature map and a real-time edge feature map respectively;
[0117] constructing displacement deviation voting coordinates, and calculating displacement deviations between each feature point in the reference edge feature map and each feature point in the real-time edge feature map, and performing weighted voting on corresponding coordinates of each displacement deviation in the displacement deviation voting coordinates;
[0118] traversing the displacement deviation voting coordinates to extract a coordinate with the highest number of votes, and taking the coordinate as a translation parameter;
[0119] matching the corrected real-time image and the reference image according to the translation coordinate, and obtaining a matching recognition position of the target in the corrected real-time image based on a matching relationship.
[0120] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, storage, databases, or other media in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0121] The technical features of the above embodiments can be combined in any way. In order to make the description simple, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the present application.
[0122] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, some modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of the patent of the present application should be subject to the appended claims.
Claims
1. A template matching object recognition method based on voting statistics bias, characterized in that, The method comprises: acquiring a real-time image and a reference image containing position information of a target; performing geometric correction on the real-time image to obtain a corrected real-time image, and extracting edge feature maps of the reference image and the corrected real-time image respectively, namely a reference edge feature map and a real-time edge feature map; calculating the difference between the gradient angles of the corrected feature points of the reference edge feature map and the real-time edge feature map, and judging according to the calculation result; if the calculation result is within a preset range, calculating the displacement deviation between the two feature points, and if the calculation result is not within the preset range, not calculating the displacement deviation between the two feature points; constructing displacement deviation voting coordinates, and calculating the displacement deviation between each feature point in the reference edge feature map and each feature point in the real-time edge feature map; constructing displacement deviation voting coordinates, and performing weighted voting according to the coordinates corresponding to each displacement deviation on the displacement deviation voting coordinates; when performing weighted voting, the weighted values are obtained by weighted accumulation according to the gradient amplitude similarity measure and the gradient angle similarity measure, wherein the gradient amplitude similarity measure is calculated by the following formula: ; In the above formula, and respectively represent the gradient amplitude of the feature points of the binarized reference edge feature map and the real-time edge feature map, represents the adjustment parameter, and the calculation of the gradient angle similarity measure adopts the following formula: ; In the above formulae, and respectively represent the gradient angle of the feature points of the reference edge feature map and the real-time edge feature map after correction, represents the maximum allowable gradient angle error; traversing the displacement deviation voting coordinates to extract the coordinate with the highest voting votes, and taking the coordinate as a translation parameter; matching the corrected real-time image and the reference image according to the translation parameter, and obtaining the matching recognition position of the target in the corrected real-time image based on the matching relationship.
2. The template matching object recognition method of claim 1, wherein, The real-time image is an infrared image.
3. The template matching object recognition method of claim 2, wherein, When extracting the edge feature maps of the reference image and the corrected real-time image, the gradient amplitudes and the gradient angles of each feature point in the reference image and the corrected real-time image are also extracted; performing binarization on the gradient amplitudes of the feature points in the reference image and the corrected real-time image to obtain the binarized gradient amplitudes; correcting the gradient angles of the feature points in the reference image and the corrected real-time image, so that each gradient angle ranges from 0 to 180 degrees.
4. The template matching object recognition method of claim 1, wherein, The preset range is from 0 to 45 degrees.
5. A template matching target recognition device based on voting statistics bias, characterized by, The device implements the template matching target recognition method based on voting statistical deviation according to any one of claims 1 to 4, comprising: an image acquisition module for acquiring a real-time image and a reference image containing position information of a target; an edge feature map extraction module for performing geometric correction on the real-time image to obtain a corrected real-time image, and extracting edge feature maps of the reference image and the corrected real-time image respectively, namely a reference edge feature map and a real-time edge feature map; a displacement deviation voting module for constructing displacement deviation voting coordinates and calculating the displacement deviation between each feature point in the reference edge feature map and each feature point in the real-time edge feature map, and performing weighted voting according to the coordinates corresponding to each displacement deviation on the displacement deviation voting coordinates; a translation parameter acquisition module for traversing the displacement deviation voting coordinates to extract the coordinate with the highest voting votes, and taking the coordinate as a translation parameter; A target position recognition module is configured to match the corrected real-time image and the reference image according to the translation parameter, and obtain a matching recognition position of the target in the corrected real-time image based on the matching relationship. 6.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-5 when the computer program is executed by the processor. The processor implements the steps of the method of any one of claims 1 to 4 when executing the computer program.
Citation Information
Patent Citations
Image texture main direction recognition method oriented to imaging measurement
CN104573698A
Pedestrian detection method based on binary image improved HOG characteristics
CN107038416A