CN106780580A - A kind of quick similarity computational methods between several images - Google Patents
A kind of quick similarity computational methods between several images Download PDFInfo
- Publication number
- CN106780580A CN106780580A CN201611202311.1A CN201611202311A CN106780580A CN 106780580 A CN106780580 A CN 106780580A CN 201611202311 A CN201611202311 A CN 201611202311A CN 106780580 A CN106780580 A CN 106780580A
- Authority
- CN
- China
- Prior art keywords
- image
- hash
- similarity
- hmin
- computational methods
- 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
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
Landscapes
- Image Analysis (AREA)
Abstract
The invention discloses the quick similarity computational methods between a kind of several images, input:Image set p={ imagei, i=1,2...n, f={ featurei, i=1,2...m;Output:Image similarity matrix Sim [p two-by-twoi, pj];computeTrack():Calculate the idf of the SIFT feature of each image;K hash function of construction;All images are carried out with K Hash evaluation;foreach imagei and imagej;Sim[pi, pj]=imageiAnd imagejBetween similarity sim (pi, pj);endfor.The present invention can quickly calculate the similarity between multiple images on the basis of sift Feature Points Matchings, there is provided O (k2n2) complexity algorithm, k is constant, and n is image number.
Description
Technical field
The present invention relates to image processing technique field, specifically, it is related to the quick similarity meter between a kind of several images
Calculation method.
Background technology
High resolution image, it is necessary to set up similarity relation by characteristic matching, and is calculated after feature extraction is carried out
Similarity.If the algorithm performance for calculating similarity is not high, the application set up on this technology path can be had a strong impact on.If
It is that multiple images are calculated two-by-two, performance is worse.Existing algorithm, when the feature point number of image is within 1000 when, similarity
Calculating performance it is substantially out of question.But when feature is counted out to be sharply increased, performance will drop suddenly.Because calculating and characteristic point
Several relations, is correlation of indices.
The content of the invention
It is an object of the invention to the defect for overcoming above-mentioned technology to exist, there is provided the quick similarity between a kind of several images
Computational methods, the method can quickly calculate the similarity between multiple images on the basis of sift Feature Points Matchings,
O (k are provided2n2) complexity algorithm, k is constant, and n is image number.
Its concrete technical scheme is:
A kind of quick similarity computational methods between several images, comprise the following steps:
Input:Image set p={ imagei, i=1,2...n, f={ featurei, i=1,2...m;
Output:Image similarity matrix Sim [p two-by-twoi, pj];
Step 1 computeTrack ():Calculate the idf of the SIFT feature of each image;
Step 2 constructs K hash function;
The all images of step 3 pair carry out K Hash evaluation;
Step 4 foreach imagei and imagej;
Step 5 Sim [pi, pj]=imageiAnd imagejBetween similarity sim (pi, pj);
Step 6 endfor.
Further, computeTrack () calculates the idf inverted indexs of the SIFT feature of each image in step 1,
What is exported is exactly the sparse matrix of distribution situation of each characteristic point on each image.
Further, K hash function is constructed in step 2, defined herein K=50, hash function is unidirectional mapping function, choosing
Select standard more wide in range, as long as can be mapped to [0..R-1] from [0..R-1] can use, main target is exactly uniform
Cover all codomains interval.Using hash function maker, the scope of mapping is specified, can conveniently generate the Hash letter for specifying number
Number.
Further, step 3 China and Kazakhstan what one hopes or wishes for value:Using this K hash function, each characteristic point in each image is carried out
Hash evaluation, is designated as h (featurei), i=1,2...m.Each image imageiAll obtain K hmink(imagei), hmink
(imagei) it is image imageiIn characteristic point element by after hash functional transformations, the characteristic point unit with minimum hash
Plain featurei, now each image dimension is K, is greatly reduced than characteristic point dimension n on original image.
Further, image image in step 4iWith image imagejBetween Similarity Measure, using equation below:
sim(pi, pj)=
|hmink(imagei)∩hmink(imagej)|/hmink(imagei)∪hmink(imagei)
The ratio between common factor and union, as two similarities of image are obtained in K minimum hash.
Compared with prior art, beneficial effects of the present invention are:
The present invention can quickly calculate the similarity between multiple images on the basis of sift Feature Points Matchings,
O (k are provided2n2) complexity algorithm, k is constant, and n is image number.
Specific embodiment
In order that technological means, creation characteristic, reached purpose and effect that the present invention is realized are easy to understand, tie below
Close instantiation and the present invention is expanded on further.
Input:Image set p={ imagei, i=1,2...n, f={ featurei, i=1,2...m;
Output:Image similarity matrix Sim [p two-by-twoi, pj];
1 computeTrack():Calculate the idf of the SIFT feature of each image;
2 K hash functions of construction;
3 pairs of all images carry out K Hash evaluation;
4 foreach imagei and imagej;
5 Sim[pi, pj]=imageiAnd imagejBetween similarity sim (pi, pj);
6 endfor。
Above-mentioned algorithm is described as follows:
1) computeTrack () calculates the idf (inverted index) of the SIFT feature of each image, and output is exactly
The sparse matrix of distribution situation of each characteristic point on each image.
2) K hash function, defined herein K=50 are constructed.Because hash function is unidirectional mapping function, selection mark
Accurate more wide in range, as long as being used by being mapped to [0..R-1] from [0..R-1], main target is exactly uniform covering
All codomains are interval.Using hash function maker, the scope of mapping is specified, can conveniently generate the Hash letter for specifying number
Number.
3) Hash evaluation:Using this K hash function, Hash evaluation is carried out to each characteristic point in each image (every
The information that individual characteristic point is included has corresponding image sequence, picpointed coordinate), it is designated as h (featurei), i=1,2...m.Each
Image imageiAll obtain K hmink(imagei), hmink(imagei) it is image imageiIn characteristic point element pass through
After hash functional transformations, the characteristic point element feature with minimum hashi.Now each image dimension is K, than original
Image on characteristic point dimension n greatly reduce.
4) image imageiWith image imagejBetween Similarity Measure, using equation below:
sim(pi, pj)=
|hmink(imagei)∩hmink(imagej)|/hmink(imagei)∪hmink(imagei)
The ratio between common factor and union, as two similarities of image are obtained in K minimum hash.It is actually direct
Two approximate similarities of image are calculated using Jacarrd distances, checking in an experiment is used enough, because some images
Completely without degree of overlapping, the Similarity Measure between this image should take quick mode to process, if opposite with the inside
All of SIFT feature is done brute-force and is compared, and efficiency will be very low.
So that image resolution is in the case of very big, it is also possible to provide a quick Similarity Measure, algorithm
Time complexity is O (nk).Wherein, n is match point number, and k is a constant value.
The similarity mode algorithm Farenzena algorithm more well-known with several images is contrasted.Farenzena's
Method needs to calculate outside the string point information of characteristic point, in addition it is also necessary to calculated on every image Convex range that it includes and
Two-by-two between image pair characteristic point common factor, computation complexity is O (m2n2), m and n is respectively image quantity and match point quantity.Phase
Than under, the feature that minhash is based on part hash compares, and it is that fixed K is tieed up to calculate dimension, i.e. the number of hash functions, this
Individual quantity is small more than the number of characteristic point, and algorithm complex is:T (n)=O (Kn)+O (K2n2)=O (K2n2)。
On the image of high resolution, the size of K is much smaller than m, therefore the performance of this method similarity-rough set can be obvious
An order of magnitude high.When the performance comparison of both approaches is carried out, Similarity Measure is carried out using the images of 50 or so, it is right
5000 × 4000 original images generate the image of different resolution by resampling, and respectively using SIFT extraction characteristic points,
And use linear hash function generators, 100 hash functions of generation that characteristic point ID is mapped in the scope of 0-1 respectively.
In table 1, use 5 groups of images to carry out the time-consuming of Similarity Measure and compared, it can be found that using the method for Farenzena,
When feature points are less than 1000, and the performance of minhash algorithms is substantially suitable, but when feature count out become especially many when
Wait, performance difference is just apparent.
Table 1
The above, only best mode for carrying out the invention, any one skilled in the art is in the present invention
In the technical scope of disclosure, the simple change or equivalence replacement of the technical scheme that can be become apparent to each fall within of the invention
In protection domain.
Claims (5)
1. quick similarity computational methods between a kind of several images, it is characterised in that comprise the following steps:
Input:Image set p={ imagei, i=1,2...n, f={ featurei, i=1,2...m;
Output:Image similarity matrix Sim [p two-by-twoi, pj];
Step 1 computeTrack ():Calculate the idf of the SIFT feature of each image;
Step 2 constructs K hash function;
The all images of step 3 pair carry out K Hash evaluation;
Step 4 foreach imagei and imagej;
Step 5 Sim [pi, pj]=imageiAnd imagejBetween similarity sim (pi, pj);
Step 6 endfor.
2. quick similarity computational methods between several images according to claim 1, it is characterised in that in step 1
ComputeTrack () calculates the idf inverted indexs of the SIFT feature of each image, and output is exactly that each characteristic point exists
The sparse matrix of the distribution situation on each image.
3. quick similarity computational methods between several images according to claim 1, it is characterised in that structure in step 2
K hash function is made, defined herein K=50, hash function is unidirectional mapping function, selection standard is more wide in range, as long as can
Being mapped to [0..R-1] from [0..R-1] can use, and main target is exactly uniformly to cover all codomains intervals;Using Kazakhstan
Uncommon function generator, specifies the scope of mapping, can conveniently generate the hash function for specifying number.
4. quick similarity computational methods between several images according to claim 1, it is characterised in that step 3 is Sino-Kazakhstan
What one hopes or wishes for value:Using this K hash function, Hash evaluation is carried out to each characteristic point in each image, be designated as h
(featurei), i=1,2...m;Each image imageiAll obtain K hmink(imagei), hmink(imagei) it is image
imageiIn characteristic point element by after hash functional transformations, the characteristic point element feature with minimum hashi。
5. quick similarity computational methods between several images according to claim 1, it is characterised in that shadow in step 4
As imageiWith image imagejBetween Similarity Measure, using equation below:
sim(pi, pj)=
|hmink(imagei)∩hmink(imagej)/hmink(imagei)∪hmink(imagei)
The ratio between common factor and union, as two similarities of image are obtained in K minimum hash.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611202311.1A CN106780580A (en) | 2016-12-23 | 2016-12-23 | A kind of quick similarity computational methods between several images |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611202311.1A CN106780580A (en) | 2016-12-23 | 2016-12-23 | A kind of quick similarity computational methods between several images |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106780580A true CN106780580A (en) | 2017-05-31 |
Family
ID=58897557
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611202311.1A Pending CN106780580A (en) | 2016-12-23 | 2016-12-23 | A kind of quick similarity computational methods between several images |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106780580A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102831234A (en) * | 2012-08-31 | 2012-12-19 | 北京邮电大学 | Personalized news recommendation device and method based on news content and theme feature |
US20140241616A1 (en) * | 2013-02-26 | 2014-08-28 | Adience SER LTD | Matching users across identifiable services based on images |
US20150248710A1 (en) * | 2013-02-26 | 2015-09-03 | Adience Ser Ltd. | Matching users across indentifiable services vased on images |
US9183173B2 (en) * | 2010-03-02 | 2015-11-10 | Microsoft Technology Licensing, Llc | Learning element weighting for similarity measures |
-
2016
- 2016-12-23 CN CN201611202311.1A patent/CN106780580A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9183173B2 (en) * | 2010-03-02 | 2015-11-10 | Microsoft Technology Licensing, Llc | Learning element weighting for similarity measures |
CN102831234A (en) * | 2012-08-31 | 2012-12-19 | 北京邮电大学 | Personalized news recommendation device and method based on news content and theme feature |
US20140241616A1 (en) * | 2013-02-26 | 2014-08-28 | Adience SER LTD | Matching users across identifiable services based on images |
US20150248710A1 (en) * | 2013-02-26 | 2015-09-03 | Adience Ser Ltd. | Matching users across indentifiable services vased on images |
Non-Patent Citations (2)
Title |
---|
ONDREJ CHUM等: "Near Duplicate Image Detection:min-Hash and tf-idf Weighting", 《PROC.BMVC》 * |
佐助O须佐能乎O: "MinHash", 《百度百科》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108229539A (en) | For training the method for neural network, computer program product and device | |
CN103886048B (en) | Cluster-based increment digital book recommendation method | |
CN104008174A (en) | Privacy-protection index generation method for mass image retrieval | |
CN116595208B (en) | Classification method and device for hyperspectral images and electronic equipment | |
CN108763262A (en) | A kind of brand logo search method | |
CN107622270A (en) | Image similarity calculation method and device, method for retrieving similar images and system | |
CN106599227B (en) | Method and device for acquiring similarity between objects based on attribute values | |
WO2020134819A1 (en) | Method for searching face, and related device | |
CN104217222A (en) | Image matching method based on random sampling hash representation | |
CN108122225A (en) | Digital image tampering detection method based on self-adaptive features point | |
CN105488767A (en) | Rapid reconstructing method of compressed sensing image based on least square optimization | |
CN104050675A (en) | Feature point matching method based on triangle description | |
CN109934272A (en) | A kind of image matching method based on full convolutional network | |
Bai et al. | SSDC-DenseNet: A cost-effective end-to-end spectral-spatial dual-channel dense network for hyperspectral image classification | |
Heimann et al. | Distribution of node embeddings as multiresolution features for graphs | |
CN106250918A (en) | A kind of mixed Gauss model matching process based on the soil-shifting distance improved | |
KR20150099964A (en) | Method and apparatus for extracting image feature | |
CN104573036B (en) | A method of representative set of node in the solution two-dimensional space based on distance | |
CN106780580A (en) | A kind of quick similarity computational methods between several images | |
CN105302833A (en) | Content based video retrieval mathematic model establishment method | |
CN108780509A (en) | Image comparison system and method | |
Bacák | Computing medians and means in Hadamard spaces | |
Chen et al. | Distributed randomized singular value decomposition using count sketch | |
CN105808631A (en) | Data dependence based multi-index Hash algorithm | |
CN104615994B (en) | A kind of monitoring image real-time processing method |
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 |
Application publication date: 20170531 |
|
RJ01 | Rejection of invention patent application after publication |