CN116543186A - Image matching method, system, device and medium in photoelectric navigation - Google Patents
Image matching method, system, device and medium in photoelectric navigation Download PDFInfo
- Publication number
- CN116543186A CN116543186A CN202310511383.8A CN202310511383A CN116543186A CN 116543186 A CN116543186 A CN 116543186A CN 202310511383 A CN202310511383 A CN 202310511383A CN 116543186 A CN116543186 A CN 116543186A
- Authority
- CN
- China
- Prior art keywords
- time
- compression
- compressed
- vector
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/75—Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/20—Instruments for performing navigational calculations
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/033—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
- G06F3/0354—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
- G06F3/03543—Mice or pucks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/246—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
- G06T7/248—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments involving reference images or patches
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/62—Extraction of image or video features relating to a temporal dimension, e.g. time-based feature extraction; Pattern tracking
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Remote Sensing (AREA)
- Radar, Positioning & Navigation (AREA)
- Multimedia (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- Medical Informatics (AREA)
- General Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- Computing Systems (AREA)
- Human Computer Interaction (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Automation & Control Theory (AREA)
- Image Analysis (AREA)
Abstract
本发明公开一种光电导航中图像匹配方法、系统、设备及介质,涉及光电导航技术领域;该方法包括:根据得到的t时刻的压缩目标帧与t时刻的压缩参考帧进行相关性计算得到t时刻的输出向量,然后确定t+1时刻的压缩预测矢量,进而判断是否处于设定领域,若否,则更换参考帧;若是,将t+1时刻的压缩预测矢量与t+1时刻的压缩目标帧和t+1时刻的压缩参考帧进行相关性运算,进而确定t+1时刻的压缩运动向量,最终确定t+1时刻最终的运动向量,以确定t+1时刻的移动线路,以使目标光电导航设备在t+1时刻按照t+1时刻的移动线路移动;本发明提高运动向量的计算精度,能够实现图像准确匹配,使得光电导航设备按照移动线路准确移动,提高运动跟踪的准确度。
The invention discloses an image matching method, system, equipment and medium in photoelectric navigation, and relates to the technical field of photoelectric navigation; the method includes: performing correlation calculation based on the obtained compressed target frame at time t and the compressed reference frame at time t to obtain t The output vector at time, and then determine the compressed prediction vector at time t+1, and then judge whether it is in the set area, if not, replace the reference frame; if so, compare the compressed prediction vector at time t+1 with the compressed prediction vector at time t+1 Correlation calculation is performed between the target frame and the compressed reference frame at time t+1, and then the compressed motion vector at time t+1 is determined, and finally the final motion vector at time t+1 is determined to determine the moving route at time t+1, so that The target photoelectric navigation device moves according to the movement route at time t+1 at time t+1; the invention improves the calculation accuracy of the motion vector, can realize accurate image matching, makes the photoelectric navigation device move accurately according to the movement route, and improves the accuracy of motion tracking .
Description
技术领域technical field
本发明涉及光电导航技术领域,特别是涉及一种光电导航中图像匹配方法、系统、设备及介质。The invention relates to the technical field of photoelectric navigation, in particular to an image matching method, system, equipment and medium in photoelectric navigation.
背景技术Background technique
光电导航技术,常用的运动估算方法是:先预设一区间为搜寻范围,然后对参考帧与目标帧进行相关性计算,找到与参考块最具相关性的搜索目标块作为最优匹配块,根据最优匹配块的相对位置,输出运动向量。其中,预设一区间是根据某一预测矢量,确定某一区间,该区间应使得参考帧与目标帧具有最强相关性(理论上具有重叠的图像部分)。In optoelectronic navigation technology, the commonly used motion estimation method is: first preset a range as the search range, then perform correlation calculations on the reference frame and the target frame, and find the search target block most correlated with the reference block as the optimal matching block. According to the relative position of the optimal matching block, the motion vector is output. Wherein, the preset interval is to determine a certain interval according to a certain predictive vector, and this interval should make the reference frame and the target frame have the strongest correlation (theoretically have overlapping image parts).
由于预测矢量与实际的运动矢量可能有差距。根据现有技术中的运动估算方法进行图像匹配能够对预测矢量进行一定范围内的修正,得到实际的运动矢量,使得鼠标在一定速度变化范围内采集的图像能够正确的匹配。其中现有的运动估算方法有全搜索、三步搜索、四步搜索、菱形搜索等方法。There may be a gap between the predicted vector and the actual motion vector. Image matching according to the motion estimation method in the prior art can correct the prediction vector within a certain range to obtain the actual motion vector, so that the images collected by the mouse within a certain speed range can be correctly matched. The existing motion estimation methods include full search, three-step search, four-step search, diamond search and other methods.
但是,当光电导航设备移动速度变化较大时,此时根据现有技术不能对预测矢量进行正确的修正。以3×3邻域为例进行相关性运算,可以对预测矢量进行±1内的修正,即当设备移动时速度变化在1内可以准确计算并跟踪。当设备的移动速度变化达到2或更大时,便无法对预测矢量进行正确的修正,使得得到的当前位移是错误的。就会导致匹配再也无法定位到正确的区间,并找到最优相关性模块。导致的后果是:运动轨迹完全失常。例如,在光学鼠标应用中表现为:鼠标在一些速度下不能正确跟踪运动,导致光标到处乱飞。However, when the moving speed of the photoelectric navigation device changes greatly, the prediction vector cannot be correctly corrected according to the prior art. Taking the 3×3 neighborhood as an example to carry out the correlation calculation, the prediction vector can be corrected within ±1, that is, when the device moves, the speed change can be accurately calculated and tracked within 1. When the movement speed of the device changes by 2 or more, the prediction vector cannot be correctly corrected, so that the obtained current displacement is wrong. It will cause the matching to no longer locate the correct interval and find the optimal correlation module. The consequence is: the trajectory of the movement is completely abnormal. For example, in an optical mouse application, the mouse does not track motion correctly at some speeds, causing the cursor to fly around.
发明内容Contents of the invention
本发明的目的是提供一种光电导航中图像匹配方法、系统、设备及介质,通过提高运动向量的计算精度,实现图像准确匹配,使得光电导航设备按照移动线路准确的移动,提高运动跟踪的准确度。The object of the present invention is to provide an image matching method, system, equipment and medium in photoelectric navigation, by improving the calculation accuracy of motion vectors, accurate matching of images can be realized, so that photoelectric navigation equipment can move accurately according to the moving line, and improve the accuracy of motion tracking Spend.
为实现上述目的,本发明提供了如下方案:To achieve the above object, the present invention provides the following scheme:
一种光电导航中图像匹配方法,所述方法包括:An image matching method in photoelectric navigation, the method comprising:
获取目标光电导航设备在t时刻采集的电子图像,并将t时刻的电子图像作为t时刻的目标帧;当t=1时,t时刻的上一时刻为初始时刻;Obtain 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 previous moment at time t is the initial time;
采用图像压缩法对t时刻的目标帧进行压缩处理,得到t时刻的压缩目标帧;The image compression method is used to compress the target frame at time t to obtain the compressed target frame at time t;
将初始时刻的电子图像作为t时刻的参考帧,并对t时刻的参考帧进行压缩处理,得到t时刻的压缩参考帧;Taking the electronic image at the initial moment as a reference frame at time t, and compressing the reference frame at time t to obtain a compressed reference frame at time t;
根据t时刻的压缩参考帧和t时刻的压缩目标帧进行相关性计算,得到t时刻的输出向量;Perform correlation calculation according to the compressed reference frame at time t and the compressed target frame at time t to obtain an output vector at time t;
根据t个时刻内设定数目的输出向量确定t+1时刻的压缩预测矢量;Determine the compressed predictive vector at t+1 time according to the output vector of the set number in t time;
根据t时刻的输出向量和t+1时刻的压缩预测矢量判断是否处于设定领域;Judging whether it is in the setting field according to the output vector at time t and the compressed prediction vector at time t+1;
若是,根据t+1时刻的压缩预测矢量对t+1时刻的压缩参考帧和t+1时刻的压缩目标帧进行相关性运算,确定t+1时刻的压缩运动向量;If so, performing a correlation operation on the compressed reference frame at t+1 time and the compressed target frame at t+1 time according to the compressed prediction vector at t+1 time, to determine the compressed motion vector at t+1 time;
若否,则将t时刻的目标帧作为t+1时刻的参考帧,并对t+1时刻的参考帧进行压缩处理,得到t+1时刻的压缩参考帧,然后返回“根据t时刻的压缩参考帧和t时刻的压缩目标帧进行相关性计算,得到t时刻的输出向量”步骤;If not, use the target frame at time t as the reference frame at time t+1, and compress the reference frame at time t+1 to obtain the compressed reference frame at time t+1, and then return "According to the compression at time t The reference frame and the compressed target frame at time t carry out correlation calculation to obtain the output vector at time t" step;
根据t+1时刻的压缩运动向量确定t+1时刻最终的运动向量;t+1时刻最终的运动向量用于确定t+1时刻的移动线路,以使目标光电导航设备在t+1时刻按照t+1时刻的移动线路移动。Determine the final motion vector at time t+1 according to the compressed motion vector at time t+1; The mobile line moves at time t+1.
可选地,根据t个时刻内设定数目的输出向量确定t+1时刻的压缩预测矢量,具体包括:Optionally, the compressed prediction vector at time t+1 is determined according to a set number of output vectors within t time periods, specifically including:
当t>1时,在t个时刻内,将在t时刻之前设定数目的输出向量的平均值作为t+1时刻的压缩预测矢量,或将t时刻的输出向量作为t+1时刻的压缩预测矢量;When t>1, within t time, the average value of the set number of output vectors before t time is used as the compressed prediction vector at t+1 time, or the output vector at t time is used as the compressed prediction vector at t+1 time prediction vector;
当t=1时,将t时刻的输出向量作为t+1时刻的压缩预测矢量。When t=1, the output vector at time t is used as the compressed prediction vector at time t+1.
可选地,所述图像压缩法为基于像素复制法的图像压缩方法、基于插值的图像压缩方法或者均值合并的图像压缩方法。Optionally, the image compression method is an image compression method based on pixel replication, an image compression method based on interpolation, or an image compression method based on mean value merging.
可选地,根据t+1时刻的压缩运动向量确定t+1时刻最终的运动向量,具体包括:Optionally, the final motion vector at time t+1 is determined according to the compressed motion vector at time t+1, specifically including:
基于所述图像压缩法,对t+1时刻的压缩运动向量进行解压处理,得到t时刻最终的运动向量。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.
一种光电导航中图像匹配系统,所述系统包括:An image matching system in photoelectric navigation, said system comprising:
图像获取模块,用于获取目标光电导航设备在t时刻采集的电子图像,并将t时刻的电子图像作为t时刻的目标帧;当t=1时,t时刻的上一时刻为初始时刻;The image acquisition module is used to obtain the electronic image collected by the target photoelectric navigation device at time t, and the electronic image at time t is used as the target frame at time t; when t=1, the previous moment at time t is the initial time;
图像处理模块,用于采用图像压缩法对t时刻的目标帧进行压缩处理,得到t时刻的压缩目标帧;The image processing module is used to compress the target frame at time t by using image compression method to obtain the compressed target frame at time t;
压缩参考帧确定模块,用于将初始时刻的电子图像作为t时刻的参考帧,并对t时刻的参考帧进行压缩处理,得到t时刻的压缩参考帧;A compression reference frame determination module is used to use the electronic image at the initial moment as a reference frame at time t, and compress the reference frame at time t to obtain a compressed reference frame at time t;
计算模块,用于根据t时刻的压缩参考帧和t时刻的压缩目标帧进行相关性计算,得到t时刻的输出向量;Calculation module, for performing correlation calculation according to the compression reference frame at time t and the compression target frame at time t, to obtain the output vector at time t;
压缩预测矢量确定模块,用于根据t个时刻内设定数目的输出向量确定t+1时刻的压缩预测矢量;Compressed predictive vector determination module, for determining the compressed predictive vector at t+1 moment according to the output vector of setting number in t time;
判断模块,用于根据t时刻的输出向量和t+1时刻的压缩预测矢量判断是否处于设定领域;Judging module, for judging whether it is in the setting field according to the output vector at time t and the compressed prediction vector at time t+1;
第一确定模块,用于当所述判断模块的结果为是时,根据t+1时刻的压缩预测矢量对t+1时刻的压缩参考帧和t+1时刻的压缩目标帧进行相关性运算,确定t+1时刻的压缩运动向量;The first determination module is used to perform a correlation operation on the compressed reference frame at time t+1 and the compressed target frame at time t+1 according to the compressed prediction vector at time t+1 when the result of the judgment module is yes, Determine the compressed motion vector at time t+1;
第二确定模块,用于当所述判断模块的结果为否时,则将t时刻的目标帧作为t+1时刻的参考帧,并对t+1时刻的参考帧进行压缩处理,得到t+1时刻的压缩参考帧,然后返回“计算模块”;The second determining module is used for when the result of the judging module is no, then use the target frame at time t as the reference frame at time t+1, and compress the reference frame at time t+1 to obtain t+ The compressed reference frame at time 1, and then return to the "calculation module";
运动向量确定模块,用于根据t+1时刻的压缩运动向量确定t+1时刻最终的运动向量;t+1时刻最终的运动向量用于确定t+1时刻的移动线路,以使目标光电导航设备在t+1时刻按照t+1时刻的移动线路移动。The motion vector determination module is used to determine the final motion vector at the time t+1 according to the compressed motion vector at the time t+1; the final motion vector at the time t+1 is used to determine the moving route at the time t+1, so that the target photoelectric navigation The device moves at time t+1 according to the moving route at time t+1.
可选地,所述压缩预测矢量确定模块,具体包括:Optionally, the compressed prediction vector determination module specifically includes:
第一确定子模块,用于当t>1时,在t个时刻内,将在t时刻之前设定数目的输出向量的平均值作为t+1时刻的压缩预测矢量,或将t时刻的输出向量作为t+1时刻的压缩预测矢量;The first determination sub-module is used for when t>1, within t moments, the average value of the output vectors set before the t moment is used as the compressed prediction vector at the t+1 moment, or the output at the t moment The vector is used as the compressed prediction vector at time t+1;
第二确定子模块,用于当t=1时,将t时刻的输出向量作为t+1时刻的压缩预测矢量。The second determination sub-module is configured to use the output vector at time t as the compressed prediction vector at time t+1 when t=1.
可选地,所述图像处理模块采用基于像素复制法的图像压缩方法、基于插值的图像压缩方法或者均值合并的图像压缩方法的图像压缩法,进行压缩处理。Optionally, the image processing module uses an image compression method based on pixel replication, an image compression method based on interpolation, or an image compression method based on mean value combination to perform compression processing.
可选地,所述运动向量确定模块包括:Optionally, the motion vector determination module includes:
确定子模块,用于基于所述图像压缩法,对t+1时刻的压缩运动向量进行解压处理,得到t+1时刻最终的运动向量。The determination sub-module is configured 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.
一种电子设备,包括存储器及处理器,所述存储器用于存储计算机程序,所述处理器运行所述计算机程序以使所述电子设备执行上述所述的光电导航中图像匹配方法。An electronic device includes a memory and a processor, the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the above-mentioned image matching method in optoelectronic navigation.
一种计算机可读存储介质,其存储有计算机程序,所述计算机程序被处理器执行时实现上述所述的光电导航中图像匹配方法。A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned image matching method in optoelectronic navigation is realized.
根据本发明提供的具体实施例,本发明公开了以下技术效果:According to the specific embodiments provided by the invention, the invention discloses the following technical effects:
本发明提供了一种光电导航中图像匹配方法、系统、设备及介质,通过采用图像压缩法进行压缩处理后,确定压缩参考帧和压缩预测矢量,进而通过确定压缩运动向量后得到运动向量,以使目标光电导航设备按照运动向量所提供的移动线路移动;本发明采用图像压缩法能够更准确的表征预测压缩目标帧和压缩参考帧之间的匹配关系,从而使得计算出的运动向量更加的准确,进而通过提高运动向量的计算精度,实现图像准确匹配,使得光电导航设备按照移动线路准确的移动,提高运动跟踪的准确度。The present invention provides an image matching method, system, equipment and medium in photoelectric navigation. After compression processing is carried out by adopting an image compression method, a compressed reference frame and a compressed prediction vector are determined, and a motion vector is obtained after determining a compressed motion vector. Make the target photoelectric navigation device move according to the moving line provided by the motion vector; the present invention uses the image compression method to more accurately characterize the matching relationship between the predicted compressed target frame and the compressed reference frame, so that the calculated motion vector is more accurate , and then by improving the calculation accuracy of motion vectors, accurate image matching can be realized, so that the photoelectric navigation equipment can move accurately according to the moving route, and the accuracy of motion tracking can be improved.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required in the embodiments. Obviously, the accompanying drawings in the following description are only some of the present invention. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without paying creative labor.
图1为本发明实施例提供的光电导航中图像匹配方法的流程图;Fig. 1 is a flowchart of an image matching method in photoelectric navigation provided by an embodiment of the present invention;
图2为本发明实施例提供的光电导航中图像匹配方法在实际应用中的具体流程图;Fig. 2 is a specific flow chart of the practical application of the image matching method in photoelectric navigation provided by the embodiment of the present invention;
图3为本发明实施例提供的搜索区域的示意图;FIG. 3 is a schematic diagram of a search area provided by an embodiment of the present invention;
图4为本发明实施例提供的现有技术中进行匹配的相关性运算的示例一的示意图;FIG. 4 is a schematic diagram of Example 1 of a matching correlation operation in the prior art provided by an embodiment of the present invention;
图5为本发明实施例提供的现有技术中进行匹配的相关性运算的示例二的示意图;FIG. 5 is a schematic diagram of Example 2 of matching correlation calculation in the prior art provided by an embodiment of the present invention;
图6为本发明实施例提供的现有技术中进行匹配的相关性运算的示例三的示意图;FIG. 6 is a schematic diagram of Example 3 of a matching correlation operation in the prior art provided by an embodiment of the present invention;
图7为本发明实施例提供的现有技术中进行匹配的相关性运算的示例四的示意图;FIG. 7 is a schematic diagram of Example 4 of matching correlation calculation in the prior art provided by an embodiment of the present invention;
图8为本发明实施例提供的现有技术中进行匹配的相关性运算的示例五的示意图;FIG. 8 is a schematic diagram of Example 5 of matching correlation operations in the prior art provided by an embodiment of the present invention;
图9为本发明实施例提供的光电导航中图像匹配系统的结构图。Fig. 9 is a structural diagram of an image matching system in photoelectric navigation provided by an embodiment of the present invention.
符号说明:Symbol Description:
图像获取模块-1、图像处理模块-2、压缩参考帧确定模块-3、计算模块-4、压缩预测矢量确定模块-5、判断模块-6、第一确定模块-7、第二确定模块-8、运动向量确定模块-9。Image acquisition module-1, image processing module-2, compression reference frame determination module-3, calculation module-4, compression prediction vector determination module-5, judgment module-6, first determination module-7, second determination module- 8. Motion vector determination module-9.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
本发明的目的是提供一种光电导航中图像匹配方法、系统、设备及介质,通过提高运动向量的计算精度,实现图像准确匹配,使得光电导航设备按照移动线路准确的移动,提高运动跟踪的准确度。The object of the present invention is to provide an image matching method, system, equipment and medium in photoelectric navigation, by improving the calculation accuracy of motion vectors, accurate matching of images can be realized, so that photoelectric navigation equipment can move accurately according to the moving line, and improve the accuracy of motion tracking Spend.
为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more comprehensible, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
当LED光照系统照射目标平面,目标平面反射光进入设备传感器形成电子图像,设备对电子图像进行处理(如图像压缩、图像匹配),获取运动向量,这类设备叫做光电导航设备。When the LED lighting system irradiates the target plane, the reflected light of the target plane enters the device sensor to form an electronic image, and the device processes the electronic image (such as image compression, image matching) to obtain the motion vector. This type of device is called photoelectric navigation device.
在现有技术中,当光电导航设备移动速度变化较大时,即相邻的两帧图像移动量变化较大时,使得根据预测矢量得出来的当前位移是错误的,就会导致匹配再也无法定位到正确的区间,并找到最优相关性模块。比如,在光学鼠标应用中表现为:In the prior art, when the moving speed of the photoelectric navigation device changes greatly, that is, when the movement amount of two adjacent frames of images changes greatly, the current displacement obtained according to the predicted vector is wrong, which will cause the matching to fail again. Unable to locate the correct interval and find the optimal correlation module. For example, in an optical mouse application:
鼠标在一些速度下不能正确跟踪运动,光标到处乱飞。The mouse doesn't track movement properly at some speeds and the cursor flies around.
本发明要解决的技术问题,就是当光电导航设备移动速度变化较大时,能正确计算出当前的运动向量。The technical problem to be solved by the present invention is to correctly calculate the current motion vector when the moving speed of the photoelectric navigation device changes greatly.
本发明在通用流程即运动估计算法中,增加了一个将大阵列图像压缩成小阵列图像,并对压缩图像进行匹配,即通过与通用流程同步的目标帧进行压缩,进行图像匹配以得到准确地运动向量(dx,dy)。以确保光电导航设备在移动速度变化较大时能够正确计算出运动向量。In the general process, that is, the motion estimation algorithm, the present invention adds a function of compressing large array images into small array images, and matching the compressed images, that is, compressing target frames synchronized with the general process, and performing image matching to obtain accurate motion vector (dx, dy). To ensure that the photoelectric navigation equipment can correctly calculate the motion vector when the moving speed changes greatly.
其中,将图像传感器采集的大阵列图像压缩成小阵列图像,简称为压缩阵列。该过程在压缩图像的同时保留原图像的形态和重要特征。Among them, the large array image collected by the image sensor is compressed into a small array image, which is referred to as compressed array for short. This process preserves the morphology and important features of the original image while compressing it.
图像匹配是指图像传感器第一次捕获第一帧图像作为参考图像,即参考帧,第二次捕获第二帧图像作为目标图像,即目标帧;比较参考帧与目标帧,在参考帧和目标帧之间进行运动估算,以判断出目标帧相对于参考帧的移动方向与距离,即运动向量。Image matching means that the image sensor captures the first frame image as a reference image for the first time, that is, the reference frame, and captures the second frame image as the target image for the second time, that is, the target frame; comparing the reference frame with the target frame, the reference frame and the target frame Motion estimation is performed between frames to determine the moving direction and distance of the target frame relative to the reference frame, that is, the motion vector.
运动估算方法:从参考帧中预设一参考块,在目标帧中以一原则选择一像块为起始点,并以起始点为中心的一区间为起始搜索目标块,在一搜寻范围由内向外逐渐扩展搜寻得到与参考块最具相关性的搜索目标块作为最优匹配块,以判断出目标帧相对于参考帧的移动方向与距离(运动向量)。Motion estimation method: preset a reference block from the reference frame, select a block as the starting point in the target frame according to a principle, and search for the target block starting from a section centered on the starting point, and search for the target block in a search range by Gradually expand the search from inside to outside to obtain the search target block most correlated with the reference block as the optimal matching block, so as to determine the moving direction and distance (motion vector) of the target frame relative to the reference frame.
实施例1Example 1
如图1所示,本发明实施例提供了一种光电导航中图像匹配方法,该方法包括:As shown in Figure 1, an embodiment of the present invention provides an image matching method in photoelectric navigation, the method includes:
步骤100:获取目标光电导航设备在t时刻采集的电子图像,并将t时刻的电子图像作为t时刻的目标帧;当t=1时,t时刻的上一时刻为初始时刻。Step 100: Obtain 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 previous time at time t is the initial time.
步骤200:采用图像压缩法对t时刻的目标帧进行压缩处理,得到t时刻的压缩目标帧。具体地,图像压缩法为基于像素复制法的图像压缩方法、基于插值的图像压缩方法或者均值合并的图像压缩方法。Step 200: Compress the target frame at time t by 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 replication, an image compression method based on interpolation, or an image compression method based on mean value merging.
步骤300:将初始时刻的电子图像作为t时刻的参考帧,并对t时刻的参考帧进行压缩处理,得到t时刻的压缩参考帧。Step 300: Use the electronic image at the initial time as a reference frame at time t, and compress the reference frame at time t to obtain a compressed reference frame at time t.
步骤400:根据t时刻的压缩参考帧和t时刻的压缩目标帧进行相关性计算,得到t时刻的输出向量。Step 400: Perform correlation calculation according to the compressed reference frame at time t and the compressed target frame at time t to obtain an output vector at time t.
步骤500:根据t个时刻内设定数目的输出向量确定t+1时刻的压缩预测矢量。Step 500: Determine the compressed prediction vector at time t+1 according to the set number of output vectors within t time periods.
其中,根据t个时刻内设定数目的输出向量确定t+1时刻的压缩预测矢量,具体包括:Wherein, according to the set number of output vectors in the t time period, the compressed prediction vector at the time t+1 is determined, specifically including:
当t>1时,在t个时刻内,将在t时刻之前设定数目的输出向量的平均值作为t+1时刻的压缩预测矢量,或将t时刻的输出向量作为t+1时刻的压缩预测矢量。When t>1, within t time, the average value of the set number of output vectors before t time is used as the compressed prediction vector at t+1 time, or the output vector at t time is used as the compressed prediction vector at t+1 time prediction vector.
当t=1时,将t时刻的输出向量作为t+1时刻的压缩预测矢量。When t=1, the output vector at time t is used as the compressed prediction vector at time t+1.
简而言之,压缩预测矢量可以是上一个时刻的输出向量,也可以是前几个时刻的输出向量的线性关系。即,在前几个时刻的输出向量中选择几个输出向量,对其进行线性运算。In short, the compressed prediction vector can be the output vector at the previous moment, or the linear relationship of the output vectors at several previous moments. That is, several output vectors are selected from the output vectors at several moments, and linear operations are performed on them.
步骤600:根据t时刻的输出向量和t+1时刻的压缩预测矢量判断是否处于设定领域。Step 600: According to the output vector at time t and the compressed prediction vector at time t+1, it is judged whether it is in the set area.
处于设定领域说明压缩参考帧和压缩目标帧两帧相关性强,不需更换参考帧;不处于设定领域则需更换参考帧。Being in the setting field means that the compression reference frame and the compression target frame are highly correlated, and there is no need to replace the reference frame; if it is not in the setting field, the reference frame needs to be replaced.
步骤700:若是,根据t+1时刻的压缩预测矢量对t+1时刻的压缩参考帧和t+1时刻的压缩目标帧进行相关性运算,确定t+1时刻的压缩运动向量。Step 700: If yes, perform a correlation operation on the compressed reference frame at time t+1 and the compressed target frame at time t+1 according to the compressed prediction vector at time t+1, and determine the compressed motion vector at time t+1.
步骤800:若否,则将t时刻的目标帧作为t+1时刻的参考帧,并对t+1时刻的参考帧进行压缩处理,得到t+1时刻的压缩参考帧,然后返回步骤400。Step 800: If not, use the target frame at time t as the reference frame at time t+1, and compress the reference frame at time t+1 to obtain a compressed reference frame at time t+1, and then return to step 400.
步骤900:根据t+1时刻的压缩运动向量确定t+1时刻最终的运动向量;t+1时刻最终的运动向量用于确定t+1时刻的移动线路,以使目标光电导航设备在t+1时刻按照t+1时刻的移动线路移动。Step 900: Determine the final motion vector at time t+1 according to the compressed motion vector at time t+1; the final motion vector at time t+1 is used to determine the moving route at time t+1, so that the target photoelectric navigation device can Time 1 moves according to the movement route at time t+1.
其中,步骤700,具体包括:Wherein, step 700 specifically includes:
基于所述图像压缩法,对t+1时刻的压缩运动向量进行解压处理,得到t+1时刻最终的运动向量。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.
图2为本发明实施例提供的光电导航中图像匹配方法的在实际应用中的具体流程图。在实际应用中,本发明的具体流程如下:Fig. 2 is a specific flow chart of the practical application of the image matching method in photoelectric navigation provided by the embodiment of the present invention. In practical application, the concrete flow process of the present invention is as follows:
一、获取目标光电导航设备采集到的一个电子图像作为参考帧,并获取另一电子图像作为目标帧;即获取一图像作为参考帧ref和其后一图像作为目标帧tar,其中参考帧在满足条件后需要更换,目标帧需每次获取并更新。1. Obtain an electronic image collected by the target photoelectric navigation equipment as a reference frame, and obtain another electronic image as a target frame; that is, obtain one image as a reference frame ref and the subsequent image as a target frame tar, wherein the reference frame meets the requirements of After the condition needs to be replaced, the target frame needs to be acquired and updated every time.
其中,满足的条件为:在搜索领域里进行相关性运算,搜索领域小则相关性运算结果具有局部性,局限性;搜索领域的大小小于某一设定阈值时,判定为不宜进行相关性运算,需要更换参考帧。Among them, the conditions to be met are: the correlation operation is performed in the search field, and the search field is small, so the correlation operation result has locality and limitations; when the search field is smaller than a certain threshold, it is judged that it is not suitable for the correlation operation , the reference frame needs to be replaced.
二、对参考帧和目标帧进行压缩得到压缩参考帧ref_check和压缩目标帧tar_check,其中压缩参考帧和压缩目标帧每次获取并更新。压缩方法例如基于像素复制法的图像压缩,基于插值的图像压缩或者对原方阵2×2、3×3等的小方块取均值合并成一个块的图像压缩等方法。2. Compress the reference frame and the target frame to obtain the compressed reference frame ref_check and the compressed target frame tar_check, wherein the compressed reference frame and the compressed target frame are acquired and updated each time. Compression methods such as image compression based on pixel copy method, image compression based on interpolation, or image compression that takes the mean value of small squares such as 2×2 and 3×3 in the original square matrix and merges them into one block.
三、根据压缩预测矢量(predx_check,predy_check)和上一压缩目标帧与压缩参考帧的实际运动向量,对压缩参考帧和压缩目标帧进行图像匹配得到压缩运动向量(dx_check,dy_check)。其中压缩预测矢量可以是上一个时刻的输出向量,也可以是前几个时刻的输出向量的线性关系。该线性关系可以是前几个输出值的均值或其他,在此不做限定。3. According to the compressed prediction vector (predx_check, predy_check) and the actual motion vector of the last compressed target frame and the compressed reference frame, image matching is performed on the compressed reference frame and the compressed target frame to obtain the compressed motion vector (dx_check, dy_check). The compressed prediction vector can be the output vector at the previous moment, or the linear relationship of the output vectors at several previous moments. The linear relationship may be the mean value of the previous output values or others, which is not limited here.
四、根据压缩运动向量输出运动向量(dx,dy)。可以根据不同的压缩方法输出运动向量。如果按2:1的比例压缩,输出则按1:2的比例输出。4. Output the motion vector (dx, dy) according to the compressed motion vector. Motion vectors can be output according to different compression methods. If compressed at a ratio of 2:1, the output is output at a ratio of 1:2.
根据上一时刻压缩目标帧的位置及当前时刻的压缩预测矢量,可以预测当前时刻压缩目标帧的位置,即根据上一时刻压缩目标帧与对应的压缩参考帧的实际运动向量以及当前时刻的压缩预测矢量,可以得出当前时刻的压缩目标帧与当前时刻的压缩参考帧之间的压缩运动向量。参见图3,将当前时刻的参考帧与当前时刻的目标帧的重叠区域确定为搜索区域(即图3中B)。搜索区域即为前文提到的设定领域。该区域使得当前时刻的参考帧与当前时刻的目标帧具有最强相关性。在搜索区域内确定参考块和目标块,进行相关性运算,修正预测矢量,即可得到当前目标帧相对于上一目标帧的正确的运动向量(dx,dy)。According to the position of the compression target frame at the previous moment and the compression prediction vector at the current moment, the position of the compression target frame at the current moment can be predicted, that is, according to the actual motion vector of the compression target frame at the previous moment and the corresponding compression reference frame and the compression at the current moment The prediction vector can obtain the compression motion vector between the compression target frame at the current moment and the compression reference frame at the current moment. Referring to FIG. 3 , the overlapping area between the reference frame at the current moment and the target frame at the current moment is determined as the search area (ie, B in FIG. 3 ). The search area is the setting area mentioned above. This region makes the reference frame at the current moment have the strongest correlation with the target frame at the current moment. Determine the reference block and the target block in the search area, perform a correlation operation, and modify the prediction vector to obtain the correct motion vector (dx, dy) of the current target frame relative to the previous target frame.
五、在进行下一次的图像匹配时,需要先考虑是否换参考帧。当搜索领域过小时,参考帧与目标帧的相关性不强,可能导致匹配和预测出现误差,则需要把当前目标帧作为参考帧。5. When performing the next image matching, it is necessary to consider whether to change the reference frame first. When the search area is too small, the correlation between the reference frame and the target frame is not strong, which may cause errors in matching and prediction, so the current target frame needs to be used as the reference frame.
六、现有方案以3×3邻域为例进行相关性运算,如九个匹配目标块和参考块进行相关性运算的各个示例,详见图4至图8;可以对预测矢量进行±1内的修正,当设备移动时速度变化在1内可以准确跟踪并计算出运动向量。6. The existing scheme takes a 3×3 neighborhood as an example to perform correlation calculations, such as the examples of correlation calculations performed on nine matching target blocks and reference blocks, see Figure 4 to Figure 8 for details; the prediction vector can be ±1 The correction within , when the device moves, the speed change can be accurately tracked and calculated within 1 of the motion vector.
对预测矢量进行修正是根据预测矢量确定了参考帧中一固定参考块和目标帧中一初始搜索目标块,以初始搜索目标块的中心作为3×3邻域的中心向四周移动匹配,得到与参考块最具相关性的搜索目标块作为最优匹配块,根据最优匹配块与初始搜索目标块的相对位置修正预测矢量。The correction of the predictive vector is to determine a fixed reference block in the reference frame and an initial search target block in the target frame according to the predictive vector, and use the center of the initial search target block as the center of the 3×3 neighborhood to move and match around, and get the same as The most relevant search target block of the reference block is used as the optimal matching block, and the prediction vector is corrected according to the relative position of the optimal matching block and the initial search target block.
具体地,确定参考块与搜索目标块,并将参考块与邻域内多个指定的搜索目标块进行相关性运算,以3×3邻域为例,相关性结果可记为0~9。根据压缩预测矢量,并比较0~9,找到最优相关性值,最优相关性值对应的目标块,即最优匹配块与参考块相对移动位置,将其向相对位置的移动对压缩预测矢量进行修正后作为本次位移的运动向量值(dx,dy)。目标块是在目标帧上的搜索区域内与参考块重叠的一个块以及它的邻域的多个块。Specifically, the reference block and the search target block are determined, and a correlation operation is performed between the reference block and multiple designated search target blocks in the neighborhood. Taking a 3×3 neighborhood as an example, the correlation results can be recorded as 0-9. According to the compressed prediction vector, and compare 0 to 9, find the optimal correlation value, the target block corresponding to the optimal correlation value, that is, the relative movement position between the optimal matching block and the reference block, and move it to the relative position to compress the prediction After the vector is corrected, it is used as the motion vector value (dx, dy) of this displacement. The target block is a block that overlaps with the reference block and its neighbor blocks within the search area on the target frame.
在本发明中,当光电导航设备移动速度变化时,针对图4,以“0”点为中心的搜索目标块与参考目标块进行相关性的运算;然后搜索目标块向左上角移动一格,以“1”点为中心,参见图5。接着,搜索目标块向又上角移动一格,以“3”点为中心,参见图6。以此往复,最后得到的实际最相关性的块见图8。其中,图8中的*号代表初始搜索目标块中的中心点,即图4中以“0”点为中心时的位置。在图8中,最相关匹配块中心点超出3×3邻域。即,当光电导航设备移动速度变化达到2或者更大时,最相关的匹配块中心点超出3×3邻域,导致无法定位到正确的区间,使得光电导航设备的运动轨迹失常。In the present invention, when the moving speed of the photoelectric navigation device changes, with regard to Fig. 4, the search target block centered on the "0" point and the reference target block perform correlation calculations; then the search target block moves one grid to the upper left corner, Take point "1" as the center, see Figure 5. Next, the search target block is moved to the upper corner by one grid, centered on point "3", see Fig. 6 . Repeating this process, the actual most relevant block finally obtained is shown in Figure 8. Wherein, the symbol * in FIG. 8 represents the center point in the initial search target block, that is, the position centered on point “0” in FIG. 4 . In Figure 8, the most relevant matching block center points are outside the 3×3 neighborhood. That is, when the movement speed of the photoelectric navigation device changes by 2 or more, the center point of the most relevant matching block exceeds the 3×3 neighborhood, resulting in the inability to locate the correct interval and making the motion trajectory of the photoelectric navigation device abnormal.
本发明实施例采用压缩算法后,当光电导航设备移动速度变化更大时也可以准确跟踪到。After the compression algorithm is adopted in the embodiment of the present invention, it can also be accurately tracked when the moving speed of the photoelectric navigation device changes greatly.
其中,上述的四,也可以根据压缩运动向量得到一预测矢量,对未压缩的图像再次进行图像匹配并输出运动向量。不局限于本流程,不影响本发明之立意。Wherein, in the above four, a predictive vector may also be obtained according to the compressed motion vector, and image matching is performed on the uncompressed image again to output the motion vector. It is not limited to this process and does not affect the concept of the present invention.
此外,本发明实施例中提及的相关性运算是指参考块与目标块对应的像素点相似性的判断。In addition, the correlation operation mentioned in the embodiment of the present invention refers to the judgment of the similarity of the pixels corresponding to the reference block and the target block.
常见的基于灰度的相关性算法有:绝对中位差(MedianAbsolute Deviation,MAD)、绝对误差和算法(SumofAbsoluteDifferences,SAD)、全卷积网络检测(SingleShotMultiBoxDetector,SSD)等。Common grayscale-based correlation algorithms include: MedianAbsolute Deviation (MAD), sum of absolute errors (SumofAbsoluteDifferences, SAD), fully convolutional network detection (SingleShotMultiBoxDetector, SSD), etc.
在SAD算法中,两匹配块(参考块、目标块)点对点相减,再取绝对值,最后所有绝对值求和。如果目标块与参考块完全相同,那么相关性最优,其SAD值为0。In the SAD algorithm, two matching blocks (reference block, target block) are subtracted point-to-point, then the absolute value is taken, and finally all absolute values are summed. If the target block is exactly the same as the reference block, then the correlation is optimal and its SAD value is 0.
实施例2Example 2
如图9所示,为了执行上述实施例1对应的方法,以实现相应的功能和技术效果,本发明实施例提供了一种光电导航中图像匹配系统,该系统包括:图像获取模块1、图像处理模块2、压缩参考帧确定模块3、计算模块4、压缩预测矢量确定模块5、判断模块6、第一确定模块7、第二确定模块8和运动向量确定模块9。As shown in Figure 9, in order to implement the method corresponding to the above-mentioned embodiment 1 to achieve corresponding functions and technical effects, the embodiment of the present invention provides an image matching system in photoelectric navigation, the system includes: an image acquisition module 1, an image Processing module 2 , compression reference frame determination module 3 , calculation module 4 , compression prediction vector determination module 5 , judgment module 6 , first determination module 7 , second determination module 8 and motion vector determination module 9 .
图像获取模块1,用于获取目标光电导航设备在t时刻采集的电子图像,并将t时刻的电子图像作为t时刻的目标帧;当t=1时,t时刻的上一时刻为初始时刻。The image acquisition module 1 is used to 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 previous time at time t is the initial time.
图像处理模块2,用于采用图像压缩法对t时刻的目标帧进行压缩处理,得到t时刻的压缩目标帧。其中,图像处理模块2采用基于像素复制法的图像压缩方法、基于插值的图像压缩方法或者均值合并的图像压缩方法的图像压缩法,进行压缩处理。The image processing module 2 is configured to compress the target frame at time t by using an image compression method to obtain the compressed target frame at time t. Wherein, the image processing module 2 adopts an image compression method based on pixel duplication, an image compression method based on interpolation, or an image compression method based on mean value combination to perform compression processing.
压缩参考帧确定模块3,用于将初始时刻的电子图像作为t时刻的参考帧,并对t时刻的参考帧进行压缩处理,得到t时刻的压缩参考帧。The compressed reference frame determining module 3 is configured to use the electronic image at the initial time as the reference frame at the time t, and compress the reference frame at the time t to obtain the compressed reference frame at the time t.
计算模块4,用于根据t时刻的压缩参考帧和t时刻的压缩目标帧进行相关性计算,得到t时刻的输出向量。The calculation module 4 is configured to perform correlation calculation according to the compressed reference frame at time t and the compressed target frame at time t to obtain an output vector at time t.
压缩预测矢量确定模块5,用于根据t个时刻内设定数目的输出向量确定t+1时刻的压缩预测矢量。The compressed predictive vector determining module 5 is configured to determine the compressed predictive vector at time t+1 according to a set number of output vectors within t time periods.
其中,压缩预测矢量确定模块5,具体包括:第一确定子模块和第二确定子模块。Wherein, the compression prediction vector determining module 5 specifically includes: a first determining sub-module and a second determining sub-module.
第一确定子模块,用于当t>1时,在t个时刻内,将在t时刻之前设定数目的输出向量的平均值作为t+1时刻的压缩预测矢量,或将t时刻的输出向量作为t+1时刻的压缩预测矢量。The first determination sub-module is used for when t>1, within t moments, the average value of the output vectors set before the t moment is used as the compressed prediction vector at the t+1 moment, or the output at the t moment The vector is used as the compressed prediction vector at time t+1.
第二确定子模块,用于当t=1时,将t时刻的输出向量作为t+1时刻的压缩预测矢量。The second determination sub-module is configured to use the output vector at time t as the compressed prediction vector at time t+1 when t=1.
判断模块6,用于根据t时刻的输出向量和t+1时刻的压缩预测矢量判断是否处于设定领域。The judging module 6 is used for judging whether the output vector at time t and the compressed prediction vector at time t+1 is in the set area.
第一确定模块7,用于当所述判断模块的结果为是时,根据t+1时刻的压缩预测矢量对t+1时刻的压缩参考帧和t+1时刻的压缩目标帧进行相关性运算,确定t+1时刻的压缩运动向量。The first determination module 7 is used to perform a correlation operation on the compressed reference frame at time t+1 and the compressed target frame at time t+1 according to the compressed prediction vector at time t+1 when the result of the judgment module is yes. , to determine the compressed motion vector at time t+1.
第二确定模块8,用于当所述判断模块的结果为否时,则将t时刻的目标帧作为t+1时刻的参考帧,并对t+1时刻的参考帧进行压缩处理,得到t+1时刻的压缩参考帧,然后返回“计算模块4”。The second determination module 8 is used for when the result of the judgment module is no, then use the target frame at time t as the reference frame at time t+1, and compress the reference frame at time t+1 to obtain t +1 the compressed reference frame at the moment, and then return to "computation module 4".
运动向量确定模块9,用于根据t+1时刻的压缩运动向量确定t+1时刻最终的运动向量;t+1时刻最终的运动向量用于确定t+1时刻的移动线路,以使目标光电导航设备在t+1时刻按照t+1时刻的移动线路移动。Motion vector determination module 9 is used to determine the final motion vector at t+1 moment according to the compressed motion vector at t+1 moment; the final motion vector at t+1 moment is used to determine the moving line at t+1 moment, so that the target photoelectric The navigation device moves at time t+1 according to the moving route at time t+1.
具体地,运动向量确定模块9包括:确定子模块。Specifically, the motion vector determination module 9 includes: a determination sub-module.
确定子模块,用于基于所述图像压缩法,对t+1时刻的压缩运动向量进行解压处理,得到t+1时刻最终的运动向量。The determination sub-module is configured 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.
实施例3Example 3
一种电子设备,包括存储器及处理器,存储器用于存储计算机程序,处理器运行计算机程序以使电子设备执行实施例1中的光电导航中图像匹配方法。An electronic device includes a memory and a processor, the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the image matching method in photoelectric navigation in Embodiment 1.
作为一种可选的实施方式,上述电子设备可以是服务器。As an optional implementation manner, the foregoing electronic device may be a server.
在一种实施例中,本发明还提供了一种计算机可读存储介质,其存储有计算机程序,计算机程序被处理器执行时实现实施例1中的光电导航中图像匹配方法。In one embodiment, the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the image matching method in the optoelectronic navigation in Embodiment 1 is realized.
本发明的有益效果:Beneficial effects of the present invention:
1.光电导航设备在移动速度变化较大时,通过图像传感器采集的连续两帧图像之间移动量变化比较大,采用压缩算法比现有技术中所采用的算法更能准确预设参考帧与目标帧具有最强相关性的匹配区间,正确计算出当前的运动向量。1. When the moving speed of the photoelectric navigation equipment changes greatly, the movement amount between two consecutive frames of images collected by the image sensor changes relatively greatly. The compression algorithm is more accurate than the algorithm used in the prior art to preset the reference frame and The target frame has the strongest correlation matching interval, and the current motion vector is correctly calculated.
2.现有技术以3x3邻域为例进行相关性运算,可以对预测矢量进行±1内的修正,即当设备移动时速度变化在1内可以准确计算并跟踪。当设备的移动速度变化达到2或更大时,便无法对预测矢量进行正确的修正。2. The existing technology takes a 3x3 neighborhood as an example to perform correlation calculations, and can correct the prediction vector within ±1, that is, when the device moves, the speed change can be accurately calculated and tracked within 1. When the movement speed of the device changes by 2 or more, the prediction vector cannot be corrected correctly.
采用压缩算法后,以对原方阵进行1/2压缩为例,压缩图像以3×3邻域进行相关性运算,对压缩预测矢量进行±1的修正相当于对现有技术的预测矢量进行±2的修正,即可以准确计算出设备移动速度变化为2时的运动向量。After using the compression algorithm, taking 1/2 compression of the original square matrix as an example, the compressed image is correlated with a 3×3 neighborhood, and the correction of ±1 to the compressed prediction vector is equivalent to performing a correction on the prediction vector of the prior art The correction of ±2 means that the motion vector when the moving speed of the device changes to 2 can be accurately calculated.
3.对于采集的图像比较平坦模糊时,现有技术的图像匹配很容易出错,对图像进行压缩后图像匹配结果正确率提高。3. When the collected image is relatively flat and blurred, the image matching in the prior art is easy to make mistakes, and the correct rate of the image matching result is improved after the image is compressed.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other.
本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处。综上所述,本说明书内容不应理解为对本发明的限制。In this paper, specific examples have been used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; meanwhile, for those of ordinary skill in the art, according to the present invention Thoughts, there will be changes in specific implementation methods and application ranges. In summary, the contents of this specification should not be construed as limiting the present invention.
Claims (10)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310487629 | 2023-05-04 | ||
| CN2023104876292 | 2023-05-04 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116543186A true CN116543186A (en) | 2023-08-04 |
Family
ID=87450085
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310511383.8A Pending CN116543186A (en) | 2023-05-04 | 2023-05-09 | Image matching method, system, device and medium in photoelectric navigation |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116543186A (en) |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20070008829A (en) * | 2005-07-12 | 2007-01-18 | (주)유리시스 | Optical navigation method |
| CN101169693A (en) * | 2007-11-30 | 2008-04-30 | 埃派克森微电子有限公司 | Optical movement sensing method |
| CN101477412A (en) * | 2008-06-27 | 2009-07-08 | 北京希格玛和芯微电子技术有限公司 | Movement perception method with sub-pixel level precision |
| US20090232216A1 (en) * | 2008-03-13 | 2009-09-17 | Sony Corporation | Image processing apparatus and image processing method |
| US20100208820A1 (en) * | 2009-02-18 | 2010-08-19 | Acer Incorporated | Motion estimation approach for real-time embedded multimedia design |
| CN103597836A (en) * | 2011-06-14 | 2014-02-19 | 索尼公司 | Image processing device and method |
| CN112907619A (en) * | 2019-11-18 | 2021-06-04 | 无锡英斯特微电子有限公司 | Sub-pixel precision self-adaptive adjustment method and system in optical navigation |
| CN115661191A (en) * | 2022-10-27 | 2023-01-31 | 无锡英斯特微电子有限公司 | Method, system, equipment and medium for judging zero displacement in photoelectric navigation |
-
2023
- 2023-05-09 CN CN202310511383.8A patent/CN116543186A/en active Pending
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20070008829A (en) * | 2005-07-12 | 2007-01-18 | (주)유리시스 | Optical navigation method |
| CN101169693A (en) * | 2007-11-30 | 2008-04-30 | 埃派克森微电子有限公司 | Optical movement sensing method |
| US20090232216A1 (en) * | 2008-03-13 | 2009-09-17 | Sony Corporation | Image processing apparatus and image processing method |
| CN101477412A (en) * | 2008-06-27 | 2009-07-08 | 北京希格玛和芯微电子技术有限公司 | Movement perception method with sub-pixel level precision |
| US20100208820A1 (en) * | 2009-02-18 | 2010-08-19 | Acer Incorporated | Motion estimation approach for real-time embedded multimedia design |
| CN103597836A (en) * | 2011-06-14 | 2014-02-19 | 索尼公司 | Image processing device and method |
| CN112907619A (en) * | 2019-11-18 | 2021-06-04 | 无锡英斯特微电子有限公司 | Sub-pixel precision self-adaptive adjustment method and system in optical navigation |
| CN115661191A (en) * | 2022-10-27 | 2023-01-31 | 无锡英斯特微电子有限公司 | Method, system, equipment and medium for judging zero displacement in photoelectric navigation |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108470356A (en) | A kind of target object fast ranging method based on binocular vision | |
| CN111709893B (en) | ORB-SLAM2 improved algorithm based on information entropy and sharpening adjustment | |
| US20110074927A1 (en) | Method for determining ego-motion of moving platform and detection system | |
| CN114283198B (en) | A SLAM method based on RGBD sensor to remove dynamic targets | |
| CN110555377A (en) | pedestrian detection and tracking method based on fisheye camera overlook shooting | |
| CN111914756A (en) | Video data processing method and device | |
| CN118570255A (en) | Method and device for detecting and tracking moving target, computer equipment and storage medium | |
| CN114973399A (en) | Human body continuous attitude estimation method based on key point motion estimation | |
| CN115546072B (en) | A method of image distortion correction | |
| CN117974895A (en) | Three-dimensional reconstruction and depth prediction method and system for monocular video of pipeline | |
| CN105338355A (en) | Video analysis method and video analysis apparatus | |
| US20200250839A1 (en) | Moving body detecting device, moving body detecting method, and moving body detecting program | |
| CN109544584B (en) | A method and system for realizing the precision measurement of patrol inspection and image stabilization | |
| Deng et al. | GigaSLAM: Large-Scale Monocular SLAM with Hierarchical Gaussian Splats | |
| CN115661191A (en) | Method, system, equipment and medium for judging zero displacement in photoelectric navigation | |
| CN108765326A (en) | A kind of synchronous superposition method and device | |
| CN116543186A (en) | Image matching method, system, device and medium in photoelectric navigation | |
| CN105263026A (en) | Global vector acquisition method based on probability statistics and image gradient information | |
| JP4283532B2 (en) | Image recognition apparatus and method | |
| TWI736063B (en) | Object detection method for static scene and associated electronic device | |
| CN113128290A (en) | Moving object tracking method, system, device and computer readable storage medium | |
| US8300888B2 (en) | Image displacement detection method | |
| CN118229774A (en) | A visual SLAM system and method for weak texture and dynamic scenes | |
| CN101056411B (en) | Method for detecting image displacement | |
| CN113870307B (en) | Target detection method and device based on inter-frame information |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |