I want to create the heatmap of an image for research purposes. Is there any algorithm to create heatmap of an image ?

Also, if I have a RAW image out of a Nikon D5200 (.NEF file format), will it have the temperature information saved within itself ?

  • 1
    What do you mean by a heatmap of an image? What do you imagine as your ultimate end-product?
    – osullic
    Oct 17 '18 at 7:04
  • Are you talking about eye-tracking heat maps? Or literal temperature of objects in the scene?
    – xiota
    Oct 17 '18 at 7:10
  • Since OP talks about temperature, me thinks we can assume heat as in warm and very warm. Oct 17 '18 at 7:12
  • 1
    I'm voting to close this question as off-topic because it is about using a camera as a temperature measuring device, rather than to produce photographs with artistic or historical value.
    – Michael C
    Oct 18 '18 at 5:19

No. They only record visible light (+/- a few nm).

If you want heat images (Infra Red "light"), you might want to look at the FLIR C2

  • 1
    unless, of course, we are taking photos of very hot objects, where thermal radiation enters the visible range ;-) then we could try to infer the temperature from the blackbody radiation colors
    – szulat
    Oct 17 '18 at 8:31
  • 1
    @szulat Edge case ;) It does contain temperature information, but not directly only via the wavelength of the emitted light Oct 17 '18 at 8:53
  • 1
    Plus, a camera never gives the true spectrum, just a mixture of red, green and blue. For example, a sodium lamp gives a very pure yellow, but the photo taken does not contain any yellow, just red, green and blue. The brain maps this mixture to yellow again.
    – sweber
    Oct 17 '18 at 20:19
  • @sweber Well, kind of. The actual colors of the Bayer mask for most common cameras are a slightly violet blue that we call "Blue", a slightly bluish green that we call "Green", and somewhere between a greenish yellow to a yellowish orange that we call "Red". The colors of the Bayer mask filters do not correspond to the R, G, and B channels of tri-color display devices. The 'Red' channel, particularly, does not even come remotely close. Look at the peak of each color channel on sensitivity maps of camera sensors and you'll see that the 'Red' channel is usually centered at about 590nm, not 640.
    – Michael C
    Oct 18 '18 at 4:56
  • @sweber For a fuller treatment of the subject, please see: Why are Red, Green, and Blue the primary colors of light?
    – Michael C
    Oct 18 '18 at 4:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.