Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Avoiding coloured pixels in text

1 回表示 (過去 30 日間)
Carl  Ionstion
Carl Ionstion 2019 年 11 月 14 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hello
When I add text to a graph, text color is not perfect. For example, if it's blue, when you zoom it there are small orange pixels.
How can I avoid this or change this colormap?
Thanks
  2 件のコメント
Guillaume
Guillaume 2019 年 11 月 14 日
編集済み: Guillaume 2019 年 11 月 14 日
That's the typical behaviour of antialising and is performed so that the edges of the text appear smooth. Why is this a problem anyway?
Carl  Ionstion
Carl Ionstion 2019 年 11 月 15 日
I need it smoothed in monochrome because another program will use them and it's color based and it gets crazy.

回答 (3 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 11 月 14 日
Chnage the color of Text, there are multiple features to change the color of the text
RGB = insertText(I,position,text_str,'FontSize',18,'BoxColor',box_color,'BoxOpacity',0.4,'TextColor','white');
Detail here
  2 件のコメント
Carl  Ionstion
Carl Ionstion 2019 年 11 月 14 日
Thanks, but the problem is the same, when you zoom the image the colormap used for the text is full of pastel colors and, even if you are using the "blue" color, zooming to a pixel level shows it. I need to change the colorpam used for dithering the text.
KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 11 月 14 日
If you could share the figure, it may help to illustrates easily.

Carl  Ionstion
Carl Ionstion 2019 年 11 月 14 日
a.png
Sure. As you can see, when you zoom it it's like a disco.
text(0.02 , 0.5 , 'E.On: Electric Water'] , 'FontSize', 8, 'FontWeight','bold','FontName','Century Gothic', 'Color',double([20 35 124])/255);
  1 件のコメント
Image Analyst
Image Analyst 2019 年 11 月 14 日
What makes you think it's MATLAB doing it instead of the operating system or your video adapter?

Carl  Ionstion
Carl Ionstion 2019 年 11 月 15 日
Probably is has something to do with the operating system, but since there are programs that do that like Matlab and R and programs that don't do that, like Excel, there must be a way to solve it.

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by