CN103440332A - Image searching method based on relation matrix regularization enhancement representation - Google Patents
Image searching method based on relation matrix regularization enhancement representation Download PDFInfo
- Publication number
- CN103440332A CN103440332A CN2013103997347A CN201310399734A CN103440332A CN 103440332 A CN103440332 A CN 103440332A CN 2013103997347 A CN2013103997347 A CN 2013103997347A CN 201310399734 A CN201310399734 A CN 201310399734A CN 103440332 A CN103440332 A CN 103440332A
- Authority
- CN
- China
- Prior art keywords
- image
- matrix
- images
- relational matrix
- weights
- 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.)
- Granted
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明公开了一种基于关系矩阵正则化增强方法从图像实例库中检索图像的方法,包含如下步骤:步骤1,输入待检索图像;步骤2,抽取待检索图像和图像实例库中图像的特征;步骤3,从图像实例特征库中选取P个图像类,从每一个图像类选取n幅图像构成样本数据X;步骤4,基于谱图理论的流形学习算法,对样本数据X构建三个矩阵;步骤5,初步建立增强关系矩阵W′;步骤6,计算正则化增强关系矩阵W*:步骤7,计算广义特征矩阵A;步骤8,计算最终的图像表示;步骤9,计算待检索图像的图像表示;步骤10,采用欧氏距离计算待检索图像与图像实例库中所有图像的相似度,按照相似度由大到小输出图像实例库中与待检索图像最相似的图像。
The invention discloses a method for retrieving images from an image instance database based on a relational matrix regularization enhancement method, comprising the following steps: step 1, inputting the image to be retrieved; step 2, extracting the features of the image to be retrieved and the image in the image instance database ; Step 3, select P image classes from the image instance feature library, and select n images from each image class to form sample data X; Step 4, based on the manifold learning algorithm of spectrogram theory, construct three Matrix; step 5, initially establish the enhanced relationship matrix W'; step 6, calculate the regularized enhanced relationship matrix W * ; step 7, calculate the generalized feature matrix A; step 8, calculate the final image representation; step 9, calculate the image to be retrieved image representation; step 10, using the Euclidean distance to calculate the similarity between the image to be retrieved and all the images in the image instance database, and output the image in the image instance database that is most similar to the image to be retrieved in descending order of similarity.
Description
技术领域technical field
本发明属于图像检索领域,特别是一种基于关系矩阵正则化增强方法的图像检索方法。The invention belongs to the field of image retrieval, in particular to an image retrieval method based on a relationship matrix regularization enhancement method.
背景技术Background technique
在科技日益发达的今天,随着图像获取处理设备和互联网技术的迅猛发展和普及应用,以图像为代表的新一代信息资源已经成为与材料、能源具有同等重要地位的战略资源,其数据量也已达到海量规模,成为当前信息处理和信息资源建设的主体。由于图像具有信息量大、内容丰富、表现力强等优点,因此对海量规模的图像进行有效的信息处理和应用,已成为众多实际应用领域的核心问题。In today's increasingly advanced technology, with the rapid development and popularization of image acquisition and processing equipment and Internet technology, the new generation of information resources represented by images has become a strategic resource with the same importance as materials and energy. It has reached a massive scale and has become the main body of current information processing and information resource construction. Because images have the advantages of large amount of information, rich content, and strong expressiveness, effective information processing and application of massive images has become a core issue in many practical application fields.
由于当前图像数据已呈海量规模,并且在不断增长,传统的技术手段已经无法适应这种需求,这对图像的组织、分析、检索和管理等技术都提出了全新的挑战。尽管目前基于内容的图像检索研究已经取得了很大的进展,有效克服了基于手工标注的文本信息进行图像检索的局限性,但离真正的实用阶段还有一定的距离,尤其是对图像的高层语义理解方面。大部分方法还仅仅停留在围绕图像的底层特征进行语义描述和学习这一层次,相对于人类能够理解和运用的丰富多彩的语义概念,底层数据特征的表达能力尚有很大局限,因此底层特征与高层语义之间存在着较大差距,即所谓的“语义鸿沟”(semantic gap),从而导致在图像检索的准确率和效率上还远远达不到实际应用的需要,尤其是对图像的多种丰富语义进行准确有效的理解和检索方面。时至今日,图像检索中的“语义鸿沟”问题仍然没有得到很好的解决,仍然是困扰研究者的关键性难题之一。在解决这一难题的众多技术当中,基于相关反馈的图像检索技术提供了一种可行的解决方案。早期的相关反馈技术主要集中于基于相关反馈的信息,修正查询向量即图像特征,例如对查询向量的每一维数值重新分配权值,调整查询向量的位置等。近年来,由于流形学习的兴起,许多研究者转向通过流形学习技术,将高维的图像数据空间降维来探求图像特征空间的内在结构,其主要的理论假设是将图像看成是一种流形,目标就是发现其内在的结构信息。发现嵌入在高维数据中的低维子空间是学习数据潜在流形的重要手段,流形学习中子空间的学习方法都是基于局部分析的。通过流形学习的方法学习其所对应的低维的语义子空间,这与流形学习假设整个数据集只在局部满足欧氏距离相吻合,因此通过分析图像数据的局部信息,发掘局部的语义流形结构对图像检索来说更加有意义。Due to the massive scale of current image data and its continuous growth, traditional technical means can no longer meet this demand, which poses new challenges to technologies such as image organization, analysis, retrieval, and management. Although the current research on content-based image retrieval has made great progress, effectively overcoming the limitations of image retrieval based on manually annotated text information, there is still a certain distance from the real practical stage, especially for high-level images. Semantic understanding. Most methods only stay at the level of semantic description and learning around the underlying features of the image. Compared with the rich and colorful semantic concepts that humans can understand and use, the expressive ability of the underlying data features is still very limited. Therefore, the underlying features There is a large gap between the high-level semantics and the so-called "semantic gap", which leads to the fact that the accuracy and efficiency of image retrieval are far from meeting the needs of practical applications, especially for image retrieval. A variety of rich semantics for accurate and effective understanding and retrieval. Today, the "semantic gap" problem in image retrieval has not been well resolved, and it is still one of the key problems that plague researchers. Among the many techniques to solve this problem, image retrieval based on relevance feedback provides a feasible solution. Early relevant feedback technology mainly focused on information based on relevant feedback, modifying the query vector, that is, image features, such as reassigning weights to each dimension value of the query vector, adjusting the position of the query vector, etc. In recent years, due to the rise of manifold learning, many researchers have turned to the manifold learning technology to reduce the dimensionality of the high-dimensional image data space to explore the internal structure of the image feature space. The main theoretical assumption is to regard the image as a A manifold, the goal is to discover its internal structure information. Discovering low-dimensional subspaces embedded in high-dimensional data is an important means of learning the latent manifold of data, and the learning methods of subspaces in manifold learning are all based on local analysis. The corresponding low-dimensional semantic subspace is learned through the manifold learning method, which is consistent with the manifold learning assumption that the entire data set only satisfies the Euclidean distance locally. Therefore, by analyzing the local information of the image data, the local semantics can be discovered. The manifold structure is more meaningful for image retrieval.
发明内容Contents of the invention
发明目的:本发明为了解决现有技术中的问题,提出了一种基于关系矩阵正则化增强表示的图像检索方法,有效地解决大规模数据下,图像的快速准确检索问题。Purpose of the invention: In order to solve the problems in the prior art, the present invention proposes an image retrieval method based on the regularized enhanced representation of the relationship matrix, which effectively solves the problem of fast and accurate retrieval of images under large-scale data.
发明内容:本发明公开了一种基于关系矩阵正则化增强方法的图像检索方法,该方法从图像实例库中检索图像,包含如下步骤:SUMMARY OF THE INVENTION: The present invention discloses an image retrieval method based on a relational matrix regularization enhancement method. The method retrieves an image from an image instance database, including the following steps:
步骤1,输入待检索图像;Step 1, input the image to be retrieved;
步骤2,抽取待检索图像和图像实例库中图像的特征,用N维向量描述每幅图像,N=112,得到图像实例特征库U=(u1,…,uM),ui为图像实例库第i幅图像的特征,i=1,…M,M为图像实例库中所包含的图像数,以及待检索图像的特征v,所述图像实例库包括50个以上的图像类,每一个图像类表示一个语义类,每个图像类包括600幅以上的图像;
步骤3,从图像实例特征库中选取P个图像类,P取值范围20~50,从每一个图像类选取n幅图像,n取值范围100~500,P个图像类共有n×P张图像构成样本数据X;例如发明的一个实施例中,从中选取30个图像类,每一类表示了不同的语义类,每一类有100幅图像,共有3000张图像构成样本数据X,X=(x1,…,xq),q=n×P,xi为样本数据中第i幅图像的特征,q为样本数据大小,X为112×q维的矩阵;
步骤4,基于谱图理论的流形学习算法,对样本数据X构建增强关系矩阵W、正例关系矩阵WP和反例关系矩阵WN;Step 4, based on the manifold learning algorithm of spectrogram theory, construct the enhanced relationship matrix W, the positive example relationship matrix W P and the negative example relationship matrix W N for the sample data X;
步骤5,对构建的关系矩阵W进行增强,初步建立增强关系矩阵W′;
步骤6,借助概率转移矩阵正则化增强关系矩阵W′得到正则化增强关系矩阵W*;
步骤7,根据正则化增强关系矩阵W*构建目标方程,计算广义特征矩阵A;
步骤8,利用广义特征矩阵A对图像实例特征库中的所有图像进行降维,即AU=A*(u1,…,uM)=(A*u1,…,A*uM),记yi=A*xi,i=1,…M,得到最终的图像表示Y=(y1,…,yM),yi为图像实例库第i幅图像特征降维后的特征;Step 8, use the generalized feature matrix A to reduce the dimensionality of all images in the image instance feature library, that is, AU=A*(u 1 ,...,u M )=(A*u 1 ,...,A*u M ), Record y i =A* xi , i=1,...M, to obtain the final image representation Y=(y 1 ,...,y M ), and y i is the dimensionality-reduced feature of the i-th image in the image instance library;
步骤9,利用广义特征矩阵A对待检索图像特征v降维,得到待检索图像的图像表示f=A*v;
步骤10,根据步骤8的最终的图像表示和步骤9的待检索图像的图像表示的欧氏距离计算待检索图像与图像实例库中所有图像的相似度,即计算待检索图像降维特征f与图像实例特征库每幅图像特征降维后特征的欧氏距离||f-yi||2,i=1,…M,yi为图像实例库第i幅图像特征降维后的特征,按照相似度由大到小输出图像实例库中与待检索图像最相似的图像。
步骤2中图像特征包括颜色矩、Tamura纹理特征、Gabor纹理特征、颜色直方图。Image features in
步骤4具体包括如下步骤:在样本数据X中随机选取一幅图像,计算该图像与样本数据X中其他图像的欧式距离,利用相关反馈检索技术,根据返回结果中的同类图像和不同类图像对应设立正例集合和反例集合,并采用简单的k近邻方法建立关系矩阵,即属于k近邻并且是同一个图像类的两图像间的权值为1,否则为0。Step 4 specifically includes the following steps: randomly select an image in the sample data X, calculate the Euclidean distance between the image and other images in the sample data X, and use the relevant feedback retrieval technology to correspond to images of the same type and images of different types in the returned results Set up a set of positive examples and a set of negative examples, and use the simple k-nearest neighbor method to establish a relationship matrix, that is, the weight between two images belonging to the k-nearest neighbor and the same image class is 1, otherwise it is 0.
步骤4中采用基于反馈技术的嵌入关系拓宽ARE方法作为谱图理论的流形学习算法,包括以下步骤:In step 4, the embedded relationship widening ARE method based on feedback technology is used as the manifold learning algorithm of spectrogram theory, including the following steps:
(1)首先对样本数据X构建关系矩阵W,从样本数据X中随机抽取一幅图像I,图像I的特征为xi,采用k近邻方法计算xi与样本数据X中其他图像特征的欧式距离,得到与图像I最相似的k幅图像,其中k取值范围5~10;(1) First construct a relationship matrix W for the sample data X, randomly select an image I from the sample data X, the feature of the image I is x i , use the k nearest neighbor method to calculate the Euclidean relationship between x i and other image features in the sample data X distance to obtain k images most similar to image I, where k ranges from 5 to 10;
从k幅图像中任意取出一幅图像T属于,图像T的特征为xt,则图像I与图像T之间的权值Wit为1,图像I与k幅图像以外的图像之间的权值为0;即xi∈Nk(xt)或xt∈Nk(xi),Wit=1,其中Nk(xi)表示图像xi的k近邻集合,Nk(xt)表示图像xt的k近邻集合;得到关系矩阵W,关系矩阵W第i行第t列的值即为Wit;An image T is randomly selected from k images, and the feature of image T is x t , then the weight W it between image I and image T is 1, and the weight W it between image I and images other than k images The value is 0; that is, x i ∈ N k (x t ) or x t ∈ N k ( xi ), W it = 1, where N k (xi ) represents the k-nearest neighbor set of image x i , N k (x t ) represents the k-nearest neighbor set of the image x t ; the relationship matrix W is obtained, and the value of the i-th row and the t-column of the relationship matrix W is W it ;
公式为:The formula is:
将k幅图像中与图像I属于同一图像类的图像记为正例集合Pos,不同图像类的图像记为反例集合Neg,;The images belonging to the same image class as image I in the k images are recorded as positive example set Pos, and the images of different image classes are recorded as negative example set Neg;
(2)构建正例关系矩阵WP,如果图像R与图像I属于同一图像类且都属于k幅图像,且图像R的特征为xr,则图像I与图像R之间的权值为1,图像I与k幅图像以外的图像之间的权值为0;即,为图像I与图像R之间的权值,xi,xr∈Pos为表示特征xi,xr属于正例集合Pos,正例关系矩阵WP的第i行第r列的值即为公式为:(2) Construct a positive example relationship matrix W P , if image R and image I belong to the same image class and both belong to k images, and the feature of image R is x r , then the weight between image I and image R is 1 , the weight between image I and images other than k images is 0; that is, is the weight between the image I and the image R, x i , x r ∈ Pos is the representation feature x i , x r belongs to the positive example set Pos, the value of the i-th row and the r-th column of the positive example relationship matrix W P is The formula is:
(3)构建反例关系矩阵WN,如果图像H与图像I属于不同图像类且都属于k幅图像,图像H的特征为xh,则图像I与图像H之间的权值为1,图像I与k幅图像以外的图像之间的权值为0;即xi∈Pos且xh∈Neg或xh∈Pos且表示特征xi属于正例集合Pos,xh∈Neg表示特征xh属于反例集合Neg,xh∈Pos表示特征xh属于正例集合Pos,xi∈Neg表示特征xi属于反例集合Neg,为图像I与图像H之间的权值,反例关系矩阵WN的第i第h列为公式为:(3) Construct a negative example relationship matrix W N , if image H and image I belong to different image categories and both belong to k images, and the feature of image H is x h , then the weight between image I and image H is 1, and image The weight between I and images other than k images is 0; that is, x i ∈ Pos and x h ∈ Neg or x h ∈ Pos and Indicates that the feature x i belongs to the positive example set Pos, x h ∈ Neg indicates that the feature x h belongs to the negative example set Neg, x h ∈ Pos indicates that the feature x h belongs to the positive example set Pos, x i ∈ Neg indicates that the feature x i belongs to the negative example set Neg, is the weight between image I and image H, and the ith column h of the counterexample relationship matrix W N is The formula is:
最后构建得到三个关系矩阵W,WP和WN,其中和为计算广义特征矩阵需要用到的关系矩阵。Finally, three relationship matrices W, W P and W N are constructed, and the sum is the relationship matrix needed to calculate the generalized feature matrix.
步骤5具体包括如下步骤:从关系矩阵W出发,如果图像z是图像i的近邻图像,且图像z也是图像j的近邻图像,则采用下式计算增强图像i与图像j之间的权值W′ij:W′ij=ΣzWizWjz
其中Wiz为图像i与图像z的权值,Wjz为图像j与图像z的权值,W′ij即为增强关系矩阵W′的i行第j列值。Where W iz is the weight of image i and image z, W jz is the weight of image j and image z, and W' ij is the value of row i and column j of the enhanced relationship matrix W'.
步骤6具体包括如下步骤:
多次传播图像间的近邻关系得到新的增强关系矩阵W″,公式为W″=W′*W′;The neighbor relationship among the multi-propagation images gets a new enhanced relationship matrix W″, the formula is W″=W′*W′;
利用转移概率矩阵表示图像间的转移关系,相应的转移矩阵为P=[Pij]n×n,Pij=p(j|i)为样本数据X中任一图像i到任一图像j的转移概率,根据欧式距离选择与图像i最相似的n幅图像,图像j的特征为xj,转移概率P(j|i)的计算公式为:Use the transition probability matrix to represent the transition relationship between images, the corresponding transition matrix is P=[P ij ] n×n , and P ij =p(j|i) is the transition from any image i to any image j in the sample data X Transition probability, select n images most similar to image i according to Euclidean distance, the feature of image j is x j , the calculation formula of transition probability P(j|i) is:
其中dij=||xi-xj||2,表示图像i与图像j特征的欧氏距离。Where d ij =|| xi -x j || 2 represents the Euclidean distance between image i and image j features.
采用下式计算关系矩阵正则化增强的模型WR:The model W R enhanced by the regularization of the relationship matrix is calculated by the following formula:
WR=ηP+(1-η)geT W R =ηP+(1-η)ge T
其中,η为图像i转移到图像j这个事件发生的概率,(1-η)为图像i随机跳转的概率,g=(1/n)e,其中g是一个均匀随机分布向量,e是n维单位列向量,n即每个图像类的图像数,e=(1,1,…)T,矩阵P的第i行第j列为P(j|i);Among them, η is the probability of image i transferring to image j, (1-η) is the probability of image i jumping randomly, g=(1/n)e, where g is a uniform random distribution vector, e is n-dimensional unit column vector, n is the number of images of each image class, e=(1,1,...) T , the i-th row and j-th column of the matrix P is P(j|i);
图像i与图像j之间的新的关系权值计算公式为:The new relationship weight between image i and image j The calculation formula is:
w″ij为图像i与图像j的权值,w″ij为W″的第i行第j列的值,为图像i跳转到图像j的概率权值,为WR的第i行第j列的值;w″ ij is the weight of image i and image j, w″ ij is the value of row i and column j of W″, is the probability weight of image i jumping to image j, is the value of row i and column j of W R ;
最终得到正则化增强关系矩阵W*,W*的第i行第j列为 Finally, the regularized enhanced relationship matrix W * is obtained, and the i-th row and j-th column of W * are
步骤7中包括如下步骤:
首先从样本数据X中选取任意两幅图像的特征xi和xj,两幅图像的关系权值为Wij,两幅图像的正例关系权值为两幅图像的反例关系权值为根据以下目标方程计算得到广义特征矩阵A:First select the features x i and x j of any two images from the sample data X, the relationship weight of the two images is W ij , and the positive relationship weight of the two images is The weight of the negative relationship between the two images is The generalized characteristic matrix A is calculated according to the following objective equation:
X(LN-γLP)XTA=λXLXTA,X(L N -γL P )X T A=λXLX T A,
L为关系矩阵W的拉普拉斯矩阵,LN为反例关系矩阵WN的拉普拉斯矩阵,LP为正例关系矩阵WP的拉普拉斯矩阵,γ为与反例图像个数和正例图像个数的比值成正比的常数,XT表示样本数据X的转置矩阵,λ表示方程求解的特征值。L is the Laplacian matrix of the relationship matrix W, L N is the Laplacian matrix of the negative relationship matrix W N , L P is the Laplacian matrix of the positive relationship matrix W P , and γ is the number of negative examples A constant proportional to the ratio of the number of positive images, X T represents the transpose matrix of the sample data X, and λ represents the eigenvalue of the equation solution.
本发明中ARE为拓宽关系嵌入方法(Augmented Relation Embedding),一种拓宽关系图嵌入的流形学习降维算法,ARE主要利用正例关系矩阵与反例关系矩阵嵌入全局关系矩阵中,寻找投影矩阵,即广义特征矩阵,从而实现对数据特征的降维。In the present invention, ARE is an Augmented Relation Embedding method (Augmented Relation Embedding), a manifold learning dimensionality reduction algorithm for augmenting relational graph embedding. ARE mainly uses the positive example relationship matrix and the negative example relationship matrix to embed into the global relationship matrix to find the projection matrix. That is, the generalized feature matrix, so as to realize the dimensionality reduction of data features.
本发明原理为,样本数据X=(x1,…,xN),xi∈Rm,数据点间的关系矩阵W∈RN×N表示,矩阵的元素衡量了每对数据点间的相似度。对角矩阵D和相应的拉普拉斯矩阵L由下式定义:The principle of the present invention is that the sample data X=(x 1 ,…,x N ), x i ∈ R m , and the relationship matrix W ∈ R N×N between data points is represented, and the elements of the matrix measure the relationship between each pair of data points similarity. The diagonal matrix D and the corresponding Laplacian matrix L are defined by:
L=D-WL=D-W
Dii为对角矩阵D的第i行第i列,假设广义特征矩阵为A,通过投影完成原始数据空间的低维嵌入,A可由下式最小化求得:D ii is the i-th row and i-th column of the diagonal matrix D. Assuming the generalized feature matrix is A, the low-dimensional embedding of the original data space is completed through projection. A can be obtained by minimizing the following formula:
矩阵A的每列aj单独作用,故上式可写成argminaΣij(aTxi-aTxj)2Wij,其中a为待求的特征向量。令yi=aTxi,则有:Each column a j of matrix A acts independently, so the above formula can be written as argmin a Σ ij (a T x i -a T x j ) 2 W ij , where a is the eigenvector to be sought. Let y i =a T x i , then:
其中,y表示所有数据在a这个投影向量上的投影,且y=aTX。对转换后的坐标限制,Dii表示与第i个点相连接的个数,某种程度上说明了该点重要性程度,进而可增加约束使得yTDy=1。这一约束可使重要性高的点转换后其坐标值更加接近域原点,让最密集区域位于原点,最终求解的目标函数方程变为:Wherein, y represents the projection of all data on the projection vector a, and y=a T X . For the coordinate constraints after conversion, D ii represents the number connected to the i-th point, which explains the importance of the point to some extent, and then can increase constraints so that y T Dy = 1. This constraint can make the coordinate values of the highly important points closer to the origin of the domain after conversion, so that the densest area is located at the origin, and the final objective function equation to be solved becomes:
从推导过程来看,关系矩阵W在整个过程起着主导作用,投影后的数据点y也与W有着密切的关系,例如当Wij较大时,表示xi和xj相似度较大,降维后yi和yj间的距离也应该越小越好;若Wij较小,表示xi和xj相似度较小,降维后yi和yj间的距离也应该越大越好。这里的相似度关系可以表示数据间是否属于同一个类别,同类数据间的相似度自然很高;对于没有类别信息的数据,数据间的相似度就用近邻关系来衡量,近邻数据点间的相似度应该较高;对于既不是同类数据,也不具有近邻关系的数据点间的相似度会比较低,一般令Wij=0。From the point of view of the derivation process, the relationship matrix W plays a leading role in the whole process, and the projected data point y also has a close relationship with W. For example, when W ij is larger, it means that x i and x j are more similar. The distance between y i and y j after dimension reduction should be as small as possible; if W ij is small, it means that the similarity between xi and x j is small, and the distance between y i and y j after dimension reduction should also be larger and closer. good. The similarity relationship here can indicate whether the data belong to the same category, and the similarity between similar data is naturally high; for data without category information, the similarity between data is measured by the neighbor relationship, and the similarity between neighboring data points The degree of similarity should be high; for data points that are neither the same kind of data nor have a neighbor relationship, the similarity between data points will be relatively low, generally set W ij =0.
有益效果:本发明利用关系矩阵正则化增强表示对图像实例特征进行降维,该方法能够有效加强同类图像之间的关系,构建关系矩阵的过程中融合了数据的类别信息,使其很容易的扩展到半监督学习的框架中,从而充分利用标记数据和未标记数据,有效的提高算法的稳定性并降低计算复杂度,同时使得图像查询具有较高的准确率,因此关系矩阵正则化增强表示的图像检索方法具有较高的使用价值。Beneficial effects: the present invention utilizes the regularized enhanced representation of the relational matrix to reduce the dimensionality of image instance features. This method can effectively strengthen the relationship between images of the same type, and the category information of the data is integrated in the process of constructing the relational matrix, making it easy to Extended to the framework of semi-supervised learning, so as to make full use of labeled data and unlabeled data, effectively improve the stability of the algorithm and reduce the computational complexity, and at the same time make the image query have a high accuracy rate, so the regularization of the relationship matrix enhances the representation The image retrieval method has a high use value.
附图说明Description of drawings
图1为本发明的流程图。Fig. 1 is a flowchart of the present invention.
图2位图像实例库特征降维流程图。Figure 2. Dimensionality reduction flow chart of bit image instance library features.
图3为待检索图像特征降维流程图。Fig. 3 is a flowchart of dimensionality reduction of image features to be retrieved.
图4为图像关系增强示意图。Fig. 4 is a schematic diagram of image relationship enhancement.
图5为图像随机游走模型示意图。Figure 5 is a schematic diagram of an image random walk model.
图6位正则化增强关系示意图。Figure 6. Schematic diagram of bit regularization enhancement relationship.
图7为图像检索结果示意图。Fig. 7 is a schematic diagram of image retrieval results.
具体实施方式Detailed ways
如图1所示,本发明公开了一种基于正则化增强关系矩阵表示的图像检索方法;包含如下步骤:As shown in Figure 1, the present invention discloses a kind of image retrieval method based on regularized enhanced relational matrix representation; It comprises the following steps:
步骤1:输入待检索图像;Step 1: Input the image to be retrieved;
如图2~3所示,构建图像正则化增强关系矩阵主要由步骤2~步骤6进行,对图像实例特征库降维由步骤8进行,对待检索图像特征降维由步骤9进行:As shown in Figures 2 to 3, the construction of the image regularization enhancement relationship matrix is mainly carried out by
步骤2,抽取待检索图像和图像实例库图像的图像特征,,特征包括颜色矩、Tamura纹理特征、Gabor纹理特征和颜色直方图,用N维的向量来描述每幅图像,N=112,待检索图像为v,图像实例特征库为U=(u1,…,uM),M为图像实例库图像总数,U为N×M维矩阵;
步骤3,抽取后的特征表示每幅图像,从图像实例库中选取30个图像类,每一类表示一个语义类,每一类有100幅图像,共有3000张图像,并将其作为样本数据X,X=(x1,…,x3000),矩阵X为112×3000维;
步骤4,基于谱图理论的流形学习算法,对样本数据X构建增强关系矩阵W、正例关系矩阵WP和反例关系矩阵WN;Step 4, based on the manifold learning algorithm of spectrogram theory, construct the enhanced relationship matrix W, the positive example relationship matrix W P and the negative example relationship matrix W N for the sample data X;
步骤5,增强关系矩阵W,初步建立增强关系矩阵W′;
步骤6,借助概率转移矩阵正则化增强关系矩阵W′得到正则化增强关系矩阵W*;
步骤7,根据正则化增强关系矩阵W*和正例关系矩阵WP和反例关系矩阵WN构建目标函数,求解广义特征矩阵A;
步骤8,利用广义特征矩阵A对图像实例库中所有图像进行降维,即AU=A*(u1,…,uM)=(A*u1,…,A*uM),记yi=A*xi,i=1,…M,得到最终的图像表示Y=(y1,…,yM);Step 8, use the generalized feature matrix A to reduce the dimensionality of all images in the image instance library, that is, AU=A*(u 1 ,…,u M )=(A*u 1 ,…,A*u M ), record y i =A* xi , i=1,...M, to obtain the final image representation Y=(y 1 ,...,y M );
步骤9,如图3所示,利用广义特征矩阵A对待检索图像特征v进行降维,得到待检索图像的图像表示f=A*v;
步骤10,采用欧式距离计算待检索图像与图像实例库中所有图像的相似性,即计算||f-yi||2,i=1,…M,按照相似度由大到小输出图像实例库中与待检索图像最相似的图像。
步骤2具体包括如下步骤:
抽取每幅图像特征,即图像描述方面由颜色矩(RGB颜色空间):9维;颜色矩(LUV颜色空间):9维;Tamura纹理特征:6维;Gabor纹理特征:24维;颜色直方图(HSV颜色空间):64维组成。Extract the features of each image, that is, the image description is composed of color moments (RGB color space): 9 dimensions; color moments (LUV color space): 9 dimensions; Tamura texture features: 6 dimensions; Gabor texture features: 24 dimensions; color histogram (HSV color space): 64-dimensional composition.
步骤4具体包括如下步骤:在样本数据X中随机选取一幅图像,计算该图像与样本数据X中其他图像的欧式距离,利用相关反馈检索技术,根据返回结果中的同类图像和不同类图像对应设立正例集合和反例集合,并采用简单的k近邻方法建立关系矩阵,即属于k近邻并且是同一个图像类的两图像间的权值为1,否则为0。Step 4 specifically includes the following steps: randomly select an image in the sample data X, calculate the Euclidean distance between the image and other images in the sample data X, and use the relevant feedback retrieval technology to correspond to images of the same type and images of different types in the returned results Set up a set of positive examples and a set of negative examples, and use the simple k-nearest neighbor method to establish a relationship matrix, that is, the weight between two images belonging to the k-nearest neighbor and the same image class is 1, otherwise it is 0.
步骤4中采用基于反馈技术的嵌入关系拓宽ARE方法作为谱图理论的流形学习算法,包括以下步骤:In step 4, the embedded relationship widening ARE method based on feedback technology is used as the manifold learning algorithm of spectrogram theory, including the following steps:
(1)首先对样本数据X构建关系矩阵W,从样本数据X中随机抽取一幅图像I,图像I的特征为xi,采用k近邻方法计算xi与样本数据X中其他图像特征的欧式距离,得到与图像I最相似的k幅图像,其中k取值范围5~10;(1) First construct a relationship matrix W for the sample data X, randomly select an image I from the sample data X, the feature of the image I is x i , use the k nearest neighbor method to calculate the Euclidean relationship between x i and other image features in the sample data X distance to obtain k images most similar to image I, where k ranges from 5 to 10;
从k幅图像中任意取出一幅图像T属于,图像T的特征为xt,则图像I与图像T之间的权值Wit为1,图像I与k幅图像以外的图像之间的权值为0;即xi∈Nk(xt)或xt∈Nk(xi),Wit=1,其中Nk(xi)表示图像xi的k近邻集合,Nk(xt)表示图像xt的k近邻集合;得到关系矩阵W,关系矩阵W第i行第t列的值即为Wit;An image T is randomly selected from k images, and the feature of image T is x t , then the weight W it between image I and image T is 1, and the weight W it between image I and images other than k images The value is 0; that is, x i ∈ N k (x t ) or x t ∈ N k ( xi ), W it = 1, where N k (xi ) represents the k-nearest neighbor set of image x i , N k (x t ) represents the k-nearest neighbor set of the image x t ; the relationship matrix W is obtained, and the value of the i-th row and the t-column of the relationship matrix W is W it ;
公式为:The formula is:
将k幅图像中与图像I属于同一图像类的图像记为正例集合Pos,不同图像类的图像记为反例集合Neg,;The images belonging to the same image class as image I in the k images are recorded as positive example set Pos, and the images of different image classes are recorded as negative example set Neg;
(2)构建正例关系矩阵WP,如果图像R与图像I属于同一图像类且都属于k幅图像,且图像R的特征为xr,则图像I与图像R之间的权值为1,图像I与k幅图像以外的图像之间的权值为0;即,为图像I与图像R之间的权值,xi,xr∈Pos为表示特征xi,xr属于正例集合Pos,正例关系矩阵WP的第i行第r列的值即为公式为:(2) Construct a positive example relationship matrix W P , if image R and image I belong to the same image class and both belong to k images, and the feature of image R is x r , then the weight between image I and image R is 1 , the weight between image I and images other than k images is 0; that is, is the weight between the image I and the image R, x i , x r ∈ Pos is the representation feature x i , x r belongs to the positive example set Pos, the value of the i-th row and the r-th column of the positive example relationship matrix W P is The formula is:
(3)构建反例关系矩阵WN,如果图像H与图像I属于不同图像类且都属于k幅图像,图像H的特征为xh,则图像I与图像H之间的权值为1,图像I与k幅图像以外的图像之间的权值为0;即xi∈Pos且xh∈Neg或xh∈Pos且xi∈Pos表示特征xi属于正例集合Pos,xh∈Neg表示特征xh属于反例集合Neg,xh∈Pos表示特征xh属于正例集合Pos,xi∈Neg表示特征xi属于反例集合Neg,为图像I与图像H之间的权值,反例关系矩阵WN的第i第h列为公式为:(3) Construct a negative example relationship matrix W N , if image H and image I belong to different image categories and both belong to k images, and the feature of image H is x h , then the weight between image I and image H is 1, and image The weight between I and images other than k images is 0; that is, x i ∈ Pos and x h ∈ Neg or x h ∈ Pos and x i ∈ Pos means the feature x i belongs to the positive set Pos, x h ∈ Neg means the feature x h belongs to the negative set Neg, x h ∈ Pos means the feature x h belongs to the positive set Pos, x i ∈ Neg means the feature x i belongs to Negative set Neg, is the weight between image I and image H, and the ith column h of the counterexample relationship matrix W N is The formula is:
最后构建得到三个关系矩阵W,WP和WN,其中和为计算广义特征矩阵需要用到的关系矩阵。Finally, three relationship matrices W, W P and W N are constructed, and the sum is the relationship matrix needed to calculate the generalized feature matrix.
步骤5具体包括如下步骤:从关系矩阵W出发,如果图像z是图像i的近邻图像,且图像z也是图像j的近邻图像,则采用下式计算增强图像i与图像j之间的权值W′ij:
W′ij=∑zWizWjz W′ ij =∑ z W iz W jz
其中Wiz为图像i与图像z的权值,Wjz为图像j与图像z的权值,W′ij即为增强关系矩阵W′的i行第j列值。Where W iz is the weight of image i and image z, W jz is the weight of image j and image z, and W' ij is the value of row i and column j of the enhanced relationship matrix W'.
步骤6具体包括如下步骤:
多次传播图像间的近邻关系得到新的增强关系矩阵W″,公式为W″=W′*W′;The neighbor relationship among the multi-propagation images gets a new enhanced relationship matrix W″, the formula is W″=W′*W′;
利用转移概率矩阵表示图像间的转移关系,相应的转移矩阵为P=[Pij]n×n,Pij=p(j|i)为样本数据X中任一图像i到任一图像j的转移概率,根据欧式距离选择与图像i最相似的n幅图像,图像j的特征为xj,转移概率P(j|i)的计算公式为:Use the transition probability matrix to represent the transition relationship between images, the corresponding transition matrix is P=[P ij ] n×n , and P ij =p(j|i) is the transition from any image i to any image j in the sample data X Transition probability, select n images most similar to image i according to Euclidean distance, the feature of image j is x j , the calculation formula of transition probability P(j|i) is:
其中dij=||xi-xj||2,表示图像i与图像j特征的欧氏距离。Where d ij =|| xi -x j || 2 represents the Euclidean distance between image i and image j features.
采用下式计算关系矩阵正则化增强的模型WR:The model W R enhanced by the regularization of the relationship matrix is calculated by the following formula:
WR=ηP+(1-η)geT其中,η为图像i转移到图像j这个事件发生的概率,(1-η)为图像i随机跳转的概率,g=(1/n)e,其中g是一个均匀随机分布向量,e是n维单位列向量,n即每个图像类的图像数,e=(1,1,…)T,矩阵P的第i行第j列为P(j|i);W R =ηP+(1-η)ge T Wherein, η is the probability that image i transfers to image j this event takes place, (1-η) is the probability that image i jumps randomly, g=(1/n)e, Where g is a uniform random distribution vector, e is an n-dimensional unit column vector, n is the number of images of each image class, e=(1,1,...) T , the i-th row and j-th column of the matrix P is P( j|i);
图像i与图像j之间的新的关系权值计算公式为:The new relationship weight between image i and image j The calculation formula is:
w″ij为图像i与图像j的权值,w″ij为W″的第i行第j列的值,为图像i跳转到图像j的概率权值,为WR的第i行第j列的值;最终得到正则化增强关系矩阵W*,W*的第i行第j列为步骤7中包括如下步骤:首先从样本数据X中选取任意两幅图像的特征xi和xj,两幅图像的关系权值为Wij,两幅图像的正例关系权值为两幅图像的反例关系权值为根据以下目标方程计算得到广义特征矩阵A:X(LN-γLP)XTA=λXLXTA,w″ ij is the weight of image i and image j, w″ ij is the value of row i and column j of W″, is the probability weight of image i jumping to image j, is the value of the i-th row and j-column of W R ; the regularized enhanced relationship matrix W * is finally obtained, and the i-th row and j-column of W * is
L为关系矩阵W的拉普拉斯矩阵,LN为反例关系矩阵WN的拉普拉斯矩阵,LP为正例关系矩阵WP的拉普拉斯矩阵,γ为与反例图像个数和正例图像个数的比值成正比的常数,XT表示样本数据X的转置矩阵,λ表示方程求解的特征值。L is the Laplacian matrix of the relationship matrix W, L N is the Laplacian matrix of the negative relationship matrix W N , L P is the Laplacian matrix of the positive relationship matrix W P , and γ is the number of negative examples A constant proportional to the ratio of the number of positive images, X T represents the transpose matrix of the sample data X, and λ represents the eigenvalue of the equation solution.
实施例1Example 1
本实施例包括以下部分:This embodiment includes the following parts:
1.输入一幅待检索图像I;1. Input an image I to be retrieved;
2.抽取图像实例库和待检索图像的图像特征,各个特征和其对应的维数如下所示:2. Extract the image features of the image instance library and the image to be retrieved. Each feature and its corresponding dimension are as follows:
颜色矩(RGB颜色空间):9维;颜色矩(LUV颜色空间):9维;Tamura纹理特征:6维;Gabor纹理特征:24维;颜色直方图(HSV颜色空间):64维。这样每幅图像将用112维的向量来描述,待检索图像为v,图像实例特征库为U=(u1,…,uM),M为图像实例库图像总数,U为N×M维矩阵;Color moment (RGB color space): 9 dimensions; color moment (LUV color space): 9 dimensions; Tamura texture feature: 6 dimensions; Gabor texture feature: 24 dimensions; color histogram (HSV color space): 64 dimensions. In this way, each image will be described by a 112-dimensional vector, the image to be retrieved is v, the image instance feature library is U=(u 1 ,...,u M ), M is the total number of images in the image instance library, and U is N×M dimensions matrix;
3.从图像特征库U中选取训练样本数据,每幅图像用抽取特征表示,并从中选取30个图像类,每一类表示一个语义类,每一类有100幅图像,共有3000张图像,并将其作为样本数据X,X=(x1,…,x3000),矩阵X为112×3000维;。3. Select training sample data from the image feature library U, each image is represented by extracted features, and 30 image categories are selected from it, each category represents a semantic category, each category has 100 images, a total of 3000 images, And take it as sample data X, X=(x 1 ,...,x 3000 ), matrix X is 112×3000 dimensional;.
4.在样本数据X中随机选取一幅图像,计算该图像与样本数据X中其他图像的欧式距离,利用相关反馈检索技术,根据返回结果中的同类图像和不同类图像对应设立正例集合和反例集合,并采用简单的k近邻方法建立关系矩阵,即属于k近邻并且是同一个图像类的两图像间的权值为1,否则为0。4. Randomly select an image in the sample data X, calculate the Euclidean distance between the image and other images in the sample data X, and use the relevant feedback retrieval technology to establish a set of positive examples and corresponding images of the same type and different types in the returned results. Counterexample set, and use the simple k-nearest neighbor method to establish a relationship matrix, that is, the weight between two images belonging to the k-nearest neighbor and the same image class is 1, otherwise it is 0.
步骤4中采用基于反馈技术的嵌入关系拓宽ARE方法作为谱图理论的流形学习算法,包括以下步骤:In step 4, the embedded relationship widening ARE method based on feedback technology is used as the manifold learning algorithm of spectrogram theory, including the following steps:
(1)首先对样本数据X构建关系矩阵W,从样本数据X中随机抽取一幅图像I,图像I的特征为xi,采用k近邻方法计算xi与样本数据X中其他图像特征的欧式距离,得到与图像I最相似的k幅图像,其中k取值5;(1) First construct a relationship matrix W for the sample data X, randomly select an image I from the sample data X, the feature of the image I is x i , use the k nearest neighbor method to calculate the Euclidean relationship between x i and other image features in the sample data X Distance, to obtain k images most similar to image I, where k takes a value of 5;
从k幅图像中任意取出一幅图像T属于,图像T的特征为xt,则图像I与图像T之间的权值Wit为1,图像I与k幅图像以外的图像之间的权值为0;即xi∈Nk(xt)或xt∈Nk(xi),Wit=1,其中Nk(xi)表示图像xi的k近邻集合,Nk(xt)表示图像xt的k近邻集合;得到关系矩阵W,关系矩阵W第i行第t列的值即为Wit;An image T is randomly selected from k images, and the feature of image T is x t , then the weight W it between image I and image T is 1, and the weight W it between image I and images other than k images The value is 0; that is, x i ∈ N k (x t ) or x t ∈ N k ( xi ), W it = 1, where N k (xi ) represents the k-nearest neighbor set of image x i , N k (x t ) represents the k-nearest neighbor set of the image x t ; the relationship matrix W is obtained, and the value of the i-th row and the t-column of the relationship matrix W is W it ;
公式为:The formula is:
将k幅图像中与图像I属于同一图像类的图像记为正例集合Pos,不同图像类的图像记为反例集合Neg,;The images belonging to the same image class as image I in the k images are recorded as positive example set Pos, and the images of different image classes are recorded as negative example set Neg;
(2)构建正例关系矩阵WP,如果图像R与图像I属于同一图像类且都属于k幅图像,且图像R的特征为xr,则图像I与图像R之间的权值为1,图像I与k幅图像以外的图像之间的权值为0;即,为图像I与图像R之间的权值,xi,xr∈Pos为表示特征xi,xr属于正例集合Pos,正例关系矩阵WP的第i行第r列的值即为公式为:(2) Construct a positive example relationship matrix W P , if image R and image I belong to the same image class and both belong to k images, and the feature of image R is x r , then the weight between image I and image R is 1 , the weight between image I and images other than k images is 0; that is, is the weight between the image I and the image R, x i , x r ∈ Pos is the representation feature x i , x r belongs to the positive example set Pos, the value of the i-th row and the r-th column of the positive example relationship matrix W P is The formula is:
(3)构建反例关系矩阵WN,如果图像H与图像I属于不同图像类且都属于k幅图像,图像H的特征为xh,则图像I与图像H之间的权值为1,图像I与k幅图像以外的图像之间的权值为0;即xi∈Pos且xh∈Neg或xh∈Pos且xi∈pos表示特征xi属于正例集合Pos,xh∈Neg表示特征xh属于反例集合Neg,xh∈Pos表示特征xh属于正例集合Pos,xi∈Neg表示特征xi属于反例集合Neg,为图像I与图像H之间的权值,反例关系矩阵WN的第i第h列为公式为:(3) Construct a negative example relationship matrix W N , if image H and image I belong to different image categories and both belong to k images, and the feature of image H is x h , then the weight between image I and image H is 1, and image The weight between I and images other than k images is 0; that is, x i ∈ Pos and x h ∈ Neg or x h ∈ Pos and x i ∈ pos means that feature x i belongs to positive set Pos, x h ∈ Neg means feature x h belongs to negative set Neg, x h ∈ Pos means feature x h belongs to positive set Pos, x i ∈ Neg means feature x i belongs to Negative set Neg, is the weight between image I and image H, and the ith column h of the counterexample relationship matrix W N is The formula is:
最后构建得到三个关系矩阵W,WP和WN,为计算广义特征矩阵需要用到的关系矩阵。Finally, three relationship matrices W, W P and W N are constructed, which are the relationship matrices needed to calculate the generalized feature matrix.
5.建立初始关系增强矩阵W′,从关系矩阵W出发,如果图像z是图像i的近邻图像,且图像z也是图像j的近邻图像,则采用下式计算增强图像i与图像j之间的权值W′ij:5. Establish the initial relationship enhancement matrix W′, starting from the relationship matrix W, if image z is the neighbor image of image i, and image z is also the neighbor image of image j, then use the following formula to calculate the enhanced relationship between image i and image j Weight W′ ij :
W′ij=ΣzWizWjz W′ ij =Σ z W iz W jz
其中Wiz为图像i与图像z的权值,Wjz为图像j与图像z的权值,W′ij即为增强关系矩阵W′的i行第j列值。具体实例如图4所示,图像3是图像1的近邻图像,图像3是图像2的近邻图像,图像间用有箭头的实线连接代表近邻关系,图像1与图像2之间用虚线连接,代表图像1与图像2之间的关系需要增强。Where W iz is the weight of image i and image z, W jz is the weight of image j and image z, and W' ij is the value of row i and column j of the enhanced relationship matrix W'. The specific example is shown in Figure 4.
6.构建概率转移矩阵WR并对增强关系矩阵W′进行正则化,6. Construct the probability transition matrix W R and regularize the enhanced relation matrix W′,
多次传播图像间的近邻关系得到新的增强关系矩阵W",公式为w"=w′*w′;The neighbor relationship between images is propagated multiple times to obtain a new enhanced relationship matrix W", the formula is w"=w'*w';
利用转移概率矩阵表示图像间的转移关系,相应的转移矩阵为P=[Pij]n×n,Pij=P(j|i)为样本数据X中任一图像i到任一图像j的转移概率,根据欧式距离选择与图像i最相似的n幅图像,图像j的特征为xj,转移概率P(j|i)的计算公式为:Use the transition probability matrix to represent the transition relationship between images, the corresponding transition matrix is P=[P ij ] n×n , P ij =P(j|i) is the transition from any image i to any image j in the sample data X Transition probability, select n images most similar to image i according to Euclidean distance, the feature of image j is x j , the calculation formula of transition probability P(j|i) is:
其中dij=||xi-xj||2,表示图像i与图像j特征的欧氏距离。Where d ij =|| xi -x j || 2 represents the Euclidean distance between image i and image j features.
采用下式计算关系矩阵正则化增强的模型WR:The model W R enhanced by the regularization of the relationship matrix is calculated by the following formula:
WR=ηP+(1-η)geT W R =ηP+(1-η)ge T
其中,η为图像i转移到图像j这个事件发生的概率,η取为0.85,(1-η)为图像i随机跳转的概率,g=(1/n)e,其中g是一个均匀随机分布向量,e是n维单位列向量,n即每个图像类的图像数,e=(1,1,…)T,矩阵P的第i行第j列为P(j|i);Among them, η is the probability of image i transferring to image j, η is taken as 0.85, (1-η) is the probability of image i jumping randomly, g=(1/n)e, where g is a uniform random Distribution vector, e is an n-dimensional unit column vector, n is the number of images of each image class, e=(1,1,...) T , the i-th row and j-th column of the matrix P is P(j|i);
图像i与图像j之间的新的关系权值计算公式为:The new relationship weight between image i and image j The calculation formula is:
w″ij为图像i与图像j的权值,w″ij为W″的第i行第j列的值,为图像i跳转到图像j的概率权值,为WR的第i行第j列的值;w″ ij is the weight of image i and image j, w″ ij is the value of row i and column j of W″, is the probability weight of image i jumping to image j, is the value of row i and column j of W R ;
最终得到正则化增强关系矩阵W*,W*的第i行第j列为具体实例如图5~6所示,图5代表图像间的概率转移权值关系,图6中左上图1表示图像间的增强关系矩阵W″,两幅图像间用实线连接的是近邻图像,虚线连接代表是两幅图像之间的增强关系,右上图2表示图像间的转移概率矩阵WR,图像间用实现连接代表图像间存在转移关系,下图3代表图像间的正则化增强关系矩阵W*,由W″和WR相乘得到;Finally, the regularized enhanced relationship matrix W * is obtained, and the i-th row and j-th column of W * are Specific examples are shown in Figures 5-6. Figure 5 represents the probability transfer weight relationship between images. Figure 1 on the upper left of Figure 6 represents the enhanced relationship matrix W" between images. The adjacent images are connected by solid lines between the two images. , the dotted line connection represents the enhanced relationship between the two images, the upper right figure 2 represents the transition probability matrix W R between the images, and the realized connection between the images represents the transfer relationship between the images, and the following figure 3 represents the regularized enhanced relationship between the images Matrix W * , obtained by multiplying W″ and W R ;
7.根据正则化后的关系增强矩阵W*构建目标函数,求解广义特征矩阵A,7. Construct the objective function according to the regularized relationship enhancement matrix W * , and solve the generalized feature matrix A,
首先从样本数据X中选取任意两幅图像的特征xi和xj,两幅图像的关系权值为Wij,两幅图像的正例关系权值为两幅图像的反例关系权值为根据以下目标方程计算得到广义特征矩阵A:First select the features x i and x j of any two images from the sample data X, the relationship weight of the two images is W ij , and the positive relationship weight of the two images is The weight of the negative relationship between the two images is The generalized characteristic matrix A is calculated according to the following objective equation:
X(LN-γLP)XTA=λXLXTA,X(L N -γL P )X T A=λXLX T A,
L为关系矩阵W的拉普拉斯矩阵,LN为反例关系矩阵WN的拉普拉斯矩阵,LP为正例关系矩阵WP的拉普拉斯矩阵,γ为与反例图像个数和正例图像个数的比值成正比的常数,XT表示样本数据X的转置矩阵,λ表示方程求解的特征值。L is the Laplacian matrix of the relationship matrix W, L N is the Laplacian matrix of the negative relationship matrix W N , L P is the Laplacian matrix of the positive relationship matrix W P , and γ is the number of negative examples A constant proportional to the ratio of the number of positive images, X T represents the transpose matrix of the sample data X, and λ represents the eigenvalue of the equation solution.
8.主要利用广义特征矩阵A对图像实例特征库中图像数据进行降维得到最终的图像表示,即AU=A*(u1,…,uM)=(A*ui,…,A*uM),记yi=A*xi,i=1,…M,最终的图像表示为Y=(y1,…,yM);8. Mainly use the generalized feature matrix A to reduce the dimensionality of the image data in the image instance feature library to obtain the final image representation, that is, AU=A*(u 1 ,…,u M )=(A*u i ,…,A* u M ), record y i =A*xi i , i=1,...M, and the final image is expressed as Y=(y 1 ,...,y M );
9.主要利用广义特征矩阵A对待检索图像特征v进行降维,得到待检索图像的图像表示f,f=A*v;9. Mainly use the generalized feature matrix A to reduce the dimensionality of the feature v of the image to be retrieved, and obtain the image representation f of the image to be retrieved, f=A*v;
10.计算待检索图像与图像实例库中图像相似性:10. Calculate the similarity between the image to be retrieved and the image in the image instance database:
采用欧式距离计算待检索图像与图像实例库中所有图像的相似性,即计算||f-yi||2,i=1,…M,||f-yi||2越小相似度越大,按照相似度由大到小输出图像实例库中与待检索图像最相似的图像。如图7所示,根据欧氏距离计算待检索图像与图像实例库所有图像的相似性,根据相似度由大到小输出4幅最相似的图像。Use the Euclidean distance to calculate the similarity between the image to be retrieved and all the images in the image instance library, that is, calculate ||fy i || 2 , i=1,...M, the smaller ||fy i || The similarity is from large to small to output the image most similar to the image to be retrieved in the image instance library. As shown in Figure 7, the similarity between the image to be retrieved and all images in the image instance database is calculated according to the Euclidean distance, and the 4 most similar images are output according to the similarity from large to small.
实施例2Example 2
图1为实施例2检索流程图,图中图像来源为公用的Corel5k数据库。图中2是对原始图像进行预处理,用颜色矩、Tamura纹理特征、Gabor纹理特征和颜色直方图表示一幅图像,图中3选取特征样本,从图像实例库中选取30个图像类,每一类表示了一个语义类,每一类有100幅图像,共有3000幅图像,为了提高计算速度,只用结果集中前400幅图像作为全局的数据集,用于建立关系矩阵W,正例关系矩阵WP,反例关系矩阵WN。然后对关系矩阵W进行增强得到W′,并利用概率转移矩阵WR正则化增强关系矩阵,得到W*,然后根据正则化的增强关系矩阵W*求解目标函数的广义特征矩阵A,最后利用广义特征矩阵A对图像实例库中图像特征和待检索图像特征进行降维,对待检索图像进行检索,利用欧氏距离计算待检索图像与图像实例库中图像的相似度,按照相似度由大到小输出图像实例库中与待检索图像最相似的图像。Fig. 1 is the retrieval flowchart of
本发明提供了一种正则化增强关系矩阵表示的图像检索方法,具体实现该技术方案的方法和途径很多,以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。本实施例中未明确的各组成部分均可用现有技术加以实现。The present invention provides an image retrieval method represented by a regularized enhanced relational matrix. There are many methods and approaches to specifically realize the technical solution. The above description is only a preferred embodiment of the present invention. As far as people are concerned, some improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention. All components that are not specified in this embodiment can be realized by existing technologies.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310399734.7A CN103440332B (en) | 2013-09-05 | 2013-09-05 | A kind of image search method strengthening expression based on relational matrix regularization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310399734.7A CN103440332B (en) | 2013-09-05 | 2013-09-05 | A kind of image search method strengthening expression based on relational matrix regularization |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103440332A true CN103440332A (en) | 2013-12-11 |
CN103440332B CN103440332B (en) | 2016-08-17 |
Family
ID=49694025
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310399734.7A Expired - Fee Related CN103440332B (en) | 2013-09-05 | 2013-09-05 | A kind of image search method strengthening expression based on relational matrix regularization |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103440332B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104614411A (en) * | 2015-02-16 | 2015-05-13 | 天津大学 | Electrical tomography Lp regularized reconstruction method based on p vector equal difference decline |
CN106055576A (en) * | 2016-05-20 | 2016-10-26 | 大连理工大学 | Rapid and effective image retrieval method under large-scale data background |
CN106874268A (en) * | 2015-12-10 | 2017-06-20 | 富士通株式会社 | Image search method and image retrieval apparatus |
CN106886553A (en) * | 2016-12-27 | 2017-06-23 | 浙江宇视科技有限公司 | A kind of image search method and server |
CN114579784A (en) * | 2021-12-03 | 2022-06-03 | 北京影谱科技股份有限公司 | Fingerprint generation and retrieval method and system based on image object |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080183685A1 (en) * | 2007-01-26 | 2008-07-31 | Yahoo! Inc. | System for classifying a search query |
CN102236717A (en) * | 2011-07-13 | 2011-11-09 | 清华大学 | Image retrieval method based on sketch feature extraction |
CN103064941A (en) * | 2012-12-25 | 2013-04-24 | 深圳先进技术研究院 | Image retrieval method and device |
CN103116762A (en) * | 2013-03-20 | 2013-05-22 | 南京大学 | Image classification method based on self-modulated dictionary learning |
-
2013
- 2013-09-05 CN CN201310399734.7A patent/CN103440332B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080183685A1 (en) * | 2007-01-26 | 2008-07-31 | Yahoo! Inc. | System for classifying a search query |
CN102236717A (en) * | 2011-07-13 | 2011-11-09 | 清华大学 | Image retrieval method based on sketch feature extraction |
CN103064941A (en) * | 2012-12-25 | 2013-04-24 | 深圳先进技术研究院 | Image retrieval method and device |
CN103116762A (en) * | 2013-03-20 | 2013-05-22 | 南京大学 | Image classification method based on self-modulated dictionary learning |
Non-Patent Citations (3)
Title |
---|
罗四维等: "基于谱图理论的流形学习算法", 《计算机研究与发展》 * |
贺广南: "面向语义的图像检索关键技术研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
鲁柯: "流形学习方法在Web图像检索中的应用研究", 《中国博士学位论文全文数据库 信息科技辑》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104614411A (en) * | 2015-02-16 | 2015-05-13 | 天津大学 | Electrical tomography Lp regularized reconstruction method based on p vector equal difference decline |
CN104614411B (en) * | 2015-02-16 | 2017-03-01 | 天津大学 | The electricity tomography Lp regularization reconstruction method being declined based on p vector equal difference |
CN106874268A (en) * | 2015-12-10 | 2017-06-20 | 富士通株式会社 | Image search method and image retrieval apparatus |
CN106055576A (en) * | 2016-05-20 | 2016-10-26 | 大连理工大学 | Rapid and effective image retrieval method under large-scale data background |
CN106055576B (en) * | 2016-05-20 | 2018-04-10 | 大连理工大学 | A kind of fast and effectively image search method under large-scale data background |
CN106886553A (en) * | 2016-12-27 | 2017-06-23 | 浙江宇视科技有限公司 | A kind of image search method and server |
CN106886553B (en) * | 2016-12-27 | 2020-07-28 | 浙江宇视科技有限公司 | Image retrieval method and server |
CN114579784A (en) * | 2021-12-03 | 2022-06-03 | 北京影谱科技股份有限公司 | Fingerprint generation and retrieval method and system based on image object |
Also Published As
Publication number | Publication date |
---|---|
CN103440332B (en) | 2016-08-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Zeng et al. | Task-specific contrastive learning for few-shot remote sensing image scene classification | |
Liu et al. | D-Net: Learning for distinctive point clouds by self-attentive point searching and learnable feature fusion | |
CN109189925B (en) | Word vector model based on point mutual information and text classification method based on CNN | |
Pan et al. | CoinNet: Copy initialization network for multispectral imagery semantic segmentation | |
Zhang et al. | Cross-modal retrieval using multiordered discriminative structured subspace learning | |
Sun et al. | Scene image classification method based on Alex-Net model | |
CN105808752B (en) | A kind of automatic image marking method based on CCA and 2PKNN | |
Wu et al. | Distance metric learning from uncertain side information with application to automated photo tagging | |
CN104317838B (en) | Cross-media Hash index method based on coupling differential dictionary | |
Lu et al. | Grouped multi-attention network for hyperspectral image spectral-spatial classification | |
CN108897791B (en) | Image retrieval method based on depth convolution characteristics and semantic similarity measurement | |
CN112861929B (en) | An Image Classification Method Based on Semi-Supervised Weighted Transfer Discriminant Analysis | |
CN103440332B (en) | A kind of image search method strengthening expression based on relational matrix regularization | |
CN104484666A (en) | Advanced image semantic parsing method based on human-computer interaction | |
CN115457311B (en) | Hyperspectral remote sensing image band selection method based on self-expression transfer learning | |
He et al. | A multi-attentive pyramidal model for visual sentiment analysis | |
Zhang et al. | Structured weak semantic space construction for visual categorization | |
Zhou et al. | Deep self-taught hashing for image retrieval | |
CN115098646A (en) | A multi-level relationship analysis and mining method for graphic data | |
Lin et al. | Visual feature coding based on heterogeneous structure fusion for image classification | |
Li et al. | Multiple features with extreme learning machines for clothing image recognition | |
Song et al. | Discriminative deep feature learning for semantic-based image retrieval | |
Zhang et al. | Enhanced semantic similarity learning framework for image-text matching | |
Lai et al. | Learning sample specific weights for late fusion | |
Wu et al. | Invariant and consistent: Unsupervised representation learning for few-shot visual recognition |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160817 |