作者FaFaFaT (肥肥肥T)
看板MATLAB
標題[討論] 畫rectangle問題
時間Mon Jan 16 20:06:28 2017
我現在有許多rectangle的座標
我想要把他們畫在影像上然後儲存
a=imread([ int2str(i) '.jpg']); % i張影像
b=figure(1);
imshow(a);
hold on
for j=1:3
rectangle('Position',data(j),'EdgeColor','r','LineWidth',2); % j個rectangle
end
使用saveas 或著print 都會有白邊而且尺寸與原影像不同
使用imwrite 尺寸相同 但是rectangle會上不去 也就是純粹輸出原始影像
有沒有什麼解法呢?
--
sent from my asshole
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.113.149.33
※ 文章網址: https://webptt.com/m.aspx?n=bbs/MATLAB/M.1484568394.A.215.html
1F:推 sunev: rectangle後應該就不是矩陣了,而是matlab的內定格式,figure 01/17 15:49