PDA

View Full Version : Thermal Imaging



Matt Grunau
11-17-2005, 01:34 PM
Here's a way to fake a thermal image in Photoshop. You can easily set this up to be an action, and then batch process many files, allowing you to use it for video. This is not infer red, where heat is displayed as white and cool temps are dark gray, this is basically how the Predator sees people in the Predator movies.

First, you will have to create a custom gradient. Select the Gradient tool, and then click on the gradient bar that appears under "Image" shown by the red arrow.

http://www.paramm.com/grad1.jpg



A new window will pop up. Click on the small boxes to the left and right on the gradient and you will have the option to change them.

http://www.paramm.com/grad.jpg

Make the right one white and the left one dark blue. Then, by clicking in the gradient itself, you will create additional color spots. You can change them to any color you want by double clicking on them or by clicking on the Color on the bottom left of the window. Set up your new gradient as I have here. I just used dark blue, then B255, then a slightly darkened G255, then red, yellow, and then white. These are only the colors I picked; you can and should experiment and find ones that work for each clip you use. Then rename it (I named mine Thermal, but you can name it Aunt Susie or whatever) and click the New button, and you will see it appear in your gradient "list".

Now you need something to use it on, and what channel. So, open a picture. You will need to isolate a channel to get it to look its best. I usually choose the red channel, as its monochromatic values put red represented by white, and green and blue represented by darker colors. If you don't understand how colors are represented by this grayscale range or how they pertain to the mixing of R, G, and B in building an image, you need to. Every color is built from three mains; Red, Green, and Blue. The amount of these colors in 8-bit color is represented by 256 shades of gray, also called Luminosity. Sound confusing? Just load an image, and open up the Channels pallet and you will get it. With channels palles open, click on any one channel. You will see your image drop to grayscale, and as you click from red to green to blue, you will see the grayscale change. In each channel you choose, lights and darks represent the amount of that color. The more of each color there is, the lighter the grays become. An all green picture would have the green channel represented by pure white, and the red and blue channels would be black, since there are no other colors present. Think of it as a graphical representation by blending the "Saturation" of a picture and the "Layer Mask" function to show you how much of each primary is present. Whew, long paragraph.

Ok, so you need to isolate a channel. Why? Because it gives the cleanest results, and when you go to apply your Gradient map, you will need it. A Gradient Map works by applying a gradient over an image, based on lightness and darkness (among other things). So, by isolating only one channel in grayscale, you apply the Gradient Map to the lightness and darkness of its Luminosity, and get your effect. This is especially handy for flesh tones which are based in red, and therefore the red channel will have white where red is present, and dark where it is not. And, since skin gives off heat, isolating the red channel makes the most sense.

There are two ways to isolate the red channel, and either will work when setting this up and creating an action. You can go to Image>Adjust>Channel Mixer and check the Monochrome box in the lower left corner (the Monochrome by default will give you the red channel, but you can change which channel you want, and how much if you like) and then click OK. Or, you can go to the Channels pallet, click on the red channel, Crtl+A to Select All, then copy, click on RGB in the channels pallet to select all three channels again, and then go to your Layers pallet and Paste. The Channels route gives more accurate results. I don't know why, logically they should be identical, but the Channels way gives more contrast, which is good.

With that now on its own layer, you go to Image>Adjust>Gradient Map, and then choose the gradient you created, and then click OK. You should see your grayscale image converted to the gradient you made, and if you used the red channel, your flesh tones will have turned white/yellow/red.

Of course, if you have a lot of other red tones in your image, they will be affected the same as your skin tones, so you may have to prepare your shots correctly (like DON’T dress in a bright ass red shirt), or you may have to mask out regions of interest.

You can probably pull off something similar in After Effects or the like, but Photoshop gives more option and control. Of course, there are plugins that can probably do this, but they cost money, and you will have a better working knowledge of Photoshop and video by doing it down and dirty.

That's it. Cheerio, toodle pip, and all that, and have fun.

:thumbsup:




EDIT: Pics & Video before & after:

http://www.paramm.com/dan.jpg


http://www.paramm.com/dan1.jpg

XCheck
11-17-2005, 05:06 PM
Sweet! Gonna try this over the weekend.

J.R. Hudson
11-18-2005, 12:45 AM
Tks Rapier!

This is so PREDATOR style; I love it

limehouse
11-18-2005, 02:45 AM
Toodle pip???

That is awesome. Very cool effect :) Trying it out now.

limehouse
11-18-2005, 03:06 AM
I gotta do this with some video tomorrow.

http://img353.imageshack.us/img353/3055/martinwarface2fs6rx.jpg



this seems complicated...
l
With these insructions, it's a piece of cake :)

edit- another:
http://img365.imageshack.us/img365/8706/betty5uw.jpg

Matt Grunau
11-18-2005, 06:57 AM
Tks Rapier!

This is so PREDATOR style; I love it


Thanks John. Fiddeling with the spacing of colors in your custom gradient allows for great control, and a gausian blur in After Effects of Vegas allows the final sequence to be softened. I shoul have used more blur for the thermal one, but I wanted to get it cranked out and posted. all 151 frames of that animation where batch processed, and the who thing at DV NTSC standards took about three minutes to convert.

Shaw
11-18-2005, 09:13 AM
. This is not infer red, where heat is displayed as white and cool temps are dark gray

Actually that would be near-infrared. :) True infrared imaging would look like what you have posted! Not bashing or criticizing at all here, just trying to help out. Since it might be of interest and this *is* a tutorial thread :) , here's a basic tutorial on how the various forms of "night vision" work along with their benefits and drawbacks:

There are essentially three forms of night vision and each corresponds to a different segment of the elctromagnetic spectrum. The human eye can only discern a very small area around the middle of that spectrum.

http://skyserver.sdss.org/dr1/en/proj/advanced/color/images/specnasa.gif

The chart describes the spectrum in terms of wavelength. The image above is nice because it shows, above the technical stuff, how the wavelength changes as you go across the spectrum. (Actually the electromagnetic spectrum can be expressed in terms of energy - volts, wavelength - meters, or frequency - hertz).

Radio waves, visible light, X-rays, and all the other parts of the electromagnetic spectrum are fundamentally the same thing. They are all electromagnetic radiation; as humans we just tend to put labels on things for ease of discussion. :)

So we have three different "types" of night vision:

1) Light amplification (visible light)
2) Near infrared illumination (Light just beyond the range of human perception)
3) Thermal/Infrared (heat/energy released by objects)

Light aplification is basically gain and works on the principle of collecting reflected light (that's how we see and record images on cameras after all) and then amplifying it. It's effective for nights with a moon and other ambient light (US special forces use a very, very high end version of this which performs extremely well). Image quality can suck of course and far distant objects are pretty much impossible to discern(unless you buy really high end stuff) .

How light amplification works:
http://static.howstuffworks.com/gif/nightvision-tube.jpg

Near infrared records in visible means wavelengths just lower than we can see with out eyes. It's "invisible" so to speak. NIR based night vision also works on the principle of reflected light. Since the light is invisible and can be recorded electronically you can use it to illuminate things at night without using visible light.

The problem with both of the above? They each require a light source so they can have some radiation to reflect. Thermal, or simply, infrared, is different though. An infrared camera actually picks up on heat *emitted* by humans, machines etc. Because of this you don't need any external lighting as the energy making the picture comes from the source itself. These images are usually mapped with a variety of colors to help us visualize differences in temperature. NIR on the other hand is usually left black and white (unless you needed to know HOW relfective something was, ie a light meter).

So to recap:

1) Light amplification - works by reflected visible light that is then electronically boosted. Seen as a green image due to the amplification process.

http://www.x20.org/images2/US_Javelin_Missle.gif

-----

2) Near infrared - works by reflected light we can't see. For video at night this requires a NIR lamp on camera to illuminate subjects.

http://home.twcny.rr.com/scho/newpics/FCPano.jpg

-----

3) Thermal/Infrared - works by measuring energy *emitted* by high energy objects such as humans or machinery. Doesn't rely on reflectance. These are usually multi-color mapped to let us better visualize differences in temperature.

http://sci.gallaudet.edu/Ellsworth/2004/AminahEs/infrared.jpg

I hope that made a shred of sense. I'm horrible at writing tutorials!