Define a RGBa color- transparency
96 次查看(过去 30 天)
显示 更早的评论
Dear all,
is there a workaround to create, for example, a transparent yellow? Apparently Matlab colormap only works with RGB notations, not RGBa. My idea was: trans_yellow=[1 1 0 0.5] I want to define a transparent color, just changing the alpha value for the whole plot does not work for me.
Thanks!
1 个评论
deeksha rastogi
2016-12-31
移动:DGM
2022-11-8
but what are the exact working of alpha matting and please write down its source code in matlab.
回答(4 个)
Rini Varghese
2016-4-5
You can modify most object colors with 4 input arguments (RGBa notation) in MATLAB (2015). E.g. rectangle(x,y,w,h,'facecolor',[0 1 0,0.08]) will yield a transparent green box. Hope this helps!
0 个评论
Dhanyatha
2014-7-3
编辑:Dhanyatha
2014-7-3
Currently, the colormap function does not accept more than 3 arguments. However,you can use the TIFF class in MATLAB to specify the alpha parameter for the image.
To read RGBA image, you can use readRGBAImage(),readRGBATile() or readRGBAStrip() functions. These functions reads image data as RGB, with associated alpha parameter.
0 个评论
Image Analyst
2014-7-3
Perhaps - take a look at Steve's blog and see if it's what you want: http://blogs.mathworks.com/steve/2009/02/18/image-overlay-using-transparency/
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!