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

Home » Public Forums » archive » Re: findng array[3] in array[3,n]
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: findng array[3] in array[3,n] [message #23474] Fri, 26 January 2001 05:42 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"tbowers" <tbowers@nrlssc.navy.mil> writes:
>
... long description deleted ...
> colorIndex = where(eucDist EQ min(eucDist), count)
>
> ;set the alpha channel indices = 0 where theres black
> rgbaImage[3,colorIndex] = 0
>
> ;now it's readt for my IDLgrImage
> sState.oMapImage->setProperty, DATA=rgbaImage, HIDE=0
>
> Problem is is that my black is still opaque. I still can't see my objects
> behind it. Is it my misunderstanding of bringing this to 3D that's illing
> me?

Before you blame oMapImage, are you sure you actually got the alpha
channel you were hoping for?

One cool thing about the Euclidean distance thing is that you don't
have to take just the minimum distance. If you know that "black" can
be several nearby colors then you can say

colorIndex = where((eucDist-min(eucDist)) LT tol^2, count)

where tol is the number of deviant color levels you are willing to
accept. This helps especially in photographic pictures where solid
swatches are rarely a single color value.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: colors... again
Next Topic: Re: Back to idl after a looong time...

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

Current Time: Sat Oct 11 01:07:08 PDT 2025

Total time taken to generate the page: 1.28077 seconds