Kindly Help me to resolve the error.Error using imwrite (line 541) Unable to open file "H:\VFGLE_DemoRelease\save\T2.jpg" for writing. You might not have write permission. Error in demo (line 27) imwrite(I,path);
2 次查看(过去 30 天)
显示 更早的评论
clc;
clear all
close all
srcFile=dir('H:\sample data\*.jpg');
for i=1:length(srcFile)
filename=strcat('H:\VFGLE_DemoRelease\',srcFile(i).name);
I=imread(filename);
% % % Parameters setting
alpha = 0.5;
beta = 0.5;
gamma = 1;
tao = 0.02;
iterNum = 20;
% Processing with our method
img_out = VFGLE(I,alpha,beta,gamma,tao,iterNum);
% Show results
figure,imshow((img_out));
path=strcat('H:\VFGLE_DemoRelease\save\',srcFile(i).name);
imwrite(I,path);
end
0 个评论
采纳的回答
Walter Roberson
2020-9-19
The destination directory does not exist or else you do not have permission to write files there.
Question: why are you getting file names from one directory and assuming that the same name exists in a different directory??
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!