CN110647910A - Image similarity calculation method based on color quantization - Google Patents
Image similarity calculation method based on color quantization Download PDFInfo
- Publication number
- CN110647910A CN110647910A CN201910740774.0A CN201910740774A CN110647910A CN 110647910 A CN110647910 A CN 110647910A CN 201910740774 A CN201910740774 A CN 201910740774A CN 110647910 A CN110647910 A CN 110647910A
- Authority
- CN
- China
- Prior art keywords
- image
- color
- hsv
- similarity calculation
- marked
- 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
- 238000004364 calculation method Methods 0.000 title claims abstract description 26
- 238000013139 quantization Methods 0.000 title claims abstract description 12
- 238000012935 Averaging Methods 0.000 claims description 6
- 239000003086 colorant Substances 0.000 claims description 4
- 238000000034 method Methods 0.000 abstract description 15
- 238000012545 processing Methods 0.000 abstract description 6
- 238000013135 deep learning Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000005259 measurement Methods 0.000 description 3
- 230000011218 segmentation Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000000746 purification Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Images
Classifications
-
- 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/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
- G06V10/751—Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
-
- 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/56—Extraction of image or video features relating to colour
Abstract
The invention discloses an image similarity calculation method based on color quantization, which comprises the following steps: step 1): converting the value of the HSV color space: step 2): carrying out quantitative dimensionality reduction on the converted HSV color space; step 3): given image P to be matcheddAnd Pc(ii) a Step 4): image PdAnd PcEqually dividing into n parts from top to bottom, step 6): deriving an image P from a color quantized component mapdkIs marked as Wdk,k=1,2,3,...,n,WckK is 1,2,3,. cndot, n; step 8): given a threshold T, calculate the color WdkWhether or not it is equal to the color WckK is 1,2, 3. The invention utilizes simple and effective methods in the fields of computer vision and image over-processing to carry out image similarity calculation, utilizes strategies of color space quantization and dimension reduction, not only improves the accuracy of image matching during similarity calculation, but also greatly savesThe time cost is reduced, the real-time requirement on the speed is met, and the method can be applied to various fields needing to calculate the similarity in real time.
Description
Technical Field
The invention relates to the fields of computer vision, image processing and the like, in particular to an image similarity calculation method based on space color quantization.
Background
With the progress of social science and technology, the computer vision technology and the image processing field are rapidly and vigorously developed, and the technology of image similarity matching as an important component of each field of image processing has long become an indispensable technology for the computer vision and the image processing direction, and is applied to each existing or emerging field.
Photo album clustering, face recognition matching, pedestrian re-recognition, vehicle re-recognition and the like, and the image similarity calculation cannot be carried out in the emerging computer vision field which is more hot in recent years. Especially in recent years, with the rise of deep learning, the similarity calculation of images is more hot. The deep learning method has high precision and high accuracy which are not possessed by the traditional image method, and is not only reflected in the aspect of image similarity calculation, but also reflected in the aspect of the computer vision field. For example, classification and identification of objects, detection and tracking of objects, and the like, so that the similarity of images is mostly calculated by adopting a deep learning method in the current emerging field. However, deep learning also has a large disadvantage, and a large amount of data and a large amount of time are required to obtain a final matching result, which is difficult to apply in some real-time image matching and similarity calculation fields.
Therefore, it is very meaningful to be able to complete image similarity matching very accurately with a very small time overhead by using a simple computer vision and image processing method.
Wuhan university, 2014 Zhanghua, a method for calculating image similarity through object position information in an image, and meanwhile, information of a color histogram is introduced for more accurate calculation. The similarity of the images is calculated by performing feature point matching and purification by using a violence algorithm and a random sampling consistency algorithm, wherein the similarity mainly aims at pedestrian images, and feature point extraction and description are performed on multi-scale images by using an improved FAST algorithm and a BRIEF algorithm. The south China university of science and engineering, 2015 Qiyuhui and the like, provides a characteristic distance ordering mode combining measurement learning and sparse representation methods for image matching and similarity calculation, converts extracted image characteristics according to the semi-positive nature of a measurement matrix in the mahalanobis distance to obtain new characteristics, integrates the new characteristics into a sparse model to evaluate the similarity between a test sample and a dictionary, orders individuals with non-zero sparse coefficients in a data set according to standard reconstruction errors by using an iterative sparse coefficient reweighing mode, and judges the similarity between images according to the ordered final result. The university of east China, 2017 Liuna and the like, provides an improved Simese structure based deep convolutional neural network for image matching and similarity calculation. During training, classification and similarity measurement are combined, so that the distance between classes is increased, the distance in the classes is reduced, effective features in the images are extracted, and then the similarity between the two images is calculated by further using a metric learning algorithm. Nanjing post and telecommunications university, 2017 Tangsong, proposes an image similarity calculation method based on salient features, utilizes superpixels to construct a feature space, utilizes a method based on cellular automata to calculate the intrinsic salient features of images, and utilizes a learning ordering method to calculate the similarity between the images.
Although the above documents and methods all refer to image similarity calculation and matching by computer vision and the like, the following disadvantages still exist:
(1) the time cost is too large, a large amount of time is needed for calculating the similarity of the two images, and the method is difficult to play a role in some occasions needing real-time calculation;
(2) the accuracy of similarity matching is not high, the existing similarity calculation method is basically applied to various matching and re-identification fields, but the accuracy of the similarity calculation method caused by the difference between images is not high;
therefore, how to perform image similarity calculation and image matching by a simple and effective method so as to quickly and accurately apply image similarity matching in an application scene in a real-time environment is a problem which needs to be solved at present.
Disclosure of Invention
In order to overcome the defects of the algorithm and the method and improve the efficiency and the accuracy of image similarity calculation, the invention provides an image similarity calculation method based on color quantization.
The technical scheme of the invention is as follows:
an image similarity calculation method based on color quantization is characterized by comprising the following steps:
step 1): the values for the HSV color space are transformed according to the following equation:
wherein H0,S0,V0Value, H, representing the image in the original HSV space1,S1,V1Representing the converted value;
step 2): carrying out quantitative dimensionality reduction on the converted HSV color space;
step 3): given image P to be matcheddAnd Pc;
Step 4): image PdIs divided into n parts from top to bottom, and is marked as a set Cd={Pdk|k=1,2,3,...,n};
Step 5): also image PcIs divided into n parts from top to bottom, and is marked as a set Cc={Pck|k=1,2,3,...,n};
Step 6): traverse set CdMiddle image block PdkCalculating HSV quantitative components of all the pixel points and averaging to obtain an image PdkOf HSV Deriving an image P from a color quantized component mapdkIs marked as Wdk,k=1,2,3,...,n;
Step 7): traverse set CcMiddle image block PckCalculating HSV quantitative components of all the pixel points and averaging to obtain an image PckOf HSV Deriving an image P from a color quantized component mapdkIs marked as Wck,k=1,2,3,...,n;
Step 8): given a threshold T, calculate the color WdkWhether or not it is equal to the color WckN, where N is the number of equal colors, and if N is equal to or greater than T, the image P is determined to be a target image PdAnd PcSimilarly; otherwise, it is determined to be dissimilar.
The invention has the advantages that: the image similarity calculation is carried out by a simple and effective method in the fields of computer vision and image over-processing, and the strategies of color space quantization and dimension reduction are utilized, so that the accuracy of image matching is improved when the similarity calculation is carried out, the time overhead is greatly saved, the real-time requirement is met in the speed, and the method can be applied to various fields needing to calculate the similarity in real time.
Drawings
FIG. 1 is a diagram of HSV space color quantization;
FIG. 2 is an input image to be matched;
FIG. 3 is an image to be searched;
FIG. 4 is a segmentation diagram of an image to be matched;
fig. 5 is a segmentation diagram of an image to be searched.
Detailed Description
The following describes a specific embodiment of the image similarity calculation method based on color quantization according to the present invention based on an example.
Step 1): the values for the HSV color space are transformed according to the following equation:
wherein H0,S0,V0Value, H, representing the image in the original HSV space1,S1,V1Representing the converted value;
step 2): carrying out quantitative dimensionality reduction on the converted HSV color space; in the present embodiment, the colors are divided into ten colors of black, gray, white, red, orange, yellow, green, cyan, blue and purple, which are corresponded to fig. 1;
step 3): given image P to be matcheddAnd Pc(ii) a In the present embodiment, the image PdAnd PcAs shown in fig. 2 and 3;
step 4): image PdIs divided into n parts from top to bottom, and is marked as a set Cd={Pdk1, | k ═ 1,2,3,.., n }; in this embodiment, the value of n is 6, and the specific division result is shown in fig. 4;
step 5): also image PcIs divided into n parts from top to bottom, and is marked as a set Cc={Pck1, | k ═ 1,2,3,.., n }; in this embodiment, the value of n is 6, and the specific division result is shown in fig. 5;
step 6): traverse set CdMiddle image block PdkCalculating HSV quantitative components of all the pixel points and averaging to obtain an image PdkOf HSV Deriving an image P from a color quantized component mapdkIs marked as WdkK is 1,2,3,. cndot, n; in this embodiment, n is 6;
step 7): traverse set CcMiddle image block PckFor each pixel of (1), calculating all pixelsHSV quantization component and averaging to obtain an image PckOf HSV Deriving an image P from a color quantized component mapdkIs marked as WckK is 1,2,3,. cndot, n; in this embodiment, n is 6;
step 8): given a threshold T, calculate the color WdkWhether or not it is equal to the color WckN, where N is equal to N, and if N is equal to or greater than T, the image P is determined to be a target image PdAnd PcSimilarly; otherwise, judging that the two are not similar; in this embodiment, n is 6, T is 3, and if the condition is satisfied, the two images are considered to be similar, otherwise, the two images are considered to be dissimilar.
The embodiments described in this specification are merely illustrative of implementations of the inventive concept and the scope of the present invention should not be considered limited to the specific forms set forth in the embodiments but rather by the equivalents thereof as may occur to those skilled in the art upon consideration of the present inventive concept.
Claims (1)
1. An image similarity calculation method based on color quantization is characterized by comprising the following steps:
step 1): the values for the HSV color space are transformed according to the following equation:
wherein H0,S0,V0Value, H, representing the image in the original HSV space1,S1,V1Representing the converted value;
step 2): carrying out quantitative dimensionality reduction on the converted HSV color space;
step 3): given image P to be matcheddAnd Pc;
Step 4): image PdIs divided into n parts from top to bottom, and is marked as a set Cd={Pdk|k=1,2,3,...,n};
Step 5): also image PcIs divided into n parts from top to bottom, and is marked as a set Cc={Pck|k=1,2,3,...,n};
Step 6): traverse set CdMiddle image block PdkCalculating HSV quantitative components of all the pixel points and averaging to obtain an image PdkOf HSV Deriving an image P from a color quantized component mapdkIs marked as Wdk,k=1,2,3,...,n;
Step 7): traverse set CcMiddle image block PckCalculating HSV quantitative components of all the pixel points and averaging to obtain an image PckOf HSV Deriving an image P from a color quantized component mapdkIs marked as Wck,k=1,2,3,...,n;
Step 8): given a threshold T, calculate the color WdkWhether or not it is equal to the color WckN, where N is the number of equal colors, and if N is equal to or greater than T, the image P is determined to be a target image PdAnd PcSimilarly; otherwise, it is determined to be dissimilar.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910740774.0A CN110647910A (en) | 2019-08-12 | 2019-08-12 | Image similarity calculation method based on color quantization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910740774.0A CN110647910A (en) | 2019-08-12 | 2019-08-12 | Image similarity calculation method based on color quantization |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110647910A true CN110647910A (en) | 2020-01-03 |
Family
ID=69009439
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910740774.0A Pending CN110647910A (en) | 2019-08-12 | 2019-08-12 | Image similarity calculation method based on color quantization |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110647910A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102819582A (en) * | 2012-07-26 | 2012-12-12 | 华数传媒网络有限公司 | Quick searching method for mass images |
CN103699532A (en) * | 2012-09-27 | 2014-04-02 | 中国电信股份有限公司 | Image color retrieval method and system |
CN105022752A (en) * | 2014-04-29 | 2015-11-04 | 中国电信股份有限公司 | Image retrieval method and apparatus |
CN106485266A (en) * | 2016-09-23 | 2017-03-08 | 重庆大学 | A kind of ancient wall classifying identification method based on extraction color characteristic |
-
2019
- 2019-08-12 CN CN201910740774.0A patent/CN110647910A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102819582A (en) * | 2012-07-26 | 2012-12-12 | 华数传媒网络有限公司 | Quick searching method for mass images |
CN103699532A (en) * | 2012-09-27 | 2014-04-02 | 中国电信股份有限公司 | Image color retrieval method and system |
CN105022752A (en) * | 2014-04-29 | 2015-11-04 | 中国电信股份有限公司 | Image retrieval method and apparatus |
CN106485266A (en) * | 2016-09-23 | 2017-03-08 | 重庆大学 | A kind of ancient wall classifying identification method based on extraction color characteristic |
Non-Patent Citations (2)
Title |
---|
元琴: "基于内容的图像检索算法研究", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 * |
杜宇宁 等: "基于二次相似度函数学习的行人再识别", 《计算机学报》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109190752B (en) | Image semantic segmentation method based on global features and local features of deep learning | |
CN109344701B (en) | Kinect-based dynamic gesture recognition method | |
CN107133601B (en) | Pedestrian re-identification method based on generation type confrontation network image super-resolution technology | |
CN111401384B (en) | Transformer equipment defect image matching method | |
CN106683119B (en) | Moving vehicle detection method based on aerial video image | |
CN111104867B (en) | Recognition model training and vehicle re-recognition method and device based on part segmentation | |
CN106845341B (en) | Unlicensed vehicle identification method based on virtual number plate | |
CN107316031A (en) | The image characteristic extracting method recognized again for pedestrian | |
Garg et al. | Delta descriptors: Change-based place representation for robust visual localization | |
CN110889398B (en) | Multi-modal image visibility detection method based on similarity network | |
CN110991389B (en) | Matching method for judging appearance of target pedestrian in non-overlapping camera view angles | |
CN112836671B (en) | Data dimension reduction method based on maximized ratio and linear discriminant analysis | |
CN111339975A (en) | Target detection, identification and tracking method based on central scale prediction and twin neural network | |
CN108734200B (en) | Human target visual detection method and device based on BING (building information network) features | |
CN111079847B (en) | Remote sensing image automatic labeling method based on deep learning | |
CN108960142B (en) | Pedestrian re-identification method based on global feature loss function | |
CN113065426B (en) | Gesture image feature fusion method based on channel perception | |
CN110516525A (en) | SAR image target recognition method based on GAN and SVM | |
Muslihah et al. | Texture characteristic of local binary pattern on face recognition with probabilistic linear discriminant analysis | |
CN110852292B (en) | Sketch face recognition method based on cross-modal multi-task depth measurement learning | |
CN111079543B (en) | Efficient vehicle color identification method based on deep learning | |
CN115131580A (en) | Space target small sample identification method based on attention mechanism | |
Adytia et al. | Indonesian license plate detection and identification using deep learning | |
CN111951234B (en) | Model detection method | |
CN110490210B (en) | Color texture classification method based on t sampling difference between compact channels |
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: 20200103 |