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!