Re: problem with 'imshow'
- From: amelie <amelie.quinet@xxxxxxxxxxxxxx>
- Date: Tue, 28 Feb 2006 09:48:36 -0500
Dave Robinson wrote:
Ken Davis wrote:
write
"amelie" <amelie.quinet@xxxxxxxxxxxxxx> wrote in message
news:ef2a6d9.-1@xxxxxxxxxxxxxxxxxxx
Dear all,
I've got an image 480*640*3. I don't understand why, when I
:result.
imshow(image(:,:,1)) or
imshow(image(:,:,2)) or
imshow(image(:,:,3))
the images I observe are the same (color).
I want to observe red,blue and green components.
I tried with different images, and it's always the same
Is it normal ?
Regards
Amélie
Red = MyImage(:,:,1)
Green = MyImage(:,:,2)
will produce two single plane images, which whilst Red will contain
the red information, & Green will contain the green information, if
you display either of these planes using imshow(Red) or
imshow(Green)
will both generate a greyscale image.
If you want them to display different colours then generate an
empty
buffer, the same size as your images
Buffer = zeros(rows,columns);
Now form the following
New_Red = cat(2,Red,Buffer,Buffer);
New_Green = cat(2,Buffer,Green,Buffer);
New_Blue = cat(2,Buffer,Buffer,Blue);
Hope that helps
Dave Robinson
Thanks !!
.
- References:
- problem with 'imshow'
- From: amelie
- Re: problem with 'imshow'
- From: Ken Davis
- Re: problem with 'imshow'
- From: Dave Robinson
- problem with 'imshow'
- Prev by Date: Re: How to Generate Uniform White Noise?
- Next by Date: functions or library in C
- Previous by thread: Re: problem with 'imshow'
- Next by thread: a set of ode while two of them are coupled
- Index(es):
Relevant Pages
|