comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: how to make a mask from a picture and how to put...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: how to make a mask from a picture and how to put... [message #38411 is a reply to message #38409] Thu, 04 March 2004 08:57 Go to previous messageGo to previous message
Thomas Nehls is currently offline  Thomas Nehls
Messages: 24
Registered: March 2004
Junior Member
David Fanning wrote:

> tom writes:
>
>
>> I want to make a mask from an image containing only some regions of that
>> picture. I already have a black and white image containing these regions.
>> How can I make a mask of it?
>> in order to merge it with or to lay it over an RGB-Image to see only the
>> selected regions from that RGB-Image?
>> thank you very much!
>
>
> Here is an article that describes how to make as mask.
> If your RGB image is 2D, just apply it as described.
> If your RGB image is 24-bit, apply the mask to all three
> 2D image planes.
>
> http://www.dfanning.com/ip_tips/xroi.html
>
> Cheers,
>
> David

thank you that is interesting, but:

I especially want to avoid drawing by hand! I already have my black and
white image bw (1,400,400) which results by some calclations from the
original image "org"(3,400,400).
Now I want to multiply these two images in that way, that everywhere
where my "bw" is black (or white, whatever) should be black in the
resulting image "res". the following loop did not work...
for x=400, Y=400
for X = 1:400
for Y =1:400
res(Z=0:3,X,Y) = bw(X,Y) * org(Z=0:3,X,Y)
end
end
end
Do you understand what I want to do?

what does the following line from your example
(http://www.dfanning.com/ip_tips/xroi.html) do?
IDL> maskedImage = image * (1 - (mask GT 0))

I tried it, but it is not working ...
Thank you!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Object Madness or Restoring Nightmares
Next Topic: Re: cmset_op question (Craig)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 07:02:16 PDT 2025

Total time taken to generate the page: 0.01660 seconds