MATLAB: 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.

.mat fileImage Processing Toolbox

Best Answer

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');