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

Home » Public Forums » archive » Grayscale AND Binary Image
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: Grayscale AND Binary Image [message #29715 is a reply to message #29577] Thu, 07 March 2002 14:23 Go to previous message
Wonko[2] is currently offline  Wonko[2]
Messages: 6
Registered: March 2002
Junior Member
idlfreak@yahoo.com (Akhila) wrote:

> I have the same size window for both the images. Is there any way
> that i can get the region(pixel value) from the binary image and
> obtain the same pixels in the original image. If that's possible
> it'd be more ideal as that's the result i want.
> Help me please !!!

I'm not sure what you mean... do you want to get the indices of the
pixels which are set to 1 in your mask image? Then have a look at the
WHERE() function.

For example, instead of

new_img = original_img * mask_img

you can do it that way:

index = where( mask_img eq 1 )
new_img = 0 * original_img
new_img[index] = original_img[index]

or:

index = where( mask_img eq 0 )
new_img = original_img
new_img[index] = 0


Alex
--
Alex Schuster Wonko@netcologne.de PGP Key available
alex@pet.mpin-koeln.mpg.de
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL on mandrake 8
Next Topic: Re: CALL_EXTERNAL and memory allocation

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

Current Time: Fri Oct 10 13:59:34 PDT 2025

Total time taken to generate the page: 0.07469 seconds