Re: Image overlay [message #24947] |
Wed, 02 May 2001 14:15  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
this should be in the FAQ if it isn't already....
You can take the approach outlined by Craig or you can go the transparancy
route. If you go down this road be aware that it is best done in object
graphics. Take a look at David Fanning's IMAGE_BLEND program found at:
http://www.dfanning.com/documents/programs.html
-Rick
"Raymond Pete" <raymond.pete@maine.edu> wrote in message
news:Xns9094D67984AC6raymondpetemaineedu@12.23.198.86...
> Need some help here guys.. if u dont mind..
>
> I have a Tire displayed using tv.. I also below that have an image file
> that i have read in using a function i wrote to read a proprietarty image
> extension displayed in a 2d section.. my issue is i want to overlay the
> data image file onto the Tire to show the properties as such.. any
> functions or advice would be GREATLY appreciated..
>
> NOTE: the image file is setup as an 8-bit RBG file one byte per pixel..
>
|
|
|
Re: Image overlay [message #24955 is a reply to message #24947] |
Wed, 02 May 2001 08:32   |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
raymond.pete@maine.edu (Raymond Pete) writes:
> Need some help here guys.. if u dont mind..
>
> I have a Tire displayed using tv.. I also below that have an image file
> that i have read in using a function i wrote to read a proprietarty image
> extension displayed in a 2d section.. my issue is i want to overlay the
> data image file onto the Tire to show the properties as such.. any
> functions or advice would be GREATLY appreciated..
>
> NOTE: the image file is setup as an 8-bit RBG file one byte per pixel..
>
I see you posted twice, perhaps for effect. What do you mean you have
a "Tire" displayed? Is this the tread-frayin', Explorer-flippin',
lawsuit-makin' kind of tire? Or some other kind of specialized data
plot?
If you want to overlay one image on another, that can be as easy or as
hard as you want it to be. If you just have clusters of data then in
principle you can modify your original tire image using WHERE on your
data with a threshold. I.e,
wh = where(data GT 0)
tire(wh) = data(wh) ;; Make this more complicated as needed
If you want something like transparent overlays that is a little
harder and probably involves a separate transparency channel. Perhaps
somebodyt else can elaborate.
If you just want to overlay a coordinate system on an existing image,
then there are some good options. My PLOTIMAGE will display an image
with coordinate axes, and you can even do XRANGE and YRANGE selection.
Liam Gumley's IMDISP does something similar. Once you do that then
you can OPLOT symbols to your heart's content.
Craig
Markwardt IDL Page:
http://cow.physics.wisc.edu/~craigm/idl/idl.html (under Graphics)
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
Re: Image overlay [message #25072 is a reply to message #24947] |
Thu, 10 May 2001 13:19  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
This solution escaped me at the time of my previous post. The result of
using alpha blending to combine two pixels can be easily calculated:
result = ALPHA * srcPixel + ( 1 - ALPHA ) * destPixel
where
ALPHA - ranges from 0.0 to 1.0
result - Is the alpha blended color
srcPixel - Is the foreground pixel
destPixel- Is the background pixel
with an alpha of 0.0 the result will be the background pixel and with an
alpha of 1.0 the result will be the foreground pixel.
-Rick
"Rick Towler" <rtowler@u.washington.edu> wrote in message
news:9cptae$sk6$1@nntp6.u.washington.edu...
> this should be in the FAQ if it isn't already....
>
> You can take the approach outlined by Craig or you can go the transparancy
> route. If you go down this road be aware that it is best done in object
> graphics. Take a look at David Fanning's IMAGE_BLEND program found at:
>
> http://www.dfanning.com/documents/programs.html
>
>
> -Rick
>
> "Raymond Pete" <raymond.pete@maine.edu> wrote in message
> news:Xns9094D67984AC6raymondpetemaineedu@12.23.198.86...
>> Need some help here guys.. if u dont mind..
>>
>> I have a Tire displayed using tv.. I also below that have an image file
>> that i have read in using a function i wrote to read a proprietarty
image
>> extension displayed in a 2d section.. my issue is i want to overlay the
>> data image file onto the Tire to show the properties as such.. any
>> functions or advice would be GREATLY appreciated..
>>
>> NOTE: the image file is setup as an 8-bit RBG file one byte per pixel..
>>
>
>
|
|
|