CN107958073B - Particle cluster algorithm optimization-based color image retrieval method - Google Patents
Particle cluster algorithm optimization-based color image retrieval method Download PDFInfo
- Publication number
- CN107958073B CN107958073B CN201711281707.4A CN201711281707A CN107958073B CN 107958073 B CN107958073 B CN 107958073B CN 201711281707 A CN201711281707 A CN 201711281707A CN 107958073 B CN107958073 B CN 107958073B
- Authority
- CN
- China
- Prior art keywords
- image
- color
- feature vector
- similarity measure
- feature
- 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.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/58—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- G06F16/583—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
- G06F16/5838—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using colour
-
- 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/50—Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
- G06V10/507—Summing image-intensity values; Histogram projection analysis
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Library & Information Science (AREA)
- Multimedia (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Databases & Information Systems (AREA)
- Image Analysis (AREA)
Abstract
本发明公开了一种基于粒子集群算法优化的彩色图像检索方法,属于图像检索技术领域,本发明首先分别提取图像库中各个图像的底层特征并保存到图片特征库;然后为不同的图像特征描述分配不同的相似度度量公式;再通过PSO算法训练获得数据库相似度度量的权值;在进行图像检索处理时,对查询图像进行相应的底层特征的提取,并通过比对查询图像和目标数据库中提取特征的描述符,并基于训练好的相似度度量权值,对不同特征的相似度度量做统一排序,并返回前K张最相近的图片作为检索结果。与现有技术相比,本发明结合和优化了各种特征提取方式,通过对多个特征描述符的组合,提高了CBIR检索系统的检索精度。
The invention discloses a color image retrieval method optimized based on particle cluster algorithm, and belongs to the technical field of image retrieval. The invention firstly extracts the underlying features of each image in an image database and saves them in the image feature database; and then describes the different image features. Assign different similarity measurement formulas; then train the PSO algorithm to obtain the weights of the database similarity measurement; when performing image retrieval processing, extract the corresponding underlying features of the query image, and compare the query image with the target database. The descriptors of the features are extracted, and based on the trained similarity measure weights, the similarity measures of different features are sorted uniformly, and the top K most similar pictures are returned as the retrieval result. Compared with the prior art, the present invention combines and optimizes various feature extraction methods, and improves the retrieval accuracy of the CBIR retrieval system by combining multiple feature descriptors.
Description
技术领域technical field
本发明属于图像处理和计算机视觉技术领域,具体涉及一种彩色图像检索方法。The invention belongs to the technical field of image processing and computer vision, and in particular relates to a color image retrieval method.
背景技术Background technique
基于内容的图像检索方法(content-based image retrieval,CBIR)指的是查询条件本身就是一个图像,或者是对于图像内容的描述,其建立索引的方式是通过提取底层特征,然后通过计算比较这些特征和查询条件之间的距离,来决定两个图片的相似程度。从上个世纪70年代以来,基于内容的图像检索一直是一个热门研究领域,目前主流的搜索引擎都推出了自己的图片搜索功能。Content-based image retrieval (CBIR) refers to that the query condition itself is an image, or a description of the image content, and its indexing method is to extract the underlying features, and then compare these features by computing and the distance between the query conditions to determine the similarity of the two images. Since the 1970s, content-based image retrieval has been a hot research field, and the current mainstream search engines have launched their own image search functions.
现有的CBIR技术主要以计算机视觉、模式识别、图像处理、图像理解等领域的知识为基础,再引入新的媒体数据表示方法和数据模型来对图片特征进行建模。与此同时,为了提高检索的精度,CBIR还逐渐涉及到认知科学、人工智能、人机交互、信息检索等领域,通过采用关联反馈和上下文分析等技术来对检索的结果进行优化,以便设计出性能可靠、运行高效的检索系统。在现有的技术中,如颜色、纹理、轮廓、形状、空间位置等底层图像特征属于较早使用且已经比较成熟的技术。在这些底层特征中,使用频率最高的特征是颜色、形状、纹理。The existing CBIR technology is mainly based on knowledge in the fields of computer vision, pattern recognition, image processing, and image understanding, and then introduces new media data representation methods and data models to model image features. At the same time, in order to improve the accuracy of retrieval, CBIR also gradually involves cognitive science, artificial intelligence, human-computer interaction, information retrieval and other fields. A retrieval system with reliable performance and efficient operation is developed. In the existing technology, the underlying image features such as color, texture, outline, shape, spatial position, etc. belong to the earlier used and relatively mature technology. Among these low-level features, the most frequently used features are color, shape, and texture.
不同的特征对图像信息的描述有不同的侧重点,仅用单个特征当作图像特征描述符的CBIR系统运用场景非常窄,不能适应现代社会关于图片检索系统的要求,因此引入了融合多个特征在CBIR方案。融合多种特征的CBIR系统带来了另一个问题,由于不同的特征在相似度匹配上有存在差异,采用统一的相似度度量标准来进行相似性判断是不准确的,可能会降低检索的效果。因此在融合多特征的CBIR系统中采用多个相似性度量标准可以很好的提高系统的效果。Different features have different emphasis on the description of image information. The CBIR system that only uses a single feature as an image feature descriptor has very narrow application scenarios and cannot meet the requirements of modern society for image retrieval systems. Therefore, the fusion of multiple features is introduced. in the CBIR program. The CBIR system that integrates multiple features brings another problem. Since different features have differences in similarity matching, it is inaccurate to use a unified similarity metric for similarity judgment, which may reduce the effect of retrieval. . Therefore, the use of multiple similarity metrics in the fusion of multi-feature CBIR system can greatly improve the effect of the system.
除了图像特征提取之外,另一个难点就是对特征的组织建模。在数字图像的底层特征提取的过程中,有多种不同的建模方法。以颜色空间为例,对颜色空间建模的方式有RGB、HSV、CLEL*a*b*和CLEL*u*v*等不同的颜色模型。而对颜色量化又大体可以分为分割算法和聚类算法两种方式。分割算法的基本思想就是将图像中出现频率最高的M重色彩作为调色板,然后将其余颜色按照距离最近准则映射到调色板中,从而重构图像层次感。聚类算法则先选择若干个聚类中心,然后按照某种组合对颜色进行迭代聚类,直到找到最合适的聚类为止,常用的聚类方法有KMeans,模糊CMeans等。除此之外,还有对颜色空间实现大致划分,以HSV为例,将亮度按照饱和度划分为多个频段,统计各个频段的灰度数量。这种方法最常用的就是颜色直方图和色矩。形状特征描述提取常用方法有Freeman链码,曲率空间描述符,傅里叶描述符,小波描述符和边界矩阵。纹理分析方法是获取纹理定性和定量描述过程。纹理分析包括4种:统计分析方法,结构分析方法,模型分析和频谱分析方法。近些年来,局部二值模式(Local Binary Pattern,LBP)是最常用的统计分析纹理特征的方法,由于LBP相对简单,计算量低,不受光照等因素的影响,因此在纹理分析和人脸识别方面用途广泛。模型分析方法包括Gibbs模型,马尔科夫模型(Markov Random Field,MRF)等。频谱纹理分析方法中傅里叶变换,小波变换和Gabor变换等。In addition to image feature extraction, another difficulty is modeling the organization of features. In the process of extracting the underlying features of digital images, there are many different modeling methods. Taking color space as an example, there are different color models such as RGB, HSV, CLEL*a*b* and CLEL*u*v* for modeling the color space. The color quantization can be roughly divided into two methods: segmentation algorithm and clustering algorithm. The basic idea of the segmentation algorithm is to use the most frequently occurring M colors in the image as the palette, and then map the rest of the colors to the palette according to the closest distance criterion, thereby reconstructing the image hierarchy. The clustering algorithm first selects several cluster centers, and then iteratively clusters the colors according to a certain combination until the most suitable cluster is found. Commonly used clustering methods include KMeans, fuzzy CMeans, etc. In addition, there is a rough division of the color space. Taking HSV as an example, the brightness is divided into multiple frequency bands according to saturation, and the number of gray levels in each frequency band is counted. The most commonly used methods are color histograms and color moments. Common methods for shape feature description extraction include Freeman chain code, curvature space descriptor, Fourier descriptor, wavelet descriptor and boundary matrix. Texture analysis method is the process of obtaining qualitative and quantitative description of texture. Texture analysis includes 4 kinds: statistical analysis method, structural analysis method, model analysis and spectrum analysis method. In recent years, Local Binary Pattern (LBP) is the most commonly used method for statistical analysis of texture features. Because LBP is relatively simple, has low computational complexity and is not affected by factors such as illumination, it is widely used in texture analysis and face analysis. Recognition is widely used. Model analysis methods include Gibbs model, Markov Random Field (MRF) and so on. Fourier transform, wavelet transform and Gabor transform in spectral texture analysis methods.
尽管CBIR技术已经研究了几十年,但是仍有许多关键问题有待解决。总结下来主要包括三个方面:图像特征的有效提取、图片相似性以及非相似性的定义、底层图片特征和高层语意之间的语意鸿沟。因此,需要提供更加优化的算法,以弥补现阶段图像检索的不足,从而满足用户图像检索的实际多方位需求。Although CBIR technology has been studied for decades, many key issues remain to be addressed. To sum up, it mainly includes three aspects: the effective extraction of image features, the definition of image similarity and dissimilarity, and the semantic gap between low-level image features and high-level semantics. Therefore, it is necessary to provide a more optimized algorithm to make up for the shortcomings of the current image retrieval, so as to meet the actual multi-faceted needs of the user's image retrieval.
发明内容SUMMARY OF THE INVENTION
本发明的发明目的在于:针对上述存在的问题,提供一种基于粒子集群算法优化的彩色图像检索方法,以提高图像检索方法的检索精度。The purpose of the present invention is to provide a color image retrieval method optimized based on the particle cluster algorithm to improve the retrieval accuracy of the image retrieval method in view of the above existing problems.
本发明的基于粒子集群算法优化的彩色图像检索方法,包括下列步骤:The color image retrieval method optimized based on the particle cluster algorithm of the present invention comprises the following steps:
1、基于粒子集群算法训练相似度度量权重:1. Train the similarity measure weight based on the particle cluster algorithm:
101:将不同类型的查询图像作为训练样本,并提取训练样本的颜色特征、纹理特征和对象形状特征;101: Use different types of query images as training samples, and extract color features, texture features and object shape features of the training samples;
所述颜色特征为:图像在HSV颜色空间的颜色直方图和颜色矩特征;The color features are: the color histogram and color moment features of the image in the HSV color space;
所述纹理特征为:对图像采用实数部的Gabor进行滤波,提取滤波输出的均值和标准差;The texture feature is: filtering the image by using the Gabor of the real part, and extracting the mean and standard deviation of the filtering output;
所述对象形状特征为:基于区域形状的对象形状特征提取法,提取图像的对象形状特征;The object shape feature is: extracting the object shape feature of the image based on the object shape feature extraction method based on the region shape;
102:提取图像库中各被检索图像的颜色特征、纹理特征和对象形状特征;102: Extract the color feature, texture feature and object shape feature of each retrieved image in the image library;
103:采用粒子集群算法优化三类图像特征的相似度度量的权值:103: Use the particle cluster algorithm to optimize the weights of the similarity measure of the three types of image features:
初始化颜色特征的相似度度量Dc的权值ωc,纹理特征的相似度度量Dt的权值ωt,对象形状特征的相似度度量Ds的权值ωs,并定义每个粒子的粒子位置为(ωc,ωt,ωs),其中0≤ωc,ωt,ωs≤1;初始化粒子数k,以及每个粒子的局部最优位置和粒子群的全局最优位置;Initialize the weight ω c of the similarity measure D c of the color feature, the weight ω t of the similarity measure D t of the texture feature, the weight ω s of the similarity measure D s of the object shape feature, and define the weight of each particle. The particle position is (ω c , ω t , ω s ), where 0≤ω c ,ω t ,ω s ≤1; initialize the number of particles k, and the local optimal position of each particle and the global optimal position of the particle swarm ;
每次以同种类型的n幅训练样本作为查询图像进行图像查询处理:分别计算每个训练样本与图像库中的各被检索图像间的颜色特征的相似度度量Dc、纹理特征的相似度度量Dt和对象形状特征的相似度度量Ds,并基于权值ωc,ωt,ωs对三种的相似度度量进行加权求和得到总相似度度量D;将前K个最大总相似度度量D所对应的被检索图像作为检索结果;Perform image query processing with n training samples of the same type as query images each time: Calculate the similarity measure D c of color features and the similarity of texture features between each training sample and each retrieved image in the image database. Measure D t and the similarity measure D s of the object shape feature, and based on the weights ω c , ω t , ω s , the three similarity measures are weighted and summed to obtain the total similarity measure D; The retrieved image corresponding to the similarity measure D is used as the retrieval result;
基于当前检索精度迭代更新粒子位置、局部最优位置和全局最优位置,直到迭代收敛,并保存最近更新的粒子位置;Iteratively update the particle position, local optimal position and global optimal position based on the current retrieval accuracy until the iteration converges, and save the latest updated particle position;
其中检索精度为:检索结果中与查询图像匹配的被检索图像数量与数值K的比值;The retrieval accuracy is: the ratio of the number of retrieved images matching the query image in the retrieval result to the value K;
2、图像检索:2. Image retrieval:
提取当前查询图像的颜色特征、纹理特征和对象形状特征;Extract the color features, texture features and object shape features of the current query image;
并分别计算与图像库中的各被检索图像间的颜色特征的相似度度量Dc、纹理特征的相似度度量Dt和对象形状特征的相似度度量Ds;and calculate the similarity measure D c of the color feature, the similarity measure D t of the texture feature and the similarity measure D s of the object shape feature with each retrieved image in the image library respectively;
基于训练得到的权值ωc,ωt,ωs得到当前总相似度度量D=ωcDc+ωtDt+ωsDs;Based on the weights ω c , ω t and ω s obtained by training, the current total similarity measure D=ω c D c +ω t D t +ω s D s is obtained;
将前K个最大总相似度度量D所对应的被检索图像作为检索结果并输出。The retrieved images corresponding to the top K largest total similarity measures D are used as retrieval results and output.
综上所述,由于采用了上述技术方案,本发明的有益效果是:To sum up, due to the adoption of the above-mentioned technical solutions, the beneficial effects of the present invention are:
与现有技术相比,本发明结合和优化了各种特征提取方式,通过对多个特征描述符的组合,提高了CBIR检索系统的检索精度。采用融合多个特征的图像检索方式,可以把在各个特征上都相似的图像都检索出来,可以将用户的需求扩展到不同特征,并对这些特征计算出的相似度度量结果做统一的排序,按照相似度度量的大小顺序将结果返回给用户。本发明没有采用统一的相似度度量方式,而是针对不同的特征向量的不同结构方式采取不同的度量方法。不同的特征对图像的描述侧重点不同,本发明采用加权组合的方式,通过粒子集群算法获取最优的权值组合,获得最优相似度度量方式。Compared with the prior art, the present invention combines and optimizes various feature extraction methods, and improves the retrieval accuracy of the CBIR retrieval system by combining multiple feature descriptors. The image retrieval method that combines multiple features can retrieve all images that are similar in each feature, expand the user's needs to different features, and make a unified ranking of the similarity measurement results calculated by these features. The results are returned to the user in order of magnitude of the similarity measure. The present invention does not adopt a unified similarity measurement method, but adopts different measurement methods for different structural modes of different feature vectors. Different features describe images with different emphases. The present invention adopts a weighted combination method to obtain an optimal weight combination through a particle cluster algorithm to obtain an optimal similarity measurement method.
附图说明Description of drawings
图1是本发明的具体实施方式的框架流程图;Fig. 1 is the framework flow chart of the specific embodiment of the present invention;
图2是HSV颜色空间结构示意图;Figure 2 is a schematic diagram of the HSV color space structure;
图3是Pseudo-Zernike Moment形状特征提取示意图;Figure 3 is a schematic diagram of Pseudo-Zernike Moment shape feature extraction;
图4是Gabor纹理特征提取示意图;Fig. 4 is a schematic diagram of Gabor texture feature extraction;
图5是处理结果示意图,其中(5-a)为非洲居民,(5-b)为沙滩,(5-c)为建筑。Figure 5 is a schematic diagram of the processing results, wherein (5-a) is an African inhabitant, (5-b) is a beach, and (5-c) is a building.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚,下面结合实施方式和附图,对本发明作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings.
本发明的基于粒子集群算法优化的彩色图像检索方法,根据目标数据库中单个图像的各种底层特征并归一化为特定长度的图像信息描述子,并将图像特征保存在特征数据库中建立起索引表。在用户执行图片搜索过程中,将作为检索词的图像进行的各种单低层特征提取,形成查询向量。如图1所示,通过查询特征向量和特征数据库中的特征向量进行相似度匹配,最后对检索到的图像结果进行统一方式排序并输出。由于不同的特征所描述的特征的侧重点不同,为了能够避免由于相似度计算、单一特征的匹配不全面等因素造成的检索结果准确度低下等问题,基于内容的图像检索通过运用多特征检索能覆盖更多的相匹配的结果从而提高检全率,并利用相似性度量的归一化增加了对检索时的匹配结果的准确度即提高了检准率。The color image retrieval method optimized based on the particle cluster algorithm of the present invention normalizes various underlying features of a single image in the target database into image information descriptors of a specific length, and saves the image features in the feature database to establish an index surface. In the process of the user performing the image search, various single-low-level features are extracted from the image used as the search term to form a query vector. As shown in Figure 1, the similarity matching is performed by querying the feature vector and the feature vector in the feature database, and finally the retrieved image results are sorted and output in a unified manner. Due to the different emphases of the features described by different features, in order to avoid problems such as low accuracy of retrieval results caused by factors such as similarity calculation and incomplete matching of a single feature, content-based image retrieval uses multiple feature retrieval capabilities. Covering more matching results improves the recall rate, and using the normalization of the similarity measure increases the accuracy of the matching results during retrieval, that is, the precision rate.
本发明的具体实施步骤如下:The specific implementation steps of the present invention are as follows:
(1)颜色特征提取。(1) Color feature extraction.
本具体实施方式中,采用HSV颜色空间用作图像颜色特征的表示模型。先将原始图片转为HSV颜色空间图片再进行颜色特征提取。In this specific implementation, the HSV color space is used as a representation model of image color features. First convert the original image to HSV color space image and then perform color feature extraction.
参见图2,HSV颜色空间是按色彩(Hue,简称H)、饱和度(Saturation,简称S)、明暗(Value,简称V)来描述物体颜色,这种颜色空间比传统的RGB颜色空间更符合人类观察事物的视觉效果。为了更有效的表示图像的颜色特征信息,本发明采用颜色直方图(ColorHistogram)、色矩(Color moments)分别对颜色特征进行建模。Referring to Figure 2, the HSV color space describes the color of objects in terms of Hue (Hue, H for short), Saturation (S), and Value (V for short). This color space is more in line with the traditional RGB color space. The visual effects of human observation of things. In order to more effectively represent the color feature information of an image, the present invention adopts a color histogram (ColorHistogram) and a color moment (Color moments) to model the color features respectively.
采用(8,2,2)的体制对HSV颜色空间进行量化,即H分量平均划分为8信道表示,S,V分别用2,2的信道进行量化,这样就得到8х2х2=32维的直方图向量。The system of (8,2,2) is used to quantize the HSV color space, that is, the H component is evenly divided into 8 channels to represent, and S and V are quantized with 2 and 2 channels respectively, so that a histogram of 8х2х2=32 dimensions is obtained. vector.
颜色矩是一种简单有效的颜色特征表示方法,即采用一阶矩μi(均值,mean)、二阶矩δi(方差,viarance)表示图像颜色分布状况,其定义为:其中pij是图片的j个像素点在第i个信道上的值,N是图片像素的总量。HSV是三维颜色空间,通过分别计算三个颜色空间的颜色矩,可得到6维的色矩向量。Color moment is a simple and effective color feature representation method, that is, the first-order moment μ i (mean, mean) and the second-order moment δ i (variance, viarance) are used to represent the color distribution of the image, which is defined as: where p ij is the value of the j pixels of the picture on the ith channel, and N is the total number of picture pixels. HSV is a three-dimensional color space. By calculating the color moments of the three color spaces respectively, a 6-dimensional color moment vector can be obtained.
通过对颜色直方图和颜色矩的组合,得到(32+6)=38维的组合颜色特征描述符。By combining the color histogram and the color moment, a (32+6)=38-dimensional combined color feature descriptor is obtained.
(2)纹理特征的提取。(2) Extraction of texture features.
本具体实施方式中,使用gabor滤波实现图像的纹理特征的提取。由于2维的Gabor滤波函数是一个复函数,因此实际运用中会增加计算的复杂度。为了简化计算,同时保留Gabor滤波函数的特征提取特性。本发明使用实数部的Gabor进行滤波,其定义如下:其中x,y是图片中像素点的坐标位置,λ,θ分别代表波长和滤波的偏移方向,σ表示Gabor核函数中高斯函数的标准差,该参数决定了Gabor滤波核可接受区域的大小,σ的取值与b(Bandwidth,高低频率之差)和λ有关;γ表示纵横比,即空间纵横比,表示Gabor滤波器的椭圆度;ψ表示Gabor核函数中余弦函数的相位参数,有效值为-180度~180度,0度和180度对应的方程与原点对称,-90度和90度的方程分别与原点成中心对称。本具体实施方式中,采用0.1,0.8,2,5,11这5个参数作为滤波器的波长,0,π/4,π/2,3π/4四个参数作为Gabor滤波的偏移量。然后通过他们的组合的滤波对图像进行纹理特征提取。最后利用对滤波的结果求均值和标准差来获得纹理特征的向量:In this specific embodiment, gabor filtering is used to extract texture features of an image. Since the 2-dimensional Gabor filter function is a complex function, the computational complexity will be increased in practical application. In order to simplify the calculation while preserving the feature extraction properties of the Gabor filter function. The present invention uses the Gabor of the real part to filter, which is defined as follows: in x and y are the coordinate positions of the pixels in the image, λ and θ represent the wavelength and the offset direction of the filter, respectively, and σ represents the standard deviation of the Gaussian function in the Gabor kernel function. This parameter determines the size of the acceptable area of the Gabor filter kernel. The value of σ is related to b (Bandwidth, the difference between high and low frequencies) and λ; γ represents the aspect ratio, that is, the spatial aspect ratio, which represents the ellipticity of the Gabor filter; ψ represents the phase parameter of the cosine function in the Gabor kernel function, the effective value For -180 degrees to 180 degrees, the equations corresponding to 0 degrees and 180 degrees are symmetric to the origin, and the equations of -90 degrees and 90 degrees are centrosymmetric to the origin, respectively. In this specific embodiment, five parameters of 0.1, 0.8, 2, 5, and 11 are used as the wavelength of the filter, and four parameters of 0, π/4, π/2, and 3π/4 are used as the offset of the Gabor filter. The images are then subjected to texture feature extraction through their combined filtering. Finally, use the mean and standard deviation of the filtering results to obtain the vector of texture features:
其中m=0,1,…,M-1;n=0,1,…,N-1。M,N是分别代表Gabor滤波的波长数量和偏移量参数的数量,P×Q代表图片的原始大小。Emn(x,y)是坐标点(x,y)处的经过Gabor滤波处理的纹理特征值。通过以上处理,可以得到5×4×2=40维纹理特征向量:FT={μ00,σ00,μ01,σ01,...,μM-1N-1,σM-1N-1},如图4所示。where m=0,1,...,M-1; n=0,1,...,N-1. M, N are the number of wavelengths and offset parameters representing Gabor filtering, respectively, and P×Q represents the original size of the picture. E mn (x, y) is the texture feature value processed by Gabor filtering at the coordinate point (x, y). Through the above processing, a 5×4×2=40-dimensional texture feature vector can be obtained: F T ={μ 00 ,σ 00 ,μ 01 ,σ 01 ,...,μ M-1N-1 ,σ M-1N- 1 }, as shown in Figure 4.
(3)对象形状特征的提取。(3) Extraction of object shape features.
图像形状描述符可分为两类:一类是描述形状的目标区域边界轮廓的像素集合,称为基于轮廓的形状描述符;一类是描述形状的目标区域内的所有的像素集合,称为基于区域的形状描述符。本具体实施方式采用pseudo-ZernikeMoment作为图片形状特征提取方法。Pseudo-Zernick Moments是一种基于区域形状的对象形状特征提取算法,可以对图像分多级表示,抗噪音能力较强。Image shape descriptors can be divided into two categories: one is the set of pixels that describe the boundary contour of the target area of the shape, called contour-based shape descriptors; the other is the set of all pixels in the target area that describes the shape, called Region-based shape descriptors. This specific implementation adopts pseudo-ZernikeMoment as the image shape feature extraction method. Pseudo-Zernick Moments is an object shape feature extraction algorithm based on region shape, which can represent images in multiple levels and has strong anti-noise ability.
在一个大小为M×N的数字图像中,阶数为n,重复度为m的Pseudo-Zernike Moment定义为:其中f(x,y)是用来模拟图像的一种函数表示,(x,y)代表图片像素中的坐标位置。Pseudo-Zernike moment通过利用多项式{Vnm(x,y)}集合与极坐标变换,将f(x,y)映射到x2+y2≤1:In a digital image of size M×N, order n and repetition degree m, the Pseudo-Zernike Moment is defined as: Where f(x, y) is a functional representation used to simulate an image, and (x, y) represents the coordinate position in the image pixel. The Pseudo-Zernike moment maps f(x,y) to x 2 +y 2 ≤1 by exploiting the set of polynomials {V nm (x,y)} and polar transformations:
Vnm(x,y)=Vnm(ρ,θ)=Rnm(ρ)exp(jmθ),V nm (x,y)=V nm (ρ,θ)=R nm (ρ)exp(jmθ),
其中,θ=arctan(y/x)。矩的阶数n是一个非负整数,重复度m的取值为|m|≤n,j。in, θ=arctan(y/x). The order n of the moment is a non-negative integer, and the value of the repetition degree m is |m|≤n, j.
本发明使用阶数是5的作为图像纹理特征的形状向量,最终获得21维的图像形状特征向量:The present invention uses the order of 5 As the shape vector of the image texture feature, the 21-dimensional image shape feature vector is finally obtained:
(4)相似度度量。(4) Similarity measure.
本发明使用到了三种不同的图像特征描述符。为了比较相关图像特征向量与目标图像库中图像的相似度。本发明对不同的图像特征采用不同的相似度度量方法。The present invention uses three different image feature descriptors. In order to compare the similarity of the relevant image feature vectors with the images in the target image library. The present invention adopts different similarity measurement methods for different image features.
颜色特征相似度度量: Color feature similarity measure:
纹理矩相似度度量: Texture moment similarity measure:
形状特征相似度度量: Shape feature similarity measure:
上述相似度度量公式中,Q,I代表进行相似度度量的两张图片。其中分别代表图片Q,I的颜色特征分量;和分别代表Q与I图片的纹理特征矩中的均值向量和标准差向量;代表图片在阶数为5时的Pseudo-Zernike Moment值。In the above similarity measurement formula, Q and I represent two pictures for similarity measurement. in Represent the color feature components of pictures Q and I, respectively; and Represent the mean vector and standard deviation vector in the texture feature moments of the Q and I pictures, respectively; Represents the Pseudo-Zernike Moment value of the image at
不同的特性描述符对图片的描述侧重点有所不同,例如待检索对象为蓝天和海洋,则会更加注重图像的颜色描述符,但对于要检索带有香蕉或者盘子等物品的图片,就会更加注重图片中物体的形状特征,去寻找图片中带有镰刀形或者圆形的物品进行比较。为了进一步提高检索精度,本发明通过加权组合不同特征相似度度量结果,来作为最终的查询图像和目标图像的相似性度量值,表示为:D(Q,I)=ωcD颜色特征+ωtD纹理矩+ωsD形状,其中ωc,ωt,ωs代表三个特征分量在相似度度量过程中的权值,为了均衡化度量结果同时简化计算量,令ωc+ωt+ωs=1。Different feature descriptors have different focus on the description of pictures. For example, if the objects to be retrieved are the blue sky and the ocean, they will pay more attention to the color descriptors of the images, but for pictures with items such as bananas or plates, they will be Pay more attention to the shape characteristics of the objects in the picture, and look for items with a sickle or round shape in the picture for comparison. In order to further improve the retrieval accuracy, the present invention uses the weighted combination of different feature similarity measurement results as the final similarity measurement value between the query image and the target image, which is expressed as: D(Q,I)=ω c D color feature +ω t D texture moment + ω s D shape , where ω c , ω t , ω s represent the weights of the three feature components in the similarity measurement process. In order to balance the measurement results and simplify the calculation amount, let ω c +ω t +ω s =1.
(5)利用粒子集群算法对相似度度量的优化。(5) Optimization of similarity measure using particle cluster algorithm.
粒子集群算法(Particle Swarm Optimization,PSO)是用来求最优解的常用方法,其速度与粒子位置更新公式如下:Particle Swarm Optimization (PSO) is a common method used to find the optimal solution. Its velocity and particle position update formulas are as follows:
V[i]=ω*V[i]+c1*rand()*(pbest[i]-present[i])+c2*rand()*(gbest-present[i])present[i+1]=present[i]+V[i]V[i]=ω*V[i]+c 1 *rand()*(pbest[i]-present[i])+c 2 *rand()*(gbest-present[i])present[i+ 1]=present[i]+V[i]
该函数式是通过粒子向最优解移动从而获得最优解的一个方程式,其中V[i]代表第i个粒子的速度,w代表惯性权值,c1和c2表示学习参数,rand()表示在0-1之间的随机数,pbest[i]代表第i个粒子搜索到的最优值(局部最优解),gbest代表整个集群搜索到的最优值(全局最优解),present[i]代表第i个粒子的当前位置。This functional formula is an equation for obtaining the optimal solution by moving the particle to the optimal solution, where V[i] represents the velocity of the ith particle, w represents the inertia weight, c1 and c2 represent the learning parameters, and rand() represents A random number between 0-1, pbest[i] represents the optimal value searched by the ith particle (local optimal solution), gbest represents the optimal value searched by the entire cluster (global optimal solution), present [i] represents the current position of the ith particle.
本具体实施方式中,使用Corel-10作为实验图像数据库。Corel-10是拥有10000张图片的开源图片库,包含10种类,标签名分别是非洲、海滩、山、汽车、恐龙、大象、花、马、食物和建筑。每个门类的图片有1000张。In this specific embodiment, Corel-10 is used as the experimental image database. Corel-10 is an open source image library with 10,000 images, including 10 categories, with tag names like Africa, Beaches, Mountains, Cars, Dinosaurs, Elephants, Flowers, Horses, Food, and Architecture. There are 1000 pictures for each category.
并选择相似性度量过程中的3个权值作为运动粒子。为了让权值大小不产生越界错误,令:其中,0≤ωc,ωt,ωs≤1。And select 3 weights in the similarity measurement process as moving particles. In order to make the weight size not produce out-of-bounds errors, let: Among them, 0≤ω c ,ω t ,ω s ≤1.
基于多特征融合的图像检索而言,不同的特征描述符对同一幅图像的描述侧重点不同,通过优化各个不同特征的组合方式可以很好的利用不同特征描述符的有点,优化查询结果。本发明利用查询结果反馈信息和PSO算法优化来来解决这个问题,即通过分析测试查询返回馈的结果来指导权值的调整。具体来说,本发明从测试数据库(Corel数据库)的每个类别中随机选择20张不同的图片作查询图片,每次CBIR系统返回得到的前K(预设值)张图片用于计算检索精度。其中检索精度为:返回的K张图像中与查询图像匹配的图像数与数值K的比值。本发明使用检索精度作为自适应函数,越高说明取值越优,粒子所处的位置就越接近局部最优解的位置。For image retrieval based on multi-feature fusion, different feature descriptors describe the same image with different emphasis. By optimizing the combination of different features, the advantages of different feature descriptors can be well utilized to optimize query results. The present invention solves this problem by using query result feedback information and PSO algorithm optimization, that is, by analyzing the results returned by the test query to guide the adjustment of the weights. Specifically, the present invention randomly selects 20 different pictures from each category of the test database (Corel database) as query pictures, and the top K (preset value) pictures returned by the CBIR system each time are used to calculate the retrieval accuracy . The retrieval accuracy is: the ratio of the number of images matching the query image in the returned K images to the value K. The present invention uses the retrieval accuracy as the adaptive function, and the higher the value, the better the value, and the closer the position of the particle is to the position of the local optimal solution.
其中,训练权值ωc,ωt,ωs的具体过程如下:Among them, the specific process of training the weights ω c , ω t , ω s is as follows:
首先,从Corel数据库每个类别中随机选取N幅图片作为训练数据。粒子数n=k(k为预设值,基于数据库大小设置),粒子初始位置present[i]通过随机数产生,且0≤present[i]≤1,例如将其设置为0.01;First, N images are randomly selected from each category in the Corel database as training data. The number of particles n=k (k is a preset value, set based on the database size), the initial particle position present[i] is generated by a random number, and 0≤present[i]≤1, for example, set it to 0.01;
然后初始化粒子的局部最优位置gbest和全局最优位置pbest[i]的值,通过随机数指定任意粒子运动的初始位置其中i为粒子标识符,表示当前粒子i对应权值ωc、ωt、ωs的值;Then initialize the values of the local optimal position gbest and the global optimal position pbest[i] of the particle, and specify the initial position of any particle motion through random numbers where i is the particle identifier, Indicates the value of the weights ω c , ω t and ω s corresponding to the current particle i;
对每个粒子执行查询操作计算查询参数为时的检索精度,其中Ii表示查询图片的特征描述向量(颜色、纹理和形状等);Perform a query operation on each particle Calculate the query parameter as Retrieval accuracy at time, where I i represents the feature description vector (color, texture and shape, etc.) of the query image;
根据当前最高检索精度所对应的的值更新gbest和pbest[i]的值;According to the current highest retrieval accuracy corresponding to update the value of gbest and pbest[i];
判断是否满足迭代收敛条件,若否,则继续进行查询操作,并基于检索进度更新gbest和pbest[i];否则输出当前 Determine whether the iterative convergence conditions are met, if not, continue the query operation, and update gbest and pbest[i] based on the retrieval progress; otherwise, output the current
在PSO算法中,本具体实施方式将集群算法的收敛条件设置为两次查询同一张图片的查询准确度小于0.01或算法循环次数超过1000次,即当满足最近两次的查询准确度的偏差小于阈值(0.01)或到达最大迭代次数时停止更新,得到最优组合的权值。In the PSO algorithm, this specific embodiment sets the convergence condition of the clustering algorithm as the query accuracy of querying the same image twice is less than 0.01 or the algorithm loops more than 1000 times, that is, when the deviation of the most recent two query accuracy is less than The update is stopped when the threshold (0.01) or the maximum number of iterations is reached, and the weight of the optimal combination is obtained.
即本发明在进行实时的查询处理时,基于当前输入的待查询图像,获取查询对象的各种底层特征(颜色直方图,色矩,纹理矩,形状),得到待查询图像的特征描述向量,然后根据不同的特征提取向量,采用不同的特征度量方法,与图片库的特征库进行相似度对比,获得对应不同特征的图片之间相似度的度量结果,并基于训练好的最优组合的权值,得到最终的相似度,最后对获得的最终相似度进行排序(如相似度结果增序排序输出),返回前K(例如35)个最相近的K张图片给用户,如图5所示。That is, when the present invention performs real-time query processing, based on the currently input image to be queried, various underlying features (color histogram, color moment, texture moment, shape) of the query object are obtained, and the feature description vector of the image to be queried is obtained, Then extract vectors according to different features, use different feature measurement methods, and compare the similarity with the feature library of the image library to obtain the similarity measurement results between pictures corresponding to different features, and based on the weight of the optimal combination after training value, get the final similarity, and finally sort the obtained final similarity (such as the similarity result in increasing order and output), and return the top K (eg 35) most similar K pictures to the user, as shown in Figure 5 .
本发明融合了多特征向量作为图像的特征描述符,并根据每个不同特征描述符的特点,给每个特征向量分配与其结构相宜的相似度度量公式。由于用户要查询的图片是未知的,不同的图片对特征描述符类型的要求也不同。单一特征不能满足所有的图像检索的要求,通过融合多个特征描述,可以使得在不同特征上相似的图像同时被检索到。同时由于底层特征描述与高层语义之间存在语义鸿沟(semantic gap),不同的图像可能在某一方面拥有相同的特征描述符,采用融合多个特征可以有效克服这种问题造成的误差。同时,在计算特征相似度的过程中,本发明使用加权组合各个分量特征的度量结果。通过粒子集群算法训练出各个相似度分量的最优权值。从而避免因为相似度计算、单一特征的匹配描述不全面引起的误差。The invention integrates multiple feature vectors as feature descriptors of images, and assigns a similarity measure formula suitable for its structure to each feature vector according to the characteristics of each different feature descriptor. Since the pictures to be queried by users are unknown, different pictures have different requirements for the type of feature descriptors. A single feature cannot meet all the requirements of image retrieval. By fusing multiple feature descriptions, images that are similar in different features can be retrieved at the same time. At the same time, due to the semantic gap between the low-level feature description and the high-level semantics, different images may have the same feature descriptor in a certain aspect, and the error caused by this problem can be effectively overcome by fusing multiple features. At the same time, in the process of calculating the feature similarity, the present invention uses weighting to combine the measurement results of each component feature. The optimal weights of each similarity component are trained by the particle cluster algorithm. Thus, errors caused by incomplete similarity calculation and single feature matching description are avoided.
本发明涉及的是基于内容的图像检索,主要考虑到的是对CBIR技术的优化。通过使用PSO算法对融合多特征的CBIR系统进行优化,可以有效提高图像检索的准确性,具有一定的实用价值。The present invention relates to content-based image retrieval, and mainly considers the optimization of CBIR technology. By using the PSO algorithm to optimize the multi-feature fusion CBIR system, the accuracy of image retrieval can be effectively improved, which has certain practical value.
以上所述,仅为本发明的具体实施方式,本说明书中所公开的任一特征,除非特别叙述,均可被其他等效或具有类似目的的替代特征加以替换;所公开的所有特征、或所有方法或过程中的步骤,除了互相排斥的特征和/或步骤以外,均可以任何方式组合。The above descriptions are only specific embodiments of the present invention, and any feature disclosed in this specification, unless otherwise stated, can be replaced by other equivalent or alternative features with similar purposes; all the disclosed features, or All steps in a method or process, except mutually exclusive features and/or steps, may be combined in any way.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711281707.4A CN107958073B (en) | 2017-12-07 | 2017-12-07 | Particle cluster algorithm optimization-based color image retrieval method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711281707.4A CN107958073B (en) | 2017-12-07 | 2017-12-07 | Particle cluster algorithm optimization-based color image retrieval method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107958073A CN107958073A (en) | 2018-04-24 |
CN107958073B true CN107958073B (en) | 2020-07-17 |
Family
ID=61958120
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711281707.4A Expired - Fee Related CN107958073B (en) | 2017-12-07 | 2017-12-07 | Particle cluster algorithm optimization-based color image retrieval method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107958073B (en) |
Families Citing this family (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108829711B (en) * | 2018-05-04 | 2021-06-01 | 上海得见计算机科技有限公司 | Image retrieval method based on multi-feature fusion |
CN108875813B (en) * | 2018-06-04 | 2021-10-08 | 北京工商大学 | A 3D mesh model retrieval method based on geometric images |
CN109063656B (en) * | 2018-08-08 | 2021-08-24 | 厦门市美亚柏科信息股份有限公司 | Method and device for carrying out face query by using multiple face engines |
CN109360289B (en) * | 2018-09-29 | 2021-09-28 | 南京理工大学 | Power meter detection method fusing inspection robot positioning information |
CN109259965A (en) * | 2018-09-29 | 2019-01-25 | 重庆大学 | Adaptive medical POCT system and detection method |
CN109846479A (en) * | 2019-03-06 | 2019-06-07 | 武汉几古几古科技有限公司 | One kind being based on child image Analysis of Cognition Psychology system |
WO2020210996A1 (en) * | 2019-04-17 | 2020-10-22 | 深圳大学 | Image query method and system, computing device and storage medium |
CN110502660B (en) * | 2019-08-28 | 2024-02-13 | 南京大学 | Multi-distance measurement image retrieval method under weak supervision |
CN111930844B (en) * | 2020-08-11 | 2021-09-24 | 肖岩 | Financial prediction system based on block chain and artificial intelligence |
CN112101430B (en) * | 2020-08-28 | 2022-05-03 | 电子科技大学 | Anchor box generation method and lightweight target detection method for image target detection processing |
CN112528061B (en) * | 2020-10-12 | 2024-05-28 | 西安理工大学 | Multi-target image retrieval method based on selective convolution descriptor aggregation |
CN112395451A (en) * | 2020-11-17 | 2021-02-23 | 厦门博海中天信息科技有限公司 | Classification retrieval method, system, medium and device based on image features |
CN112667842B (en) * | 2020-12-29 | 2022-08-02 | 中国电子科技集团公司第五十八研究所 | Image texture retrieval method |
CN112685591A (en) * | 2020-12-31 | 2021-04-20 | 荆门汇易佳信息科技有限公司 | Accurate picture retrieval method for user interest area and feedback guidance |
CN114455255A (en) * | 2022-01-27 | 2022-05-10 | 山东仁功智能科技有限公司 | Abnormal cigarette sorting error detection method based on multi-feature recognition |
CN116109447A (en) * | 2022-12-29 | 2023-05-12 | 企知道科技有限公司 | A search method, device, equipment and medium |
CN116737982B (en) * | 2023-08-11 | 2023-10-31 | 拓锐科技有限公司 | Intelligent screening management system for picture search results based on data analysis |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102024155A (en) * | 2010-12-06 | 2011-04-20 | 广州科易光电技术有限公司 | Rapid matching method of multispectral images based on edge detection |
CN102426606A (en) * | 2011-11-11 | 2012-04-25 | 南京财经大学 | Particle swarm algorithm-based multi-feature image retrieval method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004334339A (en) * | 2003-04-30 | 2004-11-25 | Canon Inc | Information processor, information processing method, and storage medium, and program |
US20110202543A1 (en) * | 2010-02-16 | 2011-08-18 | Imprezzeo Pty Limited | Optimising content based image retrieval |
-
2017
- 2017-12-07 CN CN201711281707.4A patent/CN107958073B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102024155A (en) * | 2010-12-06 | 2011-04-20 | 广州科易光电技术有限公司 | Rapid matching method of multispectral images based on edge detection |
CN102426606A (en) * | 2011-11-11 | 2012-04-25 | 南京财经大学 | Particle swarm algorithm-based multi-feature image retrieval method |
Also Published As
Publication number | Publication date |
---|---|
CN107958073A (en) | 2018-04-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107958073B (en) | Particle cluster algorithm optimization-based color image retrieval method | |
CN102073748B (en) | Visual keyword based remote sensing image semantic searching method | |
CN105574534B (en) | Conspicuousness object detection method based on sparse subspace clustering and low-rank representation | |
Ilea et al. | Image segmentation based on the integration of colour–texture descriptors—A review | |
TWI552007B (en) | Method and apparatus for generating image index | |
US10353948B2 (en) | Content based image retrieval | |
Kim et al. | Color–texture segmentation using unsupervised graph cuts | |
CN108875813B (en) | A 3D mesh model retrieval method based on geometric images | |
CN110188225B (en) | Image retrieval method based on sequencing learning and multivariate loss | |
Alsmadi et al. | Fish classification based on robust features extraction from color signature using back-propagation classifier | |
CN114140657B (en) | Image retrieval method based on multi-feature fusion | |
CN109934258A (en) | Image retrieval method based on feature weighting and region integration | |
CN108319959A (en) | A kind of corps diseases image-recognizing method compressed based on characteristics of image with retrieval | |
CN109840914B (en) | Texture segmentation method based on user interaction | |
Lu et al. | Spectral segmentation via midlevel cues integrating geodesic and intensity | |
CN109299295B (en) | Blue printing layout database searching method | |
Wang et al. | Plant recognition based on Jaccard distance and BOW | |
Pujari et al. | Content-based image retrieval using color and shape descriptors | |
Lin et al. | A new probabilistic representation of color image pixels and its applications | |
CN105260982B (en) | Method for analyzing image based on sparse and dense reconstruct | |
CN110162654A (en) | It is a kind of that image retrieval algorithm is surveyed based on fusion feature and showing for search result optimization | |
Sinha et al. | Scene image classification using a wigner-based local binary patterns descriptor | |
Shambharkar et al. | A comparative study on retrieved images by content based image retrieval system based on binary tree, color, texture and canny edge detection approach | |
Jain et al. | Content-based image retrieval approach using three features color, texture and shape | |
Nie | Research on image network retrieval application based on swarm optimization algorithm |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20200717 |