|
ImageAnalyst <imageanalyst@mailinator.com> wrote in
message <b3ae8c26-58d4-4d13-a310-
21ee04de4570@34g2000hsz.googlegroups.com>...
> On Feb 26, 12:09=A0am, "Vihang Patil"
<vihang_pa...@yahoo.com> wrote:
> > ImageAnalyst <imageanal...@mailinator.com> wrote in
message
> >
> > <f50429ea-c28c-4076-a7c1-
ba96c243b...@n58g2000hsf.googlegroups.com>...
> >
> >
> >
> > > On Feb 25, 12:48=3DA0pm, "Mario " <nos...@yahoo.com>
wrote:
> > > > "Ashish Uthama" <auth...@mathworks.com> wrote in
message
> >
> > > > <op.t6xs3xlfkk0...@uthamaa.dhcp.mathworks.com>...
> >
> > > > > Tye the .* operation
> >
> > > > > man =3D3D3D picture.*mask
> >
> > > > that's what I thought.. but the picture is
<480x640x3 uint8>
> > > > and mask is <480x640 uint8>
> > > > so I tried to do the .* operation between the 3
color
> > > > channel (probably there's a faster way, thanks if
u can
> > > > suggest me..) but, at the end, the image I see is
still
> > b&w..
> >
> > > > this is the code
> >
> > > > imageR=3D3Dmask.*picture(:,:,1);
> > > > imageG=3D3Dmask.*picture(:,:,2);
> > > > imageB=3D3Dmask.*picture(:,:,3);
> > > > imageRGB=3D3Dzeros(480,640,3);
> > > > imageRGB(.,:,1)=3D3DimageR;
> > > > imageRGB(:,:,2)=3D3DimageG;
> > > > imageRGB(:,:,3)=3D3DimageB;
> > > > imshow(imageRGB);
> >
> >
=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3
D=3D3D=3D3D=3D3=
> D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=AD=3D
> >
> >
=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3
D=3D3D=3D3D=3D3=
> D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D> Mario:
> > > It should work. =A0Try this demo with a standard
MATLAB demo
> > image and
> > > let us know if you don't get a masked image that's
full color:
> > > Regards,
> > > ImageAnalyst
> > > P.S. You had a syntax error in the line
> >
> > imageRGB(.,:,1)=3D3DimageR; where
> >
> >
> >
> >
> >
> > > you had a dot instead of a colon.
> >
> > > % Macro to demo masking of color image.
> > > picture=3D3Dimread('autumn.tif');% Open standard
MATLAB demo
> > image.
> > > subplot(2,2,1);
> > > imshow(picture);
> > > title('Original');
> > > mask =3D3D uint8(picture(:,:,1) < 200); % Get mask of
> > non-sky region
> > > subplot(2,2,2);
> > > imshow(mask, []);
> > > title('Mask');
> > > imageR=3D3Dmask .* picture(:,:,1);
> > > imageG=3D3Dmask .* picture(:,:,2);
> > > imageB=3D3Dmask .* picture(:,:,3);
> > > imageRGB(:,:,1)=3D3DimageR;
> > > imageRGB(:,:,2)=3D3DimageG;
> > > imageRGB(:,:,3)=3D3DimageB;
> > > subplot(2,2,4);
> > > imshow(imageRGB);
> > > title('Sky Masked Out');
> >
> > This is to ImageAnalyst
> > Why do you use the word "3D" everwhere?. It makes the
code
> > and the readable matter so difficult to understand..
> > Could you please avoid it.
> > Vihang- Hide quoted text -
> >
> > - Show quoted text -- Hide quoted text -
> >
> > - Show quoted text -
>
> ---------------------------------------------------------
-------------------=
> ------------------------------------
> Vihang:
> I agree it's annoying. I don't put in a 3D after every
equals sign.
> In fact when I look up the posts in Google, only your
responses to me
> have the 3D in them, not mine. I think your news reader
has trouble
> with equals signs. Also, when you look at other
responses to my
> messages, such as Ivan's at
> http://tinyurl.com/3c8gdj
> you'll see his newsreader doesn't add any 3D, so maybe
it's just you
> or your news reader. I put the dividing lines in to
separate my
> responses from the others. As you know, it can get
confusing when
> there are so many angle brackets as various levels and
people
> sometimes respond in the middle of the message rather
than all at the
> end or beginning. Often it's hard to tell who said
what. But for you
> I can change from =3D to - so that maybe you won't see
the 3D on my
> equals signs. I use Google (to read and post) because
of the nice
> searchable archive integrated in with the newsreader.
What news
> reader do you use?
> Regards,
> ImageAnalyst
Hello ImageAnalyst
Well, I use the newsreader found here,
http://www.mathworks.com/matlabcentral/newsreader/
and I think most of the people out there might also might
be accessing the newsreader from the same location. If you
just click on the link I have posted below, you will see
all your post contains this word "3D" and even though you
give nice suggestions, but because of this "3D" its really
hard to follow.
http://www.mathworks.com/matlabcentral/newsreader/search_re
sults?search_string=ImageAnalyst
Regards
Vihang
|