CN110490268A - A kind of feature matching method of the improvement nearest neighbor distance ratio based on cosine similarity - Google Patents
A kind of feature matching method of the improvement nearest neighbor distance ratio based on cosine similarity Download PDFInfo
- Publication number
- CN110490268A CN110490268A CN201910788098.4A CN201910788098A CN110490268A CN 110490268 A CN110490268 A CN 110490268A CN 201910788098 A CN201910788098 A CN 201910788098A CN 110490268 A CN110490268 A CN 110490268A
- Authority
- CN
- China
- Prior art keywords
- description
- distance
- cosine similarity
- formula
- nearest neighbor
- 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; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/46—Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
- G06V10/462—Salient features, e.g. scale invariant feature transforms [SIFT]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The feature matching method of the present invention provides a kind of improvement nearest neighbor distance ratio based on cosine similarity, belongs to the characteristic matching technical field of computer vision field, the present invention.COS distance is added on the basis of traditional nearest neighbor distance ratio based on Euclidean distance and does secondary verification, increases accuracy;It is simultaneously that nearest neighbor distance is more sub than by expanding to the second goal description close and that third is close with the second close goal description recently, to increase the sub recall rate of matching description.
Description
Technical field
The present invention relates to the characteristic matching technology of computer vision field more particularly to a kind of changing based on cosine similarity
Into the feature matching method of nearest neighbor distance ratio.
Background technique
SIFT is one of common Feature Descriptor in traditional computer visual task, it is retouching for image local feature
It states, maintains the invariance to rotation, scaling, brightness change, also have certain Shandong to visual angle change, affine transformation, noise etc.
Stick.Feature Descriptor is to take the neighborhood of 16x16 as sampling window using centered on characteristic point, by the phase of sampled point and characteristic point
Direction is weighted by Gauss window, is included into 4x4 grid, eight directions of each quadrille thus obtain
The vector of 128 dimensions.This vector is exactly the expression to the sampled point and its surrounding pixel information, by calculating different description
Whether distance may determine that they are matched.
K nearest neighbor algorithm (K Nearest Neighbor, KNN) is all target signature description of traversal and reference description
Afterwards, nearest k goal description of distance reference description is found.Usually in the scene of characteristic matching, k=1, i.e. most phase are taken
As describe son.
RANSAC algorithm (Random Sample And Consensus, RANSAC) is by clicking through a pile
Row random sampling is fitted straight line with the point of sampling, and the point that observation meets fitting a straight line accounts for much ratios, is more than some
Threshold value is taken as correct fitting result.Abnormal matching after can be used for Feature Points Matching is rejected.
Due to the prevalence of deep learning in recent years, the local feature extraction and matching in traditional computer vision is gradually by depth
Degree study is substituted.But traditional method has its unique advantage, does not need a large amount of training data training pattern such as, does not need
Very big calculating power and GPU acceleration etc..For the task of less complicated target detection and characteristic matching, traditional method is just
It is enough to be competent at.
But conventional method has the limitation of its own, because of the process not learnt, if the extraction of description encounters bottle
Neck, is difficult to do and optimizes and promoted in the case where not proposing new method, therefore can attempt enterprising from the matching algorithm of description
Row optimization.Under normal conditions, change inviolent reference picture and target image, traditional sheet for blocking not serious, light
Ground Feature Descriptor such as SIFT, SURF, ORB etc. have been sufficiently used for characteristic matching, it is important to how in existing two groups of descriptions
Correct pairing is found in son.Tradition is generally indicated distance between description using Euclidean distance, but due to SIFT
Scheduling algorithm would generally can ignore their spatially similar using only Euclidean distance with the distance dependent of feature vector in space
Degree.
Summary of the invention
In order to solve the above technical problems, the invention proposes a kind of improvement nearest neighbor distance ratio based on cosine similarity
Feature matching method, to help to improve the accuracy of Feature Points Matching.In traditional nearest neighbor distance based on Euclidean distance
COS distance is added than on the basis of and does secondary verification, increases accuracy;Simultaneously by nearest neighbor distance ratio by close with second recently
Goal description expand to the second close and goal description that third is close, to increase the sub recall rate of matching description.
The technical scheme is that
A kind of feature matching method of the improvement nearest neighbor distance ratio based on cosine similarity,
Specific step is as follows
The first step obtains the reference picture and target image of matching;
Second step generates description of two width figures using SIFT algorithm;
Third step traverses all matchings pair of reference picture and target image, calculates the arest neighbors of three nearest neighbours
Distance is than rejecting ungratified description;
4th step calculates cosine similarity than the match point of threshold value for meeting two minimum distances simultaneously;It calculates again remaining
String similarity retains most like candidate description;
5th step uses the matching pair of RANSAC rejecting abnormalities;
6th step finally obtains the match point of meet demand.
Further,
Given at least two images, first part is reference picture, and it is in second part of target image that second part, which is target image,
In find the point to match with first part of reference picture or target.
Further,
For the Feature Descriptor in each reference picture, here shown asDescription in target image is traversed,
Here shown as
First calculate Euclidean distance, retain apart from it is immediate first three, and filter out the condition of being unsatisfactory for according to formula (1)
Pairing description;
The setting of t is to guarantee that distance has discrimination, i.e. nearest description of the distance description small (1- closer than distance second
T) x100%.
Further,
If meeting formula (2) simultaneously, retainWithThen judged again according to formula (3) formula (4), it is no
Then directly retain
Further,
It calculates with reference to descriptionWith goal descriptionBetween cosine similarity when, two features are described
128 dimensional vectors of son calculate inner product.
Further,
If feature vector had done normalization, inner product result is exactly cosine similarity, and process is shown in formula (3), public affairs
Formula (4).
Retain maximum description of cosine similarity and is used as final match point;
After all reference description traversal one time, qualified candidate matches pair are obtained;Then RANSAC is used
Algorithm carries out abnormity point elimination.
The beneficial effects of the invention are as follows
1) cosine similarity is used for evaluating characteristic and describes the distance between son;
2) used improved nearest neighbor distance than promoting match point recall rate;
3) secondary check is carried out to match point using the operation of two steps, promotes accuracy.
Detailed description of the invention
Fig. 1 is workflow schematic diagram of the invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
A kind of feature matching method of improvement nearest neighbor distance ratio based on cosine similarity of the invention gives at least two
Image, first is reference picture, and second is target image, and task is usually to find in second target image and the
The point or target that one reference picture matches, the purpose of the present invention is Optimized Matching logics, promote matched accuracy rate and call together
The rate of returning.
Candidate feature description is generated to two figures first, the algorithm that can be used there are the algorithms most in use such as SIFT, SURF.
Then in each reference picture Feature Descriptor (here shown as) traverse retouching in target image
State son (here shown as), it is different from the Euclidean distance that conventional method calculates between any two and then retains apart from the smallest conduct
Match point, we first calculate Euclidean distance here, retain apart from it is immediate first three, and filter out according to formula (1) discontented
The pairing of sufficient condition describes son, if meeting formula (2) simultaneously, retainsWithThen again according to formula (3) formula (4)
Judged, is otherwise directly retainedThe setting of t be in order to guarantee that distance has a discrimination, i.e., apart from nearest description compare away from
Small (1-t) x100% of description close from second.
It calculates with reference to descriptionWith goal descriptionBetween cosine similarity when, two features are described
128 dimensional vectors of son calculate inner product, if feature vector had done normalization, inner product result is exactly cosine similarity, mistake
Journey is shown in formula (3), formula (4).Retain maximum description of cosine similarity and is used as final match point.
After all reference description traversal one time, available qualified candidate matches pair.Then it uses
RANSAC algorithm carries out abnormity point elimination.This is relatively common algorithm, and which is not described herein again, and rough flow is random sampling four
Group matching pair calculates homography matrix, and by each matching to projecting, the smallest combination of retaining projection sum of the distance is protected
The homography matrix for staying the group to calculate, and set and project again, projector distance is calculated, and given threshold carries out abnormity point elimination.
The foregoing is merely presently preferred embodiments of the present invention, is only used to illustrate the technical scheme of the present invention, and is not intended to limit
Determine protection scope of the present invention.Any modification, equivalent substitution, improvement and etc. done all within the spirits and principles of the present invention,
It is included within the scope of protection of the present invention.
Claims (8)
1. a kind of feature matching method of the improvement nearest neighbor distance ratio based on cosine similarity, which is characterized in that
Specific step is as follows
The first step obtains the reference picture and target image of matching;
Second step generates description of two width figures using SIFT algorithm;
Third step traverses all matchings pair of reference picture and target image, calculates the nearest neighbor distance of three nearest neighbours
Than rejecting ungratified description;
4th step calculates cosine similarity than the match point of threshold value for meeting two minimum distances simultaneously;Cosine phase is calculated again
Like degree, retain most like candidate description;
5th step uses the matching pair of RANSAC rejecting abnormalities;
6th step finally obtains the match point of meet demand.
2. the method according to claim 1, wherein
Given at least two images, first part is reference picture, and second part, which is target image, is looked in second part of target image
To the point or target to match with first part of reference picture.
3. method according to claim 1 or 2, which is characterized in that
For the Feature Descriptor in each reference picture, here shown asDescription in target image is traversed, here
It is expressed as
First calculate Euclidean distance, retain apart from it is immediate first three, and filter out according to formula (1) pairing for the condition of being unsatisfactory for
Description;
The setting of t is to guarantee that distance has discrimination, i.e. nearest description of distance description closer than distance second is small (1-t)
X100%.
4. according to the method described in claim 3, it is characterized in that,
If meeting formula (2) simultaneously, retainWithThen judged again according to formula (3) formula (4), otherwise directly
Connect reservation
5. according to the method described in claim 4, it is characterized in that,
It calculates with reference to descriptionWith goal descriptionBetween cosine similarity when, by two Feature Descriptors
128 dimensional vectors calculate inner product.
6. according to the method described in claim 5, it is characterized in that,
If feature vector had done normalization, inner product result is exactly cosine similarity, and process is shown in formula (3), formula
(4)。
7. according to the method described in claim 6, it is characterized in that,
Retain maximum description of cosine similarity and is used as final match point.
8. the method according to the description of claim 7 is characterized in that
After all reference description traversal one time, qualified candidate matches pair are obtained;Then RANSAC algorithm is used
Carry out abnormity point elimination.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910788098.4A CN110490268A (en) | 2019-08-26 | 2019-08-26 | A kind of feature matching method of the improvement nearest neighbor distance ratio based on cosine similarity |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910788098.4A CN110490268A (en) | 2019-08-26 | 2019-08-26 | A kind of feature matching method of the improvement nearest neighbor distance ratio based on cosine similarity |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110490268A true CN110490268A (en) | 2019-11-22 |
Family
ID=68554042
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910788098.4A Pending CN110490268A (en) | 2019-08-26 | 2019-08-26 | A kind of feature matching method of the improvement nearest neighbor distance ratio based on cosine similarity |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110490268A (en) |
Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102034355A (en) * | 2010-12-28 | 2011-04-27 | 丁天 | Feature point matching-based vehicle detecting and tracking method |
CN103136751A (en) * | 2013-02-05 | 2013-06-05 | 电子科技大学 | Improved scale invariant feature transform (SIFT) image feature matching algorithm |
CN103167247A (en) * | 2013-04-08 | 2013-06-19 | 福州大学 | Video sequence color image stitching method |
CN103440313A (en) * | 2013-08-27 | 2013-12-11 | 复旦大学 | Music retrieval system based on audio fingerprint features |
CN103729651A (en) * | 2014-01-17 | 2014-04-16 | 重庆大学 | Hyperspectral remote sensing image classification method based on manifold neighbor measurement through local spectral angles |
CN103886611A (en) * | 2014-04-08 | 2014-06-25 | 西安煤航信息产业有限公司 | Image matching method suitable for automatically detecting flight quality of aerial photography |
US20140270411A1 (en) * | 2013-03-15 | 2014-09-18 | Henry Shu | Verification of User Photo IDs |
CN104834693A (en) * | 2015-04-21 | 2015-08-12 | 上海交通大学 | Depth-search-based visual image searching method and system thereof |
CN105975975A (en) * | 2016-05-20 | 2016-09-28 | 中国科学技术大学 | Environmental line feature extraction method |
CN107092918A (en) * | 2017-03-29 | 2017-08-25 | 太原理工大学 | It is a kind of to realize that Lung neoplasm sign knows method for distinguishing based on semantic feature and the image retrieval for having supervision Hash |
CN107318084A (en) * | 2016-04-26 | 2017-11-03 | 中兴通讯股份有限公司 | A kind of fingerprint positioning method and device based on optimal similarity |
CN107845106A (en) * | 2017-11-17 | 2018-03-27 | 齐鲁工业大学 | Utilize the medical image registration method of improved NNDR strategies |
CN108255858A (en) * | 2016-12-29 | 2018-07-06 | 北京优朋普乐科技有限公司 | A kind of image search method and system |
CN108416801A (en) * | 2018-02-28 | 2018-08-17 | 哈尔滨工程大学 | A kind of Har-SURF-RAN characteristic point matching methods towards stereo vision three-dimensional rebuilding |
CN108416355A (en) * | 2018-03-09 | 2018-08-17 | 浙江大学 | A kind of acquisition method of the industry spot creation data based on machine vision |
CN109410255A (en) * | 2018-10-17 | 2019-03-01 | 中国矿业大学 | A kind of method for registering images and device based on improved SIFT and hash algorithm |
CN110097093A (en) * | 2019-04-15 | 2019-08-06 | 河海大学 | A kind of heterologous accurate matching of image method |
-
2019
- 2019-08-26 CN CN201910788098.4A patent/CN110490268A/en active Pending
Patent Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102034355A (en) * | 2010-12-28 | 2011-04-27 | 丁天 | Feature point matching-based vehicle detecting and tracking method |
CN103136751A (en) * | 2013-02-05 | 2013-06-05 | 电子科技大学 | Improved scale invariant feature transform (SIFT) image feature matching algorithm |
US20140270411A1 (en) * | 2013-03-15 | 2014-09-18 | Henry Shu | Verification of User Photo IDs |
CN103167247A (en) * | 2013-04-08 | 2013-06-19 | 福州大学 | Video sequence color image stitching method |
CN103440313A (en) * | 2013-08-27 | 2013-12-11 | 复旦大学 | Music retrieval system based on audio fingerprint features |
CN103729651A (en) * | 2014-01-17 | 2014-04-16 | 重庆大学 | Hyperspectral remote sensing image classification method based on manifold neighbor measurement through local spectral angles |
CN103886611A (en) * | 2014-04-08 | 2014-06-25 | 西安煤航信息产业有限公司 | Image matching method suitable for automatically detecting flight quality of aerial photography |
CN104834693A (en) * | 2015-04-21 | 2015-08-12 | 上海交通大学 | Depth-search-based visual image searching method and system thereof |
CN107318084A (en) * | 2016-04-26 | 2017-11-03 | 中兴通讯股份有限公司 | A kind of fingerprint positioning method and device based on optimal similarity |
CN105975975A (en) * | 2016-05-20 | 2016-09-28 | 中国科学技术大学 | Environmental line feature extraction method |
CN108255858A (en) * | 2016-12-29 | 2018-07-06 | 北京优朋普乐科技有限公司 | A kind of image search method and system |
CN107092918A (en) * | 2017-03-29 | 2017-08-25 | 太原理工大学 | It is a kind of to realize that Lung neoplasm sign knows method for distinguishing based on semantic feature and the image retrieval for having supervision Hash |
CN107845106A (en) * | 2017-11-17 | 2018-03-27 | 齐鲁工业大学 | Utilize the medical image registration method of improved NNDR strategies |
CN108416801A (en) * | 2018-02-28 | 2018-08-17 | 哈尔滨工程大学 | A kind of Har-SURF-RAN characteristic point matching methods towards stereo vision three-dimensional rebuilding |
CN108416355A (en) * | 2018-03-09 | 2018-08-17 | 浙江大学 | A kind of acquisition method of the industry spot creation data based on machine vision |
CN109410255A (en) * | 2018-10-17 | 2019-03-01 | 中国矿业大学 | A kind of method for registering images and device based on improved SIFT and hash algorithm |
CN110097093A (en) * | 2019-04-15 | 2019-08-06 | 河海大学 | A kind of heterologous accurate matching of image method |
Non-Patent Citations (5)
Title |
---|
YONG LUO 等: "Robust matching algorithm based on SURF", 《2015 12TH INTERNATIONAL COMPUTER CONFERENCE ON WAVELET ACTIVE MEDIA TECHNOLOGY AND INFORMATION PROCESSING (ICCWAMTIP)》 * |
李为华 等: "一种基于特征点的图像匹配新方法", 《湖北第二师范学院学报》 * |
董守斌 等: "《网络信息检索》", 30 April 2010 * |
薛金龙: "基于角点的图像特征提取与匹配算法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
黄强: "高维欧氏空间中的近似相似性检索", 《中国博士学位论文全文数据库 信息科技辑》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105957015B (en) | A kind of 360 degree of panorama mosaic methods of threaded barrel inner wall image and system | |
CN108010045A (en) | Visual pattern characteristic point error hiding method of purification based on ORB | |
Zhou et al. | Neurvps: Neural vanishing point scanning via conic convolution | |
CN102360421A (en) | Face identification method and system based on video streaming | |
CN103400384A (en) | Large viewing angle image matching method capable of combining region matching and point matching | |
CN106845410B (en) | Flame identification method based on deep learning model | |
CN111192194B (en) | Panoramic image stitching method for curtain wall building facade | |
CN109447036A (en) | A kind of segmentation of image digitization and recognition methods and system | |
Liang et al. | Robust sea-sky-line detection for complex sea background | |
Li et al. | Line segment matching: A benchmark | |
US11023781B2 (en) | Method, apparatus and device for evaluating image tracking effectiveness and readable storage medium | |
CN113095385B (en) | Multimode image matching method based on global and local feature description | |
CN108229500A (en) | A kind of SIFT Mismatching point scalping methods based on Function Fitting | |
CN109191255A (en) | A kind of commodity alignment schemes based on the detection of unsupervised characteristic point | |
CN105809678A (en) | Global matching method for line segment characteristics between two views under short baseline condition | |
Ji et al. | An evaluation of conventional and deep learning‐based image‐matching methods on diverse datasets | |
US20200005078A1 (en) | Content aware forensic detection of image manipulations | |
Liu et al. | Keypoint matching by outlier pruning with consensus constraint | |
CN110490268A (en) | A kind of feature matching method of the improvement nearest neighbor distance ratio based on cosine similarity | |
Zhang et al. | CatmullRom Splines-Based Regression for Image Forgery Localization | |
CN107330436B (en) | Scale criterion-based panoramic image SIFT optimization method | |
CN112085117A (en) | Robot motion monitoring visual information fusion method based on MTLBP-Li-KAZE-R-RANSAC | |
Lee et al. | FRED: Towards a Full Rotation-Equivariance in Aerial Image Object Detection | |
Lin et al. | Fully Test-Time Adaptation for Monocular 3D Object Detection | |
Wang et al. | Application of improved SURF algorithm in real scene matching and recognition |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191122 |