Displaying Images after feature extraction

I have a image and have extracted texture features
g=rgb2gray(g);
glcm=graycomatrix(g);
F=graycoprops(glcm,'Contrast','Homogeneity','Correlation','Energy'});
contrast=F.Contrast;
homogeneity=F.Homogeneity;
correlation=F.Correlation;
energy=F.Energy;
now how to display the image as below
in result i have res=[contrast energy homogeneity]
based upon the feature exracted feature result please tell how to apply kmeans on images

回答 (1 件)

Amith Kamath
Amith Kamath 2013 年 1 月 17 日

0 投票

If you have four images in I, J, K and L, you could do this,
figure
subplot(2,2,1); imshow(I)
subplot(2,2,2); imshow(J)
subplot(2,2,3); imshow(K)
subplot(2,2,4); imshow(L)

6 件のコメント

FIR
FIR 2013 年 1 月 18 日
But the thing is that contrast and others features has a single value
Image Analyst
Image Analyst 2013 年 1 月 18 日
So what? Your image just had 4 pictures with titles. If you want numbers to be in the title you can do that.
caption = sprintf('Contrast = %.1f', contrast);
title(caption, 'FontSize', 24);
FIR
FIR 2013 年 1 月 19 日
i have extracted features [contrast energy homogeneity],the contrast and others have single vaues,,how can we display the image ,but how to do it, supposre
energy is 23.98,how can we display the energy diagram
Image Analyst
Image Analyst 2013 年 1 月 19 日
images are displayed with imshow().
imshow(yourImage);
Text is displayed with set(), text(), fprintf(), etc.
fprintf('The energy = %.2f', energy);
set(handleToStaticText, 'String', 'Blah blah blah');
I don't know what you consider an energy diagram. Perhaps it's a matrix so you can display with imshow:
imshow(myEnergyDiagram, []);
FIR
FIR 2013 年 1 月 19 日
its not a matrix that y the problem,a single vale for whole matrix say 23.98
Image Analyst
Image Analyst 2013 年 1 月 19 日
編集済み: Image Analyst 2013 年 1 月 19 日
Did you see the middle part of my comment above, where I showed you how to display a number as a text label on your GUI or in the command window? P.S., to make it easier on us, you might use Firefox, which has a spell checker built into it. Please proofread your comments because all too frequently they don't make sense:
vale
noun
1. a valley.
2. the world, or mortal or earthly life: this vale of tears.

サインインしてコメントする。

タグ

質問済み:

FIR
2013 年 1 月 17 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by