The facial pit organs of the copperhead are the end organs of a complex infrared-imaging system that allows accurate and precise strikes on potential prey. Anecdotal and recent experimental observations show that pit vipers can use their infrared-imaging systems to discriminate between cool and warm features in the environment. We tested the hypothesis that the infrared-imaging system is a thermal contrast detector and determined whether behavioural responses of copperheads differ with contrast type. We found that blindfolded copperheads responded behaviourally towards both warm objects moving against cool backgrounds and cool objects moving against warm backgrounds. Responses towards the former were more robust than those towards the latter. Furthermore, oscillating warm targets generated rhythmic following behaviour in-phase with target motion, while oscillating cool targets generated rhythmic behavioural movement in antiphase to target motion. The results show that the infrared-imaging system of pit vipers operates on the basis of thermal contrast, but the differences in behavioural responses with respect to contrast type indicate that pit vipers preferentially target the warm aspect of thermal differentials. Our results also demonstrate that the infrared-imaging system allows defensive targeting of potential endothermic predators. © 2010 The Association for the Study of Animal Behaviour.