How can I create a .mat file in which I store the colour images and the corresponding histograms?

4 ビュー (過去 30 日間)
I want to create the .mat file in which I need to store the Colour images and corresponding each colour image I need to store 4 histograms in row form. Can any one help me with code how to store color image and corresponding histogram in row form?

採用された回答

Image Analyst
Image Analyst 2014 年 3 月 5 日
Make a 2D array of 1024 column by 50 rows
output = zeros(totalNumberOfImages, 1024); % Initialize
for imageNumber = 1 : totalNumberOfImages
% Compute the 4 histograms...
% Now save them
output(imageNumber, :) = [count1, count2, count3, count4];
end
do for all images, then save output (or whatever you want to call it) to a mat file
save(matFullFileName, 'output');
  57 件のコメント
Image Analyst
Image Analyst 2014 年 3 月 11 日
In out(i,:)=[1 2 3 4]; the right hand side needs to be 1024 elements long, not 4. If you have 4 histograms of 256 elements each, then it will be 1024 elements long.
radha
radha 2014 年 3 月 11 日
Exactly I had not changed that 1024 that is why I was getting error. Because my histograms has only 59 values. So not getting done my .matfile.
Now it's working fine.
Sir I am bit late to share my happiness because I was running my entire project.
It is good news for me that I have completed my project. I am very happy.
I don't know how much to say thanks to you. Without your help of my project would not be completed within deadline.
Sorry I disturbed you lot....
But Thanks a Lottttttttttt Image Analyst!!!!!!!!!!!!!!
Now I am developing GUI.
Thanks again....
You played very important role for my project. I never forget your help. Because only this .matfile work was left and you helped me to do that.
Again Thanks a Loootttt!!!!!

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by