Thermal-imaging devices have been used to seek out pot-growing operations, map Martian geology — and now, to watch the second suspect in this week's Boston Marathon bombings as he was holed up in his last hiding place.

Authorities said a helicopter equipped with a thermal imager spotted the heat signature of a person inside a tarp-covered boat, sitting in a backyard in Watertown, Mass. Police used the sensor after an area resident reported seeing a trail of blood leading to the boat — and catching a glimpse of a blood-covered body inside. The thermal readings confirmed that there was indeed someone under the tarp, and that the person was still alive.

"Our helicopter had actually detected the subject in the boat," Col. Timothy Alben of the Massachusetts State Police told reporters. "We have what's called a FLIR — a forward-looking infrared device — on that helicopter. It picked up the heat signature of the individual, even though he was underneath what appeared to be the 'shrink wrap' or cover on the boat itself. There was movement from that point on. The helicopter was able to direct the tactical teams over to that area."

There was an exchange of gunfire when a SWAT team approached the boat, so police had to back off. The helicopter continued to track the body's movements inside the boat. Eventually, the tactical team moved in and took the wounded bombing suspect, 19-year-old Dzhokhar Tsarnaev, into custody.

How thermal imaging worksThermal imagers can spot the signature of a heat source inside a house, a vehicle, or in this case, a vessel. Walls may stop visible-light wavelengths, but the heat can still pass through. Variations in heat emissions can be picked up by camera chips designed to be sensitive to the infrared part of the spectrum. The signature would be particularly noticeable when there's a significant difference between the background temperature and the temperature of the heat source.

Police have long used such devices to find out whether marijuana was being grown inside a house using heat lamps. In 2001, the Supreme Court ruled that the use of thermal scans to monitor heat sources inside a person's home should be considered a "search" under the Fourth Amendment, and thus would require a warrant. The court said such scans could reveal private details about the homeowner, including the time of night when "the lady of the house takes her daily sauna and bath."

Massachusetts state police officer Timothy Alben discusses the tactics that were used to apprehend Boston Marathon bombing suspect Dzhokhar Tsarnaev.

Thermal imagers have been taken to other worlds — for instance, aboard NASA's Mars Odyssey orbiter, which analyzes variations in the composition of the Red Planet's surface using the Thermal Emission Imaging System, or THEMIS.

Immigration authorities have used thermal scanners to look for the signs of fever among arriving passengers, and researchers have been experimenting with them as a lie-detector technique.

In most cases, thermal imagers can detect only the heat signature emanating from a wall or a vehicle. For example, you could tell whether there were heat lamps (or a lady taking a bath) in a particular room by noticing the high level of heat emitted by the room's walls. But you generally wouldn't see the outline of the heat lamps themselves (or the lady, for that matter). In the Cleveland serial-killer case, thermal imaging was used to look for the signs of freshly turned soil rather than for the cold, dead bodies themselves.