flirpy icon indicating copy to clipboard operation
flirpy copied to clipboard

Radiometric data on Lepton 3.5

Open Hrishikesh-Kalyanaraman opened this issue 2 years ago • 5 comments

I am trying to get radiometric data from my lepton. I have successfully connected to my device and received a numpy array. However, I'm unsure what exactly this array means. It does not seem like it represents temperature data in micro kelvin like this issue mentions: https://github.com/LJMUAstroecology/flirpy/issues/53 as when I try to get the largest value from my array, it is always 58744 regardless of other data.

How do i get radiometric data from the lepton?

to recreate error condition, get an image from the lepton 3.5 and print(np.max(image, 0)). 58744 is always in the same place in the array generated irrespective of temperature [ (1,7) where the first object is at (0,0)]

I have tried using the groupgets software, and the camera seems fine. I have also used opencv directly, and this is the output i get when i do it

Hrishikesh-Kalyanaraman avatar Aug 01 '23 20:08 Hrishikesh-Kalyanaraman

Hi,

Please provide a sample image. I would guess 58744 is some telemetry value but it's impossible to say without seeing any data. If you have TLinear mode on, the results should be in Kelvin / 100.

Thanks!

jveitchmichaelis avatar Aug 01 '23 20:08 jveitchmichaelis

How would I turn tlinear mode on? Is it automatically turned on with flirpy?

My numpy array of the image is a 160×120 array, so im not sure how I can share it

Hrishikesh-Kalyanaraman avatar Aug 01 '23 21:08 Hrishikesh-Kalyanaraman

If you're using the Pure Thermal board then you should use their configuration tools. Flirpy doesn't offer any config for the Lepton at the moment.

You could save it with np.save for example?

jveitchmichaelis avatar Aug 01 '23 22:08 jveitchmichaelis

It seems like you were right. I checked data by row, and the last 2 rows are radiometric data, which was screwing with my results. Thank you!

On the other hand, I seem to have an issue on Linux where the camera disconnects after I access it 10-12 times on Linux. I did not have this issue on Windows. I suspect it might be because Linux reads multiple video devices for some reason. My issue is the same as this one: https://github.com/LJMUAstroecology/flirpy/issues/75

Hrishikesh-Kalyanaraman avatar Aug 02 '23 05:08 Hrishikesh-Kalyanaraman

Unfortunately my answer would be the same - speak to PureThermal or OpenCV because the opening/closing of the camera is done via those libraries, not Flirpy. It's possible that we're not closing/releasing the camera properly so what you could try is writing your own code where you open and close the camera repeatedly and see if you can trigger this fault. You could also try playing with GroupGets' software and seeing if that has the same problem or not.

Flirpy should call camera.release() when you close the context (e.g. if using with Lepton() as camera or delete the object. That calls cv2.VideoCapture.release() underneath.

jveitchmichaelis avatar Aug 02 '23 05:08 jveitchmichaelis