error using imwrite command
显示 更早的评论
I am using the imwrite commant for writing the image but i have an error 'you might not have write permission'...How can i resolve it..i am using the following code.
clear cam
cam=webcam;
for i=1:10
A=snapshot(cam);
cam.Resolution='320x240';
imwrite(A,['133MC',num2str(i),'.jpg']);
end
v=VideoWriter('myVideo.avi');
v.FrameRate=2;
open(v)
for i=1:10
K=imreade(['133MC',num2str(i),'.jpg']);
writeVideo(v,K);
end
close(v)
Error is:
Error using imwrite (line 467)
Unable to open file "133MC1.jpg" for writing. You might not have write permission.
Error in Lab3 (line 27)
imwrite(A,['133MC',num2str(i),'.jpg']);
采纳的回答
更多回答(1 个)
ansha nisar
2021-8-12
0 个投票
I am using the imwrite commant for writing the image but i have an error 'you might not have write permission'. How can I resolve it?
1 个评论
Walter Roberson
2021-8-12
It looks like the folder C:\Users\user\Desktop\patch might not exist. You may need to create it if that is where you want your images to be written.
类别
在 帮助中心 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!