matlab中如何给特定区域填充色彩?
3个回答
展开全部
使用fill函数,具体的方法是
fill(x,y,c)
其中区域是使用x和y来指定,c来指定颜色
例如fill([0 1 1 0],[0 0 1 1],'r')是给一个矩形区域填充红色
FILL(X,Y,C) fills the 2-D polygon defined by vectors X and Y
with the color specified by C. The vertices of the polygon
are specified by pairs of components of X and Y. If necessary,
the polygon is closed by connecting the last vertex to the first.
If C is a single character string chosen from the list 'r','g','b',
'c','m','y','w','k', or an RGB row vector triple, [r g b], the
polygon is filled with the constant specified color.
祝你学习愉快!
fill(x,y,c)
其中区域是使用x和y来指定,c来指定颜色
例如fill([0 1 1 0],[0 0 1 1],'r')是给一个矩形区域填充红色
FILL(X,Y,C) fills the 2-D polygon defined by vectors X and Y
with the color specified by C. The vertices of the polygon
are specified by pairs of components of X and Y. If necessary,
the polygon is closed by connecting the last vertex to the first.
If C is a single character string chosen from the list 'r','g','b',
'c','m','y','w','k', or an RGB row vector triple, [r g b], the
polygon is filled with the constant specified color.
祝你学习愉快!
展开全部
使用fill函数,具体的方法是:
fill(x,y,c)。
其中区域是使用x和y来指定,c来指定颜色。
例如fill([0 1 1 0],[0 0 1 1],'r')是给一个矩形区域填充红色。
FILL(X,Y,C) fills the 2-D polygon defined by vectors X and Y with the color specified by C. The vertices of the polygon are specified by pairs of components of X and Y. If necessary,
the polygon is closed by connecting the last vertex to the first.
If C is a single character string chosen from the list 'r','g','b',
'c','m','y','w','k', or an RGB row vector triple, [r g b], the polygon is filled with the constant specified color.
fill(x,y,c)。
其中区域是使用x和y来指定,c来指定颜色。
例如fill([0 1 1 0],[0 0 1 1],'r')是给一个矩形区域填充红色。
FILL(X,Y,C) fills the 2-D polygon defined by vectors X and Y with the color specified by C. The vertices of the polygon are specified by pairs of components of X and Y. If necessary,
the polygon is closed by connecting the last vertex to the first.
If C is a single character string chosen from the list 'r','g','b',
'c','m','y','w','k', or an RGB row vector triple, [r g b], the polygon is filled with the constant specified color.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
把每个像素按照rgb分量分别赋值,最后用imshow显示图像即可
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询