This question is closed. Reopen it to edit or answer.

How to save multiple Histogram from 1 database into 1 otuput folder?

1 view (last 30 days)
I wanna call all images in database and all of them have output in histogram the after that I wanna save them into 1 output folder but I got an error for this code:
Images=dir('D:\DIAH\[MATLAB]cv1-fingerspelling-recognition-master\cv1-fingerspelling-recognition-master\imagesss\'); %Database Image folder
%......................[] ^ IS this OK?
for k = 1 : length(Images)
baseFileName = Images(k).name;
fullFileName = fullfile(Images(k), baseFileName);
methodFile = imread(fullFileName);
grayscale = rgb2gray(methodFile);
histogram = imhist(grayscale);
currentImageArray = grayscale;
for i=1:1
outputFolder = 'D:\DIAH\[MATLAB]cv1-fingerspelling-recognition-master\cv1-fingerspelling-recognition-master\Hasil Histogram Dataset\1';
% outputFileName = fullfile(outputFolder, ['Hasil Citra Lab_' num2str(i) '.jpg']);
outputFileName = fullfile(outputFolder, sprintf('Hasil Citra Ground Truth_%d_%d.jpg', k, i));
imwrite(currentImage{k}, outputFileName);

Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by