function preprocessing_multiplesrcFiles = dir('C:\Users\LENOVO\Desktop\Genuine\1\*.png'); % the folder in which ur images exists
for i = 1 : length(srcFiles) filename = strcat('C:\Users\LENOVO\Desktop\Genuine\1\',srcFiles(i).name); I = rgb2gray(imread(filename)); imshow(I) I2=medfilt2(I); figure,imshow(I2)imwrite(I2,fullfile('C:\Users\LENOVO\Desktop\','*.png'));end
I got error in above code:
Error using imwrite (line 454)
Unable to open file "C:\Users\LENOVO\Desktop\*.png" for writing. You may not
have write permission.
Error in preprocessing_multiple (line 11)
imwrite(I2,fullfile('C:\Users\LENOVO\Desktop\','*.png'));
Best Answer