error-different values for same image
显示 更早的评论
I am performing feature extraction,i have 80 images in data base,i am extracting 3 features,and have saved ,them,next am taking first image from that 80 images and have extracted same features .and have saved it.
wen i compare i get different same values for 2 feature extraction and for third feature extraction ,i get different values
the feature extraction aye
two colours and one texture
the code for texture is
g=rgb2gray(I);
rgb=mean(mean(I));
r1=rgb(:,:,1);
g1=rgb(:,:,2);
b1=rgb(:,:,3);
std1=std2(g);
entropy1=entropy(g);
tres=graythresh(g);
glcm=graycomatrix(g);
F=graycoprops(glcm,{'Contrast','Homogeneity','Correlation','Energy'});%graycoprops(glcm, properties)
%calculates the statistics specified in properties from the gray-level co-occurence matrix glcm
contrast=F.Contrast;
homogeneity=F.Homogeneity;
correlation=F.Correlation;
energy=F.Energy;
final_tex=[contrast,homogeneity,correlation,energy];
final_textq=final_tex;
save('final_text_Query', 'final_textq');
FinalOut2_Query = final_tex
please help
1 个评论
Walter Roberson
2012-2-4
You somehow left out your question.
回答(2 个)
Walter Roberson
2012-2-4
0 个投票
There is no reason to expect that different features will always give the same value. Feature extraction uses multiple features. When you do CBIR you match against the multiple features and come up with a majority or "most matches" or consensus decision knowing that not every feature will match.
Image Analyst
2012-2-4
0 个投票
Either your image is not the same like you thought it was, or you ran a different piece of code on the same image. Because running the same set of code on the same image will give the same result, unless you somehow used a function call to a random number generator (like rand, randi, randperm, etc.).
类别
在 帮助中心 和 File Exchange 中查找有关 Texture Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!