Convert to the histogram, but the histogram values can be saved?
Show older comments
Hi, everyone. I want to convert to the histogram, but the histogram values can be saved to data_l l. can you help me?
data = guidata(gcbo);
for i = 1:5
citra3{i} = imread(['D:\,,TA,,\Skripsi Saya\Minggu, 6 Mei 2012\Tugas_Akhir1\Pelatihan\temulawak\' num2str(i) '.jpg']);
graylawak{i}=rgb2gray(citra3{i});
citra3{i} = imresize(graylawak{i}, [20 15]);
Qlawak{i} = reshape(citra3{i}, [300 1]);
Q3{i} = Qlawak{i} - mean(Qlawak{i})
end
V{i} = reshape(Q3{i}, [300 1]);
l = ([V{1} V{2} V{3} V{4} V{5}])
save data_l l;
save(fullfile(pwd, 'data_l l'));
guidata(hObject,handles);
Thanks for reading.
5 Comments
Walter Roberson
on 12 Nov 2012
Convert what to a histogram? And with which bin edges?
Jan
on 12 Nov 2012
"Cannot be saved" is a vague description of the problem. Please explain, what exactly happens and how this differs from your expectations. While this forum is good for solving problems, it is bad for guessing them.
Dian Permatasari
on 14 Nov 2012
Image Analyst
on 16 Nov 2012
What is "the distance functions method"?
Dian Permatasari
on 17 Nov 2012
Accepted Answer
More Answers (1)
Image Analyst
on 17 Nov 2012
I don't know what all that resizing and reshaping is for. If you want the histogram just use imhist():
% Let's compute and display the histogram.
[pixelCount grayLevels] = imhist(grayImage);
bar(pixelCount);
grid on;
title('Histogram of original image', 'FontSize', fontSize);
xlim([0 grayLevels(end)]); % Scale x axis manually.
Then if you want to save it, use save() or fprintf().
Categories
Find more on Histograms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!