ai-thermometer icon indicating copy to clipboard operation
ai-thermometer copied to clipboard

Running with web cam and IR cam, not accurate temperature reading

Open nickjrz opened this issue 5 years ago • 13 comments
trafficstars

Hi,

First of all, thanks for sharing the source code for this project, very helpful. I have been trying to run this code with a web cam instead of using the raspberry pi cam. I have it working with display and face detection, the only issue I am running into is that the temperature readings are not accurate. Would you have any idea what could be causing this behavior?

nickjrz avatar Sep 14 '20 15:09 nickjrz

Hi @nickjrz ,

Commit 9d754093d3fcf76fe9ce421dad255f20c7e582ec introduced a bug which led to incorrect readings. I just pushed 097c9c904fc412f0e25225afdf44eb3ec60b2f82 which fixed that. Let me know if the readings are better now :slightly_smiling_face:

tomasz-lewicki avatar Sep 15 '20 09:09 tomasz-lewicki

Thanks for your quick reply, I will try it today and will keep you updated.

nickjrz avatar Sep 15 '20 13:09 nickjrz

So I updated the files and I am still getting readings of 62550 celsius. I found a formula for the lepton thermal cameras temp = slope * (raw -8192) + ambTemp (https://groups.google.com/g/flir-lepton/c/T2NFRkeMyR4?pli=1) maybe this could be used along the calculations on code

nickjrz avatar Sep 15 '20 14:09 nickjrz

Hi,

Is it possible that you're using Lepton 3.0 (S/N: 500-0726-01), instead of Lepton 3.5 (S/N: 500-0771-01) module?

tomasz-lewicki avatar Sep 15 '20 17:09 tomasz-lewicki

as of now I am using the 2.0 model with the purethermal 2 breakout board. I think I only need to add some calibration coefficient in the calculation in order for it to get readings properly.

nickjrz avatar Sep 15 '20 17:09 nickjrz

In order to get the temperature values out-of-the-box you'd have to have one of the radiometric lepton modules (e.g. Lepton 3.5). They come pre-calibrated and stream temperature values in Kelvin.

tomasz-lewicki avatar Sep 15 '20 18:09 tomasz-lewicki

Okay thanks, I guess I just need to figure out how to calibrate it. I tried ordering the 3.5 one but they were out of stock and only had 2.0 so I will keep you updated if I make any progress on this model.

nickjrz avatar Sep 15 '20 18:09 nickjrz

@nickjrz try to buy the lepton directly to Groupgets or Digikey. Both have the radiometric 3.5 in stock

nanogear avatar Sep 25 '20 21:09 nanogear

Hai, i want to know small information like without IR Thermal sensor, the camera will open or will not open through the code which you have provided. Because, i am getting an error that (execute 568: Failed to create capture session) and also (opening in blocking mode).

Could you please tell me the problem which i am facing currently...

muralikrishna416 avatar Oct 06 '20 05:10 muralikrishna416

Without the Lepton camera, the program will just indefinitely wait for IR frames and display no output.

You can run just the RGB object detection with the script here: https://www.github.com/tomek-l/ai-thermometer/tree/master/vis%2Fssd%2Fexample_detect_face_caffe_resnet.py

On Mon, Oct 5, 2020, 10:37 PM muralikrishna416 [email protected] wrote:

Hai, i want to know small information like without IR Thermal sensor, the camera will open or will not open through the code which you have provided.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tomek-l/ai-thermometer/issues/6#issuecomment-704038959, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGHK36VC67G7HGSLUHDR5NLSJKUHZANCNFSM4RLYGWAA .

tomasz-lewicki avatar Oct 06 '20 05:10 tomasz-lewicki

I am currently waiting for a lepton 3.5 (digikey) to come in, as of now I am still trying to get the 3.0 to work with this application with some sort of calibration.

I also got the code to work with a webcam instead of a raspberry cam v2, instead of creating a pipeline for the vis cam I used cv2.VideoCapture(index # of device) . You can specify same properties as pipeline with set command for cv2

nickjrz avatar Oct 07 '20 20:10 nickjrz

I just got the lepton 3.5 and tried it out altogether but readings seem to be a little off. I am getting an average temperature of 32 Celsius. Do I need to let it run for a while for it to warm up?

nickjrz avatar Oct 08 '20 19:10 nickjrz

The freshly merged PR #31 adds:

  • An option for adding an external blackbody reference
  • Reports the average + maximal + 90th percentile temperature of the face, not just a single value.

You should pull the newest master give it a try :slightly_smiling_face:

tomasz-lewicki avatar Feb 27 '21 09:02 tomasz-lewicki