How do i store/ concatenate 100 images Histograms in one variable?

i have written a code to find Euclidean distance between two images. I use two variable N, M to store two images. Now i wonder if i do this for 100 images. How do i concatenate or store 100 images histogram in one variable?

 Accepted Answer

CurrentFile = ... something constructed from FileCounter....
CurrentImage = imread(CurrentFile);
h(FileCounter,:) = imhist(CurrentImage);

4 Comments

I am new to matlab can u please edit this code according to my program for two images?
for FileCounter = 1 : 2
CurrentFile = sprintf('%d.jpg', FileCounter);
CurrentImage = imread(CurrentFile);
h(FileCounter,:) = imhist(CurrentImage);
end
thank you very much it is really helpful.

Sign in to comment.

More Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!