An optical-electric navigation image matching method, system, device and medium

By compressing the images from the photoelectric navigation device, the problem of abnormal motion trajectory when the speed changes was solved, and more accurate motion vector calculation and tracking were achieved.

CN116543186BActive Publication Date: 2026-04-24WUXI INSTER MICROELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUXI INSTER MICROELECTRONICS CO LTD
Filing Date
2023-05-09
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing photoelectric navigation technology cannot accurately correct the predicted vector when the device's moving speed changes significantly, resulting in abnormal motion trajectory, such as the cursor flying erratically at certain speeds in an optical mouse.

Method used

By compressing the images acquired by the optoelectronic navigation device, compressed reference frames and target frames are formed. The compressed motion vector is determined by correlation calculation, and the accuracy of motion vector calculation is improved by using image compression.

Benefits of technology

This technology enables accurate calculation of motion vectors when the moving speed of the photoelectric navigation device changes significantly, ensuring that the device moves along the correct path and improving the accuracy of motion tracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116543186B_ABST
    Figure CN116543186B_ABST
Patent Text Reader

Abstract

The application discloses a kind of photoelectric navigation image matching method, system, equipment and medium, it is related to photoelectric navigation technical field;The method comprises: according to the correlation calculation of obtained t time compressed target frame and t time compressed reference frame, obtain t time output vector, then determine t+1 time compressed prediction vector, further judge whether it is in setting field, if not, then replace reference frame;If yes, the correlation operation of t+1 time compressed prediction vector and t+1 time compressed target frame and t+1 time compressed reference frame is carried out, and then the compressed motion vector of t+1 time is determined, finally determine the final motion vector of t+1 time, to determine the moving line of t+1 time, so that target photoelectric navigation equipment moves according to the moving line of t+1 time at t+1 time;The application improves the calculation precision of motion vector, can realize accurate image matching, so that photoelectric navigation equipment moves accurately according to moving line, improve the accuracy of motion tracking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of optoelectronic navigation technology, and in particular to an image matching method, system, device and medium for optoelectronic navigation. Background Technology

[0002] In photoelectric navigation technology, a common motion estimation method is as follows: First, a pre-defined interval is set as the search range. Then, the correlation between the reference frame and the target frame is calculated, and the target block with the strongest correlation to the reference block is found as the optimal matching block. Based on the relative position of the optimal matching block, the motion vector is output. The pre-defined interval is determined based on a certain predicted vector. This interval should ensure that the reference frame and the target frame have the strongest correlation (theoretically, overlapping image portions).

[0003] Since there may be a discrepancy between the predicted and actual motion vectors, image matching based on existing motion estimation methods can correct the predicted vectors within a certain range, yielding the actual motion vectors. This allows for accurate matching of images captured by the mouse within a certain speed range. Existing motion estimation methods include full search, three-step search, four-step search, and diamond search.

[0004] However, when the speed of the photoelectric navigation device changes significantly, current technology cannot correctly correct the predicted vector. Taking a 3×3 neighborhood as an example, correlation calculation can correct the predicted vector within ±1, meaning that when the device's speed change is within 1, it can be accurately calculated and tracked. When the device's speed change reaches 2 or greater, the predicted vector cannot be correctly corrected, resulting in an incorrect current displacement. This causes the matching to fail to locate the correct interval and find the optimal correlation module. The consequence is that the motion trajectory becomes completely abnormal. For example, in optical mouse applications, this manifests as the mouse failing to track movement correctly at certain speeds, causing the cursor to fly around erratically. Summary of the Invention

[0005] The purpose of this invention is to provide an image matching method, system, device, and medium for photoelectric navigation. By improving the calculation accuracy of motion vectors, accurate image matching is achieved, enabling the photoelectric navigation device to move accurately along the motion path and improving the accuracy of motion tracking.

[0006] To achieve the above objectives, the present invention provides the following solution:

[0007] An image matching method in photoelectric navigation, the method comprising:

[0008] The electronic image collected by the target optoelectronic navigation device at time t is acquired, and the electronic image at time t is used as the target frame at time t; when t=1, the time before time t is the initial time.

[0009] The target frame at time t is compressed using an image compression method to obtain the compressed target frame at time t.

[0010] The electronic image at the initial time is used as the reference frame at time t, and the reference frame at time t is compressed to obtain the compressed reference frame at time t.

[0011] The correlation between the compressed reference frame and the compressed target frame at time t is calculated to obtain the output vector at time t.

[0012] The compression prediction vector at time t+1 is determined based on a set number of output vectors within t time periods;

[0013] Determine whether it is within the set range based on the output vector at time t and the compressed prediction vector at time t+1;

[0014] If so, perform correlation calculations on the compressed reference frame and the compressed target frame at time t+1 based on the compressed prediction vector at time t+1 to determine the compressed motion vector at time t+1.

[0015] If not, the target frame at time t is used as the reference frame at time t+1, and the reference frame at time t+1 is compressed to obtain the compressed reference frame at time t+1. Then, the process returns to the step of "calculating the correlation between the compressed reference frame at time t and the compressed target frame at time t to obtain the output vector at time t".

[0016] The final motion vector at time t+1 is determined based on the compressed motion vector at time t+1; the final motion vector at time t+1 is used to determine the movement path at time t+1 so that the target photoelectric navigation device moves according to the movement path at time t+1.

[0017] Optionally, the compressed prediction vector at time t+1 is determined based on a predetermined number of output vectors within t time periods, specifically including:

[0018] When t>1, within t time intervals, the average of the number of output vectors set before time t will be used as the compressed prediction vector at time t+1, or the output vector at time t will be used as the compressed prediction vector at time t+1.

[0019] When t=1, the output vector at time t is used as the compressed prediction vector at time t+1.

[0020] Optionally, the image compression method is an image compression method based on pixel duplication, an image compression method based on interpolation, or an image compression method based on mean merging.

[0021] Optionally, the final motion vector at time t+1 is determined based on the compressed motion vector at time t+1, specifically including:

[0022] Based on the image compression method, the compressed motion vector at time t+1 is decompressed to obtain the final motion vector at time t.

[0023] An image matching system for photoelectric navigation, the system comprising:

[0024] The image acquisition module is used to acquire the electronic image collected by the target optoelectronic navigation device at time t, and use the electronic image at time t as the target frame at time t; when t=1, the time before time t is the initial time.

[0025] The image processing module is used to compress the target frame at time t using an image compression method to obtain the compressed target frame at time t.

[0026] The compressed reference frame determination module is used to take the electronic image at the initial time as the reference frame at time t, and to compress the reference frame at time t to obtain the compressed reference frame at time t.

[0027] The calculation module is used to perform correlation calculation based on the compressed reference frame and the compressed target frame at time t to obtain the output vector at time t.

[0028] The compression prediction vector determination module is used to determine the compression prediction vector at time t+1 based on a set number of output vectors within time t.

[0029] The judgment module is used to determine whether the target area is within the set range based on the output vector at time t and the compressed prediction vector at time t+1.

[0030] The first determining module is used to determine the compression motion vector at time t+1 by performing correlation calculation on the compression reference frame and the compression target frame at time t+1 based on the compression prediction vector at time t+1 when the result of the determining module is yes.

[0031] The second determining module is used to take the target frame at time t as the reference frame at time t+1 when the result of the determining module is negative, and to compress the reference frame at time t+1 to obtain the compressed reference frame at time t+1, and then return to the "calculation module".

[0032] The motion vector determination module is used to determine the final motion vector at time t+1 based on the compressed motion vector at time t+1. The final motion vector at time t+1 is used to determine the movement path at time t+1 so that the target photoelectric navigation device moves according to the movement path at time t+1.

[0033] Optionally, the compression prediction vector determination module specifically includes:

[0034] The first determining submodule is used to, when t>1, within t time intervals, take the average of the number of output vectors set before time t as the compressed prediction vector at time t+1, or take the output vector at time t as the compressed prediction vector at time t+1.

[0035] The second determining submodule is used to take the output vector at time t as the compressed prediction vector at time t+1 when t=1.

[0036] Optionally, the image processing module uses an image compression method based on pixel duplication, an image compression method based on interpolation, or an image compression method based on mean merging to perform compression processing.

[0037] Optionally, the motion vector determination module includes:

[0038] The determination submodule is used to decompress the compressed motion vector at time t+1 based on the image compression method to obtain the final motion vector at time t+1.

[0039] An electronic device includes a memory and a processor, the memory storing a computer program, and the processor running the computer program to cause the electronic device to perform the image matching method in photoelectric navigation described above.

[0040] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the image matching method in photoelectric navigation described above.

[0041] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0042] This invention provides an image matching method, system, device, and medium for photoelectric navigation. By employing image compression, a compressed reference frame and a compressed prediction vector are determined. Then, a motion vector is obtained by determining the compressed motion vector, enabling the target photoelectric navigation device to move along the path provided by the motion vector. This invention uses image compression to more accurately characterize the matching relationship between the predicted compressed target frame and the compressed reference frame, thus making the calculated motion vector more accurate. By improving the calculation accuracy of the motion vector, accurate image matching is achieved, allowing the photoelectric navigation device to move accurately along the path, thereby improving the accuracy of motion tracking. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 This is a flowchart of an image matching method in photoelectric navigation provided in an embodiment of the present invention;

[0045] Figure 2 This is a flowchart illustrating the specific application of the image matching method in photoelectric navigation provided in this invention.

[0046] Figure 3 A schematic diagram of the search area provided in an embodiment of the present invention;

[0047] Figure 4 This is a schematic diagram illustrating an example of a correlation calculation for matching in the prior art provided in this embodiment of the invention.

[0048] Figure 5 A schematic diagram of Example 2 of performing correlation calculation for matching in the prior art provided in the embodiments of the present invention;

[0049] Figure 6 A schematic diagram of Example 3 of performing correlation calculation for matching in the prior art provided in the embodiments of the present invention;

[0050] Figure 7 A schematic diagram of Example 4 of performing correlation calculations for matching in the prior art provided in this embodiment of the invention;

[0051] Figure 8 A schematic diagram of Example 5 of performing correlation calculation for matching in the prior art provided in the embodiments of the present invention;

[0052] Figure 9 This is a structural diagram of an image matching system in photoelectric navigation provided in an embodiment of the present invention.

[0053] Symbol explanation:

[0054] Image acquisition module-1, image processing module-2, compressed reference frame determination module-3, calculation module-4, compressed prediction vector determination module-5, judgment module-6, first determination module-7, second determination module-8, motion vector determination module-9. Detailed Implementation

[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0056] The purpose of this invention is to provide an image matching method, system, device, and medium for photoelectric navigation. By improving the calculation accuracy of motion vectors, accurate image matching is achieved, enabling the photoelectric navigation device to move accurately along the motion path and improving the accuracy of motion tracking.

[0057] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0058] When an LED lighting system illuminates a target plane, the reflected light enters the device's sensor to form an electronic image. The device processes the electronic image (such as image compression and image matching) to obtain the motion vector. This type of device is called an optoelectronic navigation device.

[0059] In existing technologies, when the moving speed of the photoelectric navigation device changes significantly—that is, when the movement amount changes significantly between two adjacent frames—the current displacement calculated from the predicted vector becomes incorrect. This causes the matching process to fail to locate the correct interval and find the optimal correlation module. For example, this manifests in optical mouse applications as follows:

[0060] The mouse cannot track movement correctly at certain speeds, and the cursor flies around randomly.

[0061] The technical problem to be solved by this invention is to accurately calculate the current motion vector when the moving speed of the photoelectric navigation device changes significantly.

[0062] This invention adds a step to the general motion estimation algorithm: compressing a large array of images into a smaller array and matching the compressed images. Specifically, it compresses target frames synchronized with the general process and performs image matching to obtain accurate motion vectors (dx, dy). This ensures that the photoelectric navigation device can correctly calculate motion vectors even when the moving speed changes significantly.

[0063] This process involves compressing a large array of images acquired by an image sensor into a smaller array of images, a process known as image compression. This process preserves the original image's shape and key features while compressing the image.

[0064] Image matching refers to the process where an image sensor first captures a first frame image as a reference image (reference frame), and then captures a second frame image as a target image (target frame). The reference frame and the target frame are compared, and motion estimation is performed between them to determine the direction and distance of movement of the target frame relative to the reference frame, i.e., the motion vector.

[0065] Motion estimation method: A reference block is preset in the reference frame. In the target frame, a pixel block is selected as the starting point according to a certain principle. The search target block is started from an interval centered on the starting point. The search range is gradually expanded from the inside to the outside to obtain the search target block that is most relevant to the reference block as the optimal matching block, so as to determine the movement direction and distance (motion vector) of the target frame relative to the reference frame.

[0066] Example 1

[0067] like Figure 1 As shown, this embodiment of the invention provides an image matching method in photoelectric navigation, the method comprising:

[0068] Step 100: Acquire the electronic image collected by the target photoelectric navigation device at time t, and use the electronic image at time t as the target frame at time t; when t=1, the time before time t is the initial time.

[0069] Step 200: Compress the target frame at time t using an image compression method to obtain the compressed target frame at time t. Specifically, the image compression method is an image compression method based on pixel duplication, an image compression method based on interpolation, or an image compression method based on mean merging.

[0070] Step 300: Use the electronic image at the initial time as the reference frame at time t, and compress the reference frame at time t to obtain the compressed reference frame at time t.

[0071] Step 400: Calculate the correlation between the compressed reference frame and the compressed target frame at time t to obtain the output vector at time t.

[0072] Step 500: Determine the compression prediction vector at time t+1 based on the set number of output vectors within time t.

[0073] Specifically, determining the compressed prediction vector at time t+1 based on a predetermined number of output vectors within t time periods includes:

[0074] When t>1, within t time intervals, the average of the number of output vectors set before time t will be used as the compressed prediction vector at time t+1, or the output vector at time t will be used as the compressed prediction vector at time t+1.

[0075] When t=1, the output vector at time t is used as the compressed prediction vector at time t+1.

[0076] In short, the compressed prediction vector can be the output vector from the previous time step, or it can be a linear relationship between the output vectors from several previous time steps. That is, several output vectors are selected from the output vectors from the previous time steps, and a linear operation is performed on them.

[0077] Step 600: Determine whether the target region is within the specified range based on the output vector at time t and the compressed prediction vector at time t+1.

[0078] If the frame is within the defined range, it means that the compression reference frame and the compression target frame are highly correlated and there is no need to change the reference frame; if the frame is not within the defined range, then the reference frame needs to be changed.

[0079] Step 700: If yes, perform correlation calculations on the compressed reference frame and the compressed target frame at time t+1 based on the compressed prediction vector at time t+1 to determine the compressed motion vector at time t+1.

[0080] Step 800: If not, then take the target frame at time t as the reference frame at time t+1, compress the reference frame at time t+1 to obtain the compressed reference frame at time t+1, and then return to step 400.

[0081] Step 900: Determine the final motion vector at time t+1 based on the compressed motion vector at time t+1; the final motion vector at time t+1 is used to determine the movement path at time t+1 so that the target photoelectric navigation device moves according to the movement path at time t+1.

[0082] Step 700 specifically includes:

[0083] Based on the image compression method, the compressed motion vector at time t+1 is decompressed to obtain the final motion vector at time t+1.

[0084] Figure 2 The flowchart illustrates the specific application of the image matching method in photoelectric navigation provided by this invention. In practical application, the specific process of this invention is as follows:

[0085] 1. Acquire an electronic image collected by the target optoelectronic navigation device as a reference frame, and acquire another electronic image as the target frame; that is, acquire one image as the reference frame ref and the next image as the target frame tar. The reference frame needs to be replaced after the conditions are met, and the target frame needs to be acquired and updated each time.

[0086] The conditions to be met are as follows: if the relevance calculation is performed within the search domain, and the search domain is small, the relevance calculation result will have locality and limitations; if the size of the search domain is less than a certain set threshold, it is determined that the relevance calculation is not suitable and the reference frame needs to be replaced.

[0087] 2. The reference frame and target frame are compressed to obtain the compressed reference frame ref_check and the compressed target frame tar_check. The compressed reference frame and compressed target frame are acquired and updated each time. Compression methods include image compression based on pixel duplication, image compression based on interpolation, or image compression that averages and merges small squares (2×2, 3×3, etc.) of the original matrix into a single block.

[0088] 3. Based on the compressed prediction vectors (predx_check, predy_check) and the actual motion vectors of the previous compressed target frame and the compressed reference frame, image matching is performed on the compressed reference frame and the compressed target frame to obtain compressed motion vectors (dx_check, dy_check). The compressed prediction vectors can be the output vector from the previous time step, or a linear relationship between the output vectors from previous time steps. This linear relationship can be the average of the previous output values ​​or other values, and is not limited here.

[0089] IV. Output the motion vector (dx, dy) based on the compressed motion vector. Different compression methods can be used to output the motion vector. If compressed at a 2:1 ratio, the output will be at a 1:2 ratio.

[0090] Based on the position of the target frame at the previous moment and the compression prediction vector at the current moment, the position of the target frame at the current moment can be predicted. That is, based on the actual motion vectors of the target frame and the corresponding compression reference frame at the previous moment, and the compression prediction vector at the current moment, the compression motion vector between the target frame and the reference frame at the current moment can be derived. See also... Figure 3 The overlapping area between the current reference frame and the current target frame is defined as the search area (i.e., Figure 3 (B) The search area is the defined region mentioned earlier. This region ensures the strongest correlation between the current reference frame and the current target frame. By determining the reference block and target block within the search area, performing correlation calculations, and correcting the prediction vector, the correct motion vector (dx, dy) of the current target frame relative to the previous target frame can be obtained.

[0091] 5. When performing the next image matching, it is necessary to consider whether to change the reference frame. When the search neighborhood is too small, the correlation between the reference frame and the target frame is not strong, which may lead to errors in matching and prediction. In this case, the current target frame needs to be used as the reference frame.

[0092] VI. The existing scheme takes a 3×3 neighborhood as an example for correlation calculation. For various examples of correlation calculation between nine matching target blocks and reference blocks, please refer to [link to relevant documentation]. Figures 4 to 8 It can correct the predicted vector within ±1, and accurately track and calculate the motion vector when the speed change is within 1 when the device moves.

[0093] The prediction vector is corrected by determining a fixed reference block in the reference frame and an initial search target block in the target frame based on the prediction vector. The center of the initial search target block is used as the center of a 3×3 neighborhood and the matching is moved outwards to obtain the search target block that is most relevant to the reference block as the optimal matching block. The prediction vector is then corrected based on the relative position of the optimal matching block and the initial search target block.

[0094] Specifically, a reference block and a target block are determined, and correlation calculations are performed between the reference block and multiple specified target blocks in its neighborhood. Taking a 3×3 neighborhood as an example, the correlation results can be denoted as 0 to 9. Based on the compressed prediction vector and comparing 0 to 9, the optimal correlation value is found. The target block corresponding to the optimal correlation value, i.e., the optimal matching block, is the relative movement position of the reference block. The movement of this target block to its relative position is used to correct the compressed prediction vector and is then used as the motion vector value (dx, dy) for this displacement. The target block is a block that overlaps with the reference block and multiple blocks in its neighborhood within the search area on the target frame.

[0095] In this invention, when the moving speed of the photoelectric navigation device changes, [the following is applied]: Figure 4 The search target block centered at point "0" is correlated with the reference target block; then the search target block moves one grid to the upper left corner, centered at point "1", see [link to relevant documentation]. Figure 5 Next, the target block is moved one space to the upper right corner, centered at point "3". (See below) Figure 6 This process is repeated until the most relevant block is finally obtained. Figure 8 .in, Figure 8 The asterisk (*) in the text represents the center point of the initial search target block, i.e. Figure 4 The position centered at point "0". Figure 8 In this case, the center point of the most relevant matching block exceeds the 3×3 neighborhood. That is, when the speed change of the photoelectric navigation device reaches 2 or greater, the center point of the most relevant matching block exceeds the 3×3 neighborhood, resulting in the inability to locate the correct interval and causing the motion trajectory of the photoelectric navigation device to become abnormal.

[0096] The present invention employs a compression algorithm, which enables accurate tracking even when the moving speed of the photoelectric navigation device changes significantly.

[0097] In the fourth step mentioned above, a predicted vector can also be obtained based on the compressed motion vector, and image matching can be performed again on the uncompressed image to output the motion vector. This is not limited to this process and does not affect the intent of the invention.

[0098] Furthermore, the correlation operation mentioned in the embodiments of the present invention refers to the judgment of the similarity between the pixels corresponding to the reference block and the target block.

[0099] Common grayscale-based correlation algorithms include: Median Absolute Deviation (MAD), Sum of Absolute Differences (SAD), and Single-Shot MultiBox Detector (SSD).

[0100] In the SAD algorithm, two matching blocks (reference block and target block) are subtracted point-to-point, their absolute values ​​are taken, and finally, all absolute values ​​are summed. If the target block and the reference block are completely identical, then the correlation is optimal, and its SAD value is 0.

[0101] Example 2

[0102] like Figure 9 As shown, in order to perform the method corresponding to Embodiment 1 above and achieve the corresponding functions and technical effects, this embodiment of the invention provides an image matching system in photoelectric navigation. The system includes: an image acquisition module 1, an image processing module 2, a compressed reference frame determination module 3, a calculation module 4, a compressed prediction vector determination module 5, a judgment module 6, a first determination module 7, a second determination module 8, and a motion vector determination module 9.

[0103] Image acquisition module 1 is used to acquire the electronic image collected by the target optoelectronic navigation device at time t, and use the electronic image at time t as the target frame at time t; when t=1, the time before time t is the initial time.

[0104] Image processing module 2 is used to compress the target frame at time t using image compression methods to obtain the compressed target frame at time t. Specifically, image processing module 2 employs image compression methods based on pixel replication, interpolation, or mean merging for compression.

[0105] The compressed reference frame determination module 3 is used to take the electronic image at the initial time as the reference frame at time t, and to compress the reference frame at time t to obtain the compressed reference frame at time t.

[0106] Calculation module 4 is used to perform correlation calculation based on the compressed reference frame and the compressed target frame at time t to obtain the output vector at time t.

[0107] The compression prediction vector determination module 5 is used to determine the compression prediction vector at time t+1 based on a set number of output vectors within time t.

[0108] The compression prediction vector determination module 5 specifically includes: a first determination submodule and a second determination submodule.

[0109] The first determining submodule is used to, when t>1, within t time intervals, take the average of the number of output vectors set before time t as the compressed prediction vector at time t+1, or take the output vector at time t as the compressed prediction vector at time t+1.

[0110] The second determining submodule is used to take the output vector at time t as the compressed prediction vector at time t+1 when t=1.

[0111] The judgment module 6 is used to determine whether the target area is within the set range based on the output vector at time t and the compressed prediction vector at time t+1.

[0112] The first determining module 7 is used to determine the compression motion vector at time t+1 by performing correlation calculation on the compression reference frame and the compression target frame at time t+1 based on the compression prediction vector at time t+1 when the result of the determining module is yes.

[0113] The second determining module 8 is used to take the target frame at time t as the reference frame at time t+1 when the result of the determining module is negative, and to compress the reference frame at time t+1 to obtain the compressed reference frame at time t+1, and then return to the "calculation module 4".

[0114] The motion vector determination module 9 is used to determine the final motion vector at time t+1 based on the compressed motion vector at time t+1; the final motion vector at time t+1 is used to determine the movement path at time t+1 so that the target photoelectric navigation device moves according to the movement path at time t+1.

[0115] Specifically, the motion vector determination module 9 includes: a determination submodule.

[0116] The determination submodule is used to decompress the compressed motion vector at time t+1 based on the image compression method to obtain the final motion vector at time t+1.

[0117] Example 3

[0118] An electronic device includes a memory and a processor. The memory stores a computer program, and the processor runs the computer program to cause the electronic device to perform the image matching method in photoelectric navigation as described in Embodiment 1.

[0119] As an alternative implementation, the aforementioned electronic device may be a server.

[0120] In one embodiment, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the image matching method in photoelectric navigation in Embodiment 1.

[0121] The beneficial effects of this invention are:

[0122] 1. When the moving speed of the photoelectric navigation device changes significantly, the amount of motion between two consecutive frames of images acquired by the image sensor changes considerably. The compression algorithm used is more accurate than the algorithm used in the existing technology in pre-setting the matching interval with the strongest correlation between the reference frame and the target frame, and correctly calculates the current motion vector.

[0123] 2. Existing technology, using a 3x3 neighborhood as an example, performs correlation calculations and can correct the predicted vector within ±1. That is, when the device moves, speed changes within 1 can be accurately calculated and tracked. However, when the device's speed changes by 2 or more, the predicted vector cannot be correctly corrected.

[0124] After adopting the compression algorithm, taking the original square matrix as an example of 1 / 2 compression, the compressed image performs correlation calculations in a 3×3 neighborhood. Correcting the compressed prediction vector by ±1 is equivalent to correcting the prediction vector of the existing technology by ±2, which means that the motion vector when the device's moving speed changes by 2 can be accurately calculated.

[0125] 3. When the acquired image is relatively flat and blurry, the existing image matching technology is prone to errors. After compressing the image, the accuracy of the image matching result is improved.

[0126] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0127] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. An image matching method in photoelectric navigation, characterized in that, The method includes: The electronic image collected by the target optoelectronic navigation device at time t is acquired, and the electronic image at time t is used as the target frame at time t; when t=1, the time before time t is the initial time. The target frame at time t is compressed using an image compression method to obtain the compressed target frame at time t. The electronic image at the initial time is used as the reference frame at time t, and the reference frame at time t is compressed to obtain the compressed reference frame at time t. The correlation between the compressed reference frame and the compressed target frame at time t is calculated to obtain the output vector at time t. The compression prediction vector at time t+1 is determined based on a set number of output vectors within t time periods; Determine whether it is within the set range based on the output vector at time t and the compressed prediction vector at time t+1; If so, perform correlation calculations on the compressed reference frame and the compressed target frame at time t+1 based on the compressed prediction vector at time t+1 to determine the compressed motion vector at time t+1. If not, the target frame at time t is used as the reference frame at time t+1, and the reference frame at time t+1 is compressed to obtain the compressed reference frame at time t+1. Then, the process returns to the step "Calculate the correlation between the compressed reference frame at time t and the compressed target frame at time t to obtain the output vector at time t". The final motion vector at time t+1 is determined based on the compressed motion vector at time t+1; the final motion vector at time t+1 is used to determine the movement path at time t+1 so that the target photoelectric navigation device moves according to the movement path at time t+1. If the frame is within the defined range, it means that the compression reference frame and the compression target frame are highly correlated and there is no need to change the reference frame; if the frame is not within the defined range, the reference frame needs to be changed. The final motion vector at time t+1 is determined based on the compressed motion vector at time t+1, specifically including: Based on the image compression method, the compressed motion vector at time t+1 is decompressed to obtain the final motion vector at time t.

2. The image matching method in photoelectric navigation according to claim 1, characterized in that, The compressed prediction vector at time t+1 is determined based on a predetermined number of output vectors within t time periods, specifically including: When t>1, within t time intervals, the average of the number of output vectors set before time t will be used as the compressed prediction vector at time t+1, or the output vector at time t will be used as the compressed prediction vector at time t+1. When t=1, the output vector at time t is used as the compressed prediction vector at time t+1.

3. The image matching method in photoelectric navigation according to claim 1, characterized in that, The image compression method is a pixel-based image compression method, an interpolation-based image compression method, or a mean-merging image compression method.

4. An image matching system for photoelectric navigation, characterized in that, The system includes: The image acquisition module is used to acquire the electronic image collected by the target optoelectronic navigation device at time t, and use the electronic image at time t as the target frame at time t; when t=1, the time before time t is the initial time. The image processing module is used to compress the target frame at time t using an image compression method to obtain the compressed target frame at time t. The compressed reference frame determination module is used to take the electronic image at the initial time as the reference frame at time t, and to compress the reference frame at time t to obtain the compressed reference frame at time t. The calculation module is used to perform correlation calculation based on the compressed reference frame and the compressed target frame at time t to obtain the output vector at time t. The compression prediction vector determination module is used to determine the compression prediction vector at time t+1 based on a set number of output vectors within time t. The judgment module is used to determine whether the target area is within the set range based on the output vector at time t and the compressed prediction vector at time t+1. The first determining module is used to determine the compression motion vector at time t+1 by performing correlation calculation on the compression reference frame and the compression target frame at time t+1 based on the compression prediction vector at time t+1 when the result of the determining module is yes. The second determining module is used to take the target frame at time t as the reference frame at time t+1 when the result of the determining module is negative, and to compress the reference frame at time t+1 to obtain the compressed reference frame at time t+1, and then return to the "calculation module". The motion vector determination module is used to determine the final motion vector at time t+1 based on the compressed motion vector at time t+1; the final motion vector at time t+1 is used to determine the movement path at time t+1 so that the target photoelectric navigation device moves according to the movement path at time t+1. If the frame is within the defined range, it means that the compression reference frame and the compression target frame are highly correlated and there is no need to change the reference frame; if the frame is not within the defined range, the reference frame needs to be changed. The final motion vector at time t+1 is determined based on the compressed motion vector at time t+1, specifically including: Based on the image compression method, the compressed motion vector at time t+1 is decompressed to obtain the final motion vector at time t.

5. The image matching system in photoelectric navigation according to claim 4, characterized in that, The compressed prediction vector determination module specifically includes: The first determining submodule is used to, when t>1, within t time intervals, take the average of the number of output vectors set before time t as the compressed prediction vector at time t+1, or take the output vector at time t as the compressed prediction vector at time t+1. The second determination submodule is used to take the output vector at time t as the compressed prediction vector at time t+1 when t=1.

6. The image matching system in photoelectric navigation according to claim 4, characterized in that, The image processing module performs compression processing using image compression methods based on pixel duplication, interpolation, or mean merging.

7. The image matching system in photoelectric navigation according to claim 4, characterized in that, The motion vector determination module includes: The determination submodule is used to decompress the compressed motion vector at time t+1 based on the image compression method to obtain the final motion vector at time t+1.

8. An electronic device, characterized in that, The device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the image matching method in photoelectric navigation as described in any one of claims 1 to 3.

9. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the image matching method in photoelectric navigation as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Adaptive adjustment method and system for sub-pixel precision in optical navigation

    CN112907619A

  • Method, system and equipment for judging zero displacement in photoelectric navigation and medium

    CN115661191A