ある2値画像に白い線を引いて保存したいのですができません.
Show older comments
ある2値画像に白い線を引いて保存したいのですができません. 違う色だと保存できるのですが,白だと保存できません.なにが原因でしょうか?
imshow(BW_IMG,'Border','tight');
hold on
plot(X,Y,'w');
print('A.bmp','-dpng','-r0');
3 Comments
Image Analyst
on 15 Apr 2017
I don't understand the question.
以下のコードでは、グレースケールの画像に白のラインを描いて保存ができています。
I = imread('peppers.png');
BW_IMG = rgb2gray(I);
X = 50:100;
Y = 50:100;
imshow(BW_IMG,'Border','tight');
hold on
plot(X,Y,'w');
print('A.bmp','-dpng','-r0');

問題の切り分けをするために、以下の点について教えていただけますでしょうか。
- 画像を保存する前の plot 関数実行後の出力画像上では白のラインは見えていますでしょうか。
- 画像の白い部分に白の線をのせているということはありませんでしょうか。
- 黒のラインではいかがでしょうか。
Yumi Iwakami
on 10 Jul 2017
Accepted Answer
More Answers (0)
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!