How do I produce a solid green image directly above an imported image

3 次查看(过去 30 天)
I have imported an image and I require there to be a solid green image of the same dimensions directly above the imported image. How would I go about doing this? I have attempted using patch but to no success.
  2 个评论
KALYAN ACHARJYA
KALYAN ACHARJYA 2019-6-3
编辑:KALYAN ACHARJYA 2019-6-3
directly above the imported image??
Question is not clear? What result you are expecting? May be you require one green image (plane) having size equal to the processed image. Clarify ?
HG24
HG24 2019-6-3
编辑:HG24 2019-6-3
Essentially I require 2 images, one of a solid green square and beneath it my imported image. I have attached an image of it

请先登录,再进行评论。

采纳的回答

KSSV
KSSV 2019-6-3
I1 = imread('peppers.png') ;
[nx,ny,nz] = size(I1) ;
I2 = zeros(nx,ny,nz) ;
I2(:,:,2) = 255 ;
I12 = vertcat(I2,I1) ;
imshow(I12)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by