how to show my extracted features

i have a image eg: 400*300 size, but after i do feature extraction, it give me a vector for example like [11800 11811 11823......] . And now i need to show my extracted vector which is [11800 11811 11823......] ,anyoone can tell me how?? i have tried using reshape but it does not work since my extracted vector not same size with my original image ... it is a single 19128x1 vector only...

Answers (2)

%if 'feature' is the vector contains feature values then use
disp(feature)

2 Comments

i tried and it just give me a column of coordinate vector, i nid to display it as a image , anny idea?
It's strange that you ignored my answer when you asked the same thing of me in my Answer. Any reason why? If you didn't ignore it and it didn't work for you, then post your non-working code.

Sign in to comment.

You can just put it by itself on the command line:
featureVector % No semicolon
to display it in the command window, or you could use fprintf if you want some more control over how it's formatted:
fprintf('%.2f ', featureVector);
or you could put it into a message and display it.
message = sprintf('%.2f ', featureVector);
uiwait(helpdlg(message));
or you could put it into a static text label in a GUI.
set(handles.text1, 'String', message);
or you could look at it in the variable editor. I could go on, but so as to not waste my time, how and where would you like to see it?

11 Comments

i have tried as what you mentioned above but it do not show up anything... for correction and more precise, let say I have find out the pixels in a image which > 180 in greyscale, now i wan to show this feature which >180 only ,can you teach me how to do it ??
You said "i do feature extraction" and you said that you got results: " it give me a vector for example like [11800 11811 11823......]". Your original question was how to display that vector. Are you now saying that you don't know how to do feature extraction???
I know how to do, now is another case, if i wan to show the pixel value > 180 in greyscale , after i use function find(xxx>180) then i am stuck again . Can u teach me how to show it as a image?
% Threshold the image to get a 2D binary image
% of where pixel values are >180
binaryImage = grayImage > 180;
% Display the binary image
imshow(binaryImage);
% Extract the values into a 1-D list of gray levels:
theGrayLevels = grayImage(binaryImage);
i have the same problem i want to show the features on image to decide if it separate the forg/back or not so mr, image analyst can you explain it more
I don't know what "separate the forg/back or not so mr" means. Please read this link and then post your question and your image in a new question.
I would like to know how to write the code for the visualization the features
( i used LBP to extract 256 features )
means : Do not these features represent parts of the image?
I want to know the features that give the part of the lung
so I want a code to see the features
What are the 256 features? Each pixel will have a LBP, so if you have a million pixels, you have a million LBP values. So how did you turn so many values into a feature vector with 256 measurements? Is each element of the feature vector the mean of a column and you have 256 columns? I have no idea. And your LBP image doesn't seem to show any pattern inside or outside of the lungs.
Salma Hassan
Salma Hassan on 11 May 2017
Edited: Salma Hassan on 11 May 2017
ok ,,it seems that i misunderstand . but i used this code , http://quantgreeks.com/local-binary-pattern-in-matlab
can you guide me how to determine the inside and outside of lung ? and is there a type of local texture features extraction called local average
@Image Analyst I used HOG descriptor code which is posted by Sanyam Garg (<http://www.mathworks.com/matlabcentral/fileexchange/46408-histogram-of-oriented-gradients--hog--code-using-matlab>)
function [feature] = hog_feature_vector(im)
can you help me to change the feature to an image after the function returns the feature?
No - I suggest you ask Sanyam Garg about his code.

Sign in to comment.

Asked:

on 11 Feb 2015

Commented:

on 4 Jun 2017

Community Treasure Hunt

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

Start Hunting!