在图像匹配中使用偏度和峰度函数
我在图像检索系统中使用图像颜色直方图的偏度和峰度函数作为统计颜色特征,然后使用这些特征来比较两个图像以检索相似性图像......但我在一些结果中得到“NaN”值这会导致图像检索过程中出现错误:
S=double(imread('im.jpg'); R=S(:,:,1)/64; R1=floor(R); G=S(:,:,2)/64; G1=floor(G); B=S(:,:,3)/64; B1=floor(B); [rr cc c]=size(R1); ImageHist = zeros(4,4,4); for row = 1 :rr for col = 1:cc ImageHist(R1(row,col)+1, G1(row,col)+1,B1(row,col)+1 )= ImageHist(R1(row,col)+1, G1(row,col)+1,B1(row,col)+1)+1; end end ImageHist = ImageHist/(rr*cc);
然后我将峰度计算为:
QKurColHis = kurtosis(ImageHist);
我对第二个函数(偏度)进行同样的操作
是否适合使用此函数到颜色直方图来提取颜色特征?然后在图像检索中使用它?
如果没问题,如何纠正此错误,如何从 mat.file 中删除 NaN
值?
我想使用这些函数作为彩色图像之间匹配的图像特征...有人可以帮助我解决这个问题吗?
I am using the skewness and kurtosis functions for image color Histogram in image retrieval system as a statistical color features then using these features to compare between two images to retrieve the similarity images....but I get 'NaN' value in some results which is causes an error in image retrieval process:
S=double(imread('im.jpg'); R=S(:,:,1)/64; R1=floor(R); G=S(:,:,2)/64; G1=floor(G); B=S(:,:,3)/64; B1=floor(B); [rr cc c]=size(R1); ImageHist = zeros(4,4,4); for row = 1 :rr for col = 1:cc ImageHist(R1(row,col)+1, G1(row,col)+1,B1(row,col)+1 )= ImageHist(R1(row,col)+1, G1(row,col)+1,B1(row,col)+1)+1; end end ImageHist = ImageHist/(rr*cc);
then I compute the Kurtosis as:
QKurColHis = kurtosis(ImageHist);
I make the same thing to second function (skewness)
It is suitable to use this function to the color histogram to extract color feature? then using it in image retrieval?
if it is OK, how can I correct this Error, how can I remove the NaN
values from my mat.file?
I want to use these function as image features in matching between color images... any one please could help me to solve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道内置峰度函数是如何工作的,但可能您必须为其提供一个向量而不是 3D 矩阵作为输入
除了 NaN 问题之外,峰度和偏度还为您提供了有关数据统计分布的一些信息在 ImageHist 中,因此它们可以被视为一些图像特征。但它们在图像匹配方面的表现如何还很难说。
I don't know how the builtin kurtosis function is working but it might be that you have to supply it a vector instead of 3D matrix as an input
Apart from the NaN problem, kurtosis and skewness give you some info about statistical distribution of the data in ImageHist so they could be treated as some image features. But how good will they perform in image matching is hard to say.