[問題]畫圖存圖片問題
我將影片讀取後
用
hold on
rectangle('Position',BB(m,:),'LineWidth',4,'LineStyle','-','EdgeColor','b');
畫長方形加上去
跑出來的圖是正常的
但用
imwrite(I,strcat(inputPath,'pic',num2str(a),'.jpg'),'jpg');
存檔時卻沒把長方形存進去
有大大知道怎麼解決嗎?
感謝!!!
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.113.202.193
※ 文章網址: http://www.ptt.cc/bbs/MATLAB/M.1405944923.A.8D2.html
→
07/22 07:54, , 1F
07/22 07:54, 1F
我用saveas似乎不能改變路徑
用cd以後還是會出現
Error using saveas (line 59)
Invalid handle.
saveas(I,strcat('pic',num2str(a),'.jpg'),'jpg');
※ 編輯: forb9823018 (140.113.202.193), 07/22/2014 15:22:17
用 print(I,'-djpeg',strcat(outputPath,'pic',num2str(a)));
會顯示以下的error
Error using LocalCheckHandles (line 77)
Handle input must be scalar, vector, or cell-array of vectors.
Error in C:\Program
Files\MATLAB\R2012a\toolbox\matlab\graphics\private\checkArgsForHandleToPrint.p>checkArgsForHandleToPrint
(line 30)
Error in print>LocalCreatePrintJob (line 366)
handles = checkArgsForHandleToPrint(0, varargin{:});
Error in print (line 160)
[pj, inputargs] = LocalCreatePrintJob(varargin{:});
※ 編輯: forb9823018 (140.113.202.193), 07/22/2014 16:23:57
→
07/22 17:07, , 2F
07/22 17:07, 2F
→
07/22 17:08, , 3F
07/22 17:08, 3F
→
07/22 17:09, , 4F
07/22 17:09, 4F