Flir A310 and A320 Thermal Camera - Page 1
Forum section: electronics / general

author: mohitsharma44
author_rank: Newbie
timestamp: March 03, 2016, 09:05:56 pm
content: Hello everyone,I have a flir a310 and a320 camera. I was following tomas123 and others on exiftool forums and eevblog (for quite sometime now). I am working on obtaining temperature from raw pixel values of the camera (just like the script for e4). So far I am following tomas123's php script (that I converted to python with a few other things) however there is a small problem:The Flir A310 is giving the "AtmosphericTemperature" as -273.15Cbecause of which my raw atm temp is same as -ve plank_o value. I proceeded with the calculation and the max and min temp looks awful lot close to the flir tools's reading.Flir tech denied helping in this case and all their replies concentrated on forcing me to use flir tools +(which I have but for some applications, it is not enough).Did anyone have any success in using a310 and/ or a320 and obtain the correct temperature? I am open to suggestions and pointers to the right direction.

author: mohitsharma44
author_rank: Newbie
timestamp: March 03, 2016, 09:24:38 pm
content: In case anyone would like to play with the files, I am attaching:* A310's radiometric jpeg image (http://sharmamohit.com/misc_files/test.jpg)* header (http://sharmamohit.com/misc_files/test.hdr)* ir image (http://sharmamohit.com/misc_files/test_ir.jpg)* csv file (http://sharmamohit.com/misc_files/test.csv)all are created using a python script (I am using exact same formula as tomas123's php script except that for converting ir image to temperature, I am using numpy). I am attaching the snippet for that below as well.In case any one needs, here is the snippet for reading test_ir.jpg and converting pixel values to temperature and saving it as csv file:Code:import numpy as npfrom scipy.misc import imreadim = imread('test_ir.jpg')raw_temp_pix = (im -(1 - tau) *raw_atm -(1 - emmissivity) *tau *raw_refl) / emmissivity / taut_im = (b /np.log(r1 / (r2 * (raw_temp_pix[:] + o)) + f) -273.15)np.savetxt(csv_fname, t_im, delimiter=',')I'll be happy to share the bitbucket repo if any one needs it.

author: mohitsharma44
author_rank: Newbie
timestamp: March 04, 2016, 04:58:28 pm
content: Hate to say it but I solved it using brute force technique (Still dont understand the reason).Using the above formula I checked that I am off by ~0.07 deg C when compared with FLIR tools's output. Modifying it the following way, I get exact same values that FLIR tools outputs to csvCode:raw_temp_pix = (im -(1 - emmissivity) *raw_refl) / emmissivity / tauThis is kind of confusing. It should either be that I do not consider tau at all and it should just beCode:raw_val-(1-emissivity)*raw_refl)/emissivity. Why do i have to divide the whole result by tau?ps: I am not an expert in thermography.

author: tomas123
author_rank: Frequent Contributor
timestamp: March 05, 2016, 06:53:43 am
content: The calculations of atmosphere transmissivity is more complex.Load my excel sheet from this post and the flir document from the following post and compare it with your script:http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,4898.msg27546.html#msg27546

author: tomas123
author_rank: Frequent Contributor
timestamp: March 05, 2016, 01:05:13 pm
content: your equation is rightCode:raw_temp_pix = (im -(1 - tau) *raw_atm -(1 - emmissivity) *tau *raw_refl) / emmissivity / taugoes toCode:im = raw_temp_pix * emmissivity * tau + (1 - emmissivity) * tau * raw_refl + (1 - tau) * raw_atmand this is identical with equation 3I think, you have some troubles with parameter tau.Please feed my excel sheet with the exiftool flir tags and compare the results with your csv values.

author: mohitsharma44
author_rank: Newbie
timestamp: March 08, 2016, 06:14:10 pm
content: QuoteObviously! My bad..Thanks for the formula for total received radiation power

author: mohitsharma44
author_rank: Newbie
timestamp: March 08, 2016, 06:28:22 pm
content: QuoteI took the formula for h20 and tau from here:http://u88.n24.queensu.ca/exiftool/forum/index.php?action=dlattach;topic=4898.0;attach=919Here is the formula as I use it:Code:h2o = (humidity / 100) * math.exp(1.5587 +6.939e-2 *temp_atm -2.7816e-4 *math.pow(temp_atm, 2) +6.8455e-7 *math.pow(temp_atm, 3))tau = x * math.exp(-math.sqrt(distance) *(a1 + b1 * math.sqrt(h2o))) + \(1 - x) * math.exp(-math.sqrt(distance) *(a2 + b2 * math.sqrt(h2o)))The reason I am having problem with tau is because it depends on h20 and h20 in turn depends on atmospheric temp. The a310 cameras are reporting the output as -273.15 deg celsius. So this is bound to give bizzare output. I contacted FLIR guys regarding this but they kept pushing me to use flir tools plus instead so no help from them.Do you think I should send this for inspection back to FLIR?(Take a look at the header that I mentioned in my first post)

author: tomas123
author_rank: Frequent Contributor
timestamp: March 08, 2016, 09:38:52 pm
content: Quote from: tomas123 on March 05, 2016, 06:53:43 amPlease recheck your calculations with my excel sheet!You have(1) all flir parameters from exiftool(2) a csv file with temperature of all pixels from Flir Tools(3) convert 16 bit raw values from radiometric jpg with imagemagick to a txt file.see my post:https://www.eevblog.com/forum/thermal-imaging/flir-e4-thermal-imaging-camera-teardown/msg350250/#msg350250Quote from: tomas123 on December 19, 2013, 09:31:53 amwith (1) and some samples from (3) feed the excel sheet and compare result with (2) ...