イメージを MATLAB に読み込み、その上に四角形を描画して、イメージを保存したいと考えています。
また、私は MATLAB を学習しているところです。お手柔らかにお願いします。簡単なように思えますが、私にはできないようです。
im = imread('image.tif');
imshow(im);
rectangle('Position', [100, 100, 10, 10]);
imwrite(im, 'image2.tif');
画像に四角形が表示されますが、保存された画像には四角形が表示されません。画像を保存して長方形を表示するにはどうすればよいですか?
FWIW、私はすでに試しましsaveas()
たが、それは私に巨大なイメージを与えます. saveas()
保存した画像を使用して正しいサイズにする方法はありますか?