[問題]imwrite

看板MATLAB作者 (風過無痕)時間9年前 (2014/07/20 22:34), 9年前編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
inputPath = 'C:/Program Files/MATLAB/R2012a/'; outputPath ='C:/Program Files/MATLAB/R2012a/'; mov=VideoReader('star.3gp'); numFrames = mov.NumberOfFrames; for k=1:numFrames frame = read(mov,k); imshow(frame); imwrite(frame,strcat(inputPath ,num2str(k),'.jpg'),'jpg'); end 執行後會顯示 Error using imwrite (line 459) Can't open file "C/Program Files/MATLAB/R2012a/1.jpg" for writing. You may not have write permission. 更改CurrentFolder Matlab所有function都會error 只能在'C/Program Files/MATLAB/R2012a/'下跑 另外將檔案存到桌面也沒用 網路上找到很多方法但似乎都沒效 找到一個可能的問題就是有人在WIN7會error其他版本就行... 似乎是安全權限的問題但我不知道怎麼調 有人知道解決方法的嗎?感謝!! -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.113.202.193 ※ 文章網址: http://www.ptt.cc/bbs/MATLAB/M.1405866845.A.26F.html ※ 編輯: forb9823018 (140.113.202.193), 07/20/2014 22:58:50

07/20 23:19, , 1F
找到解決方法了,在不用安全權限的資料夾用就好了
07/20 23:19, 1F
文章代碼(AID): #1JozDT9l (MATLAB)