ある2値画像に白い線を引いて保存したいのですができません.
Afficher commentaires plus anciens
ある2値画像に白い線を引いて保存したいのですができません. 違う色だと保存できるのですが,白だと保存できません.なにが原因でしょうか?
imshow(BW_IMG,'Border','tight');
hold on
plot(X,Y,'w');
print('A.bmp','-dpng','-r0');
3 commentaires
Image Analyst
le 15 Avr 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
le 10 Juil 2017
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Image Processing Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!