The code you linked to is at least partially to blame. It searches through the received values, and finds the maximum and minimum values. It then writes the range (max-min) in the pgm file for scaling, and subtracts the minimum from all values.
This is needed to make the image viewable within the normal range of values for a grey scale image.
You can get the original values from the lepton_image array. Those have not been scaled in the code, so should be more directly related to the temperature. The data sheet says that the AGC is off by default, so you can expect the values you receive to be proportional to the temperature (so long as your code doesn't activate the AGC somewhere.)
On a quick scan through the datasheet, I don't see how to convert from the raw valued to temperature. You should be getting numbers between -8192 and 8192 (signed 14bit) If Radiometry is off, then 0 (zero) should be the same temperature as the sensor itself. You can ask the chip for its temperature, and calculate from there - if you can figure out the scale.
Assuming that the 14bit range covers the entire 0 to 400 degrees Kelvin that the Lepton is rated for, you could turn Radiometry on, and scale such that -8192 is zero Kelvin and 8192 is 400 Kelvin and see if that matches your expected temperatures - it ought to.
AGC stands for "Automatic Gain Control." In this case, it is used to reduce the 14Bit digitized values (-8192 to 8192) to an 8Bit value (0 to 255.)
You will need the Lepton Software Interface Description Document to see how to turn the AGC on (or off.) But, according to the datasheet for the Lepton, the AGC is off by default. All you need to do is to evaluate the numbers in the lepton_array in the code you listed, and look for numbers above some threshold. You'll have to experiment to see what threshold is needed. You may also find that the threshold will have to change depending on the environment temperature - you can get that from the Lepton using the "SYS FPA Temperature Kelvin" command (page 40 of the Interface Description Document.)
This link seems to imply to me that getting direct temperatures out of the Lepton isn't going to be easy - it appears you only get to do that if you pay enough and sign an NDA.
That said, you don't really need the true temperature. All you need is to turn the AGC off, and don't muddle things in your own code. Then you can look for temperatures at some threshold above the sensor temperature.