Setup; Flir Lepton 3.5 radiometric camera on a Pure Thermal 2 (PT2) board running fw:v1.3.0, connected by usb cable to a raspberry pi 4b running Ubuntu 20.04.5 LTS
I'm trying to use the python uvc-radiometry.py script at https://github.com/groupgets/purethermal1-uvc-capture/tree/master+libuvc-upstream to get the raw Y16 data image matrices from the Lepton 3.5 so that I can manipulate them to isolate temperature regions above 200 Deg C.
I've spent weeks debugging problems with the uvc-radiometry.py script but I'm still getting a uvc_start_streaming failed: -2 error.
When I switch to the UYVY frame format, the video feed displays but the min/max temperatures but they are completely wrong, I assume because it's not outputting raw temperature values. From what I've read online, it seems that I need to update the pure thermal firmware with the right patch to turn Y16 format on and turn AGC off via dfu. However, after fw v-1.0.0, it seems that this Y16 should be on by default. https://github.com/groupgets/purethermal1-firmware/releases
I've tried many posted solutions, the most relevant being this one https://github.com/groupgets/purethermal1-uvc-capture/tree/master+libuvc-upstream Fix UVC_FRAME_FORMAT_Y16 due to upstream change 'Commit libuvc/libuvc@53e2d2f - added a value to the middle of the types enumeration, which broke our bindings. This manifested as the "uvc_start_streaming failed: -2" error. This change corrects the enumeration value to match master.'
However, even after using the uvc-radiometry.py version from this upstream branch, I still get the -2 error. I suspect it's something to do with the 'enumeration value matching master' but I'm at a total loss as to how to fix this.
code output of running uvc-radiometry.py is as follows...
Running script: "/home/ubuntu/projects/flamesmart/src/uvc-radiometry.py"
Found 1 devices
unsupported descriptor subtype VS_COLORFORMAT
unsupported descriptor subtype VS_COLORFORMAT
PureThermal device opened: unsupported descriptor subtype VS_COLORFORMAT
b'GroupGets'unsupported descriptor subtype VS_COLORFORMAT
unsupported descriptor subtype VS_COLORFORMAT
b'PureThermal (fw:v1.2.2)' b'0005800e-5111-3039-3433-373300000000'
Version gpp: 3.3.26 dsp: 3.3.26
FLIR part #: b'500-0771-01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
FLIR serial #: b'\x17\xdf#\x00\x00\x00\x00\x00'
format: b'UYVY'
frame 160x120 @ 9fps
format: b'Y16 '
frame 160x120 @ 9fps
frame 160x122 @ 9fps
format: b'Y8 '
frame 160x120 @ 9fps
format: b'RGBP'
frame 160x120 @ 9fps
format: b'}\xeb6\xe4'
frame 160x120 @ 9fps
uvc_start_streaming failed: -2
I'm really desperate to solve this after weeks of online searches and so would greatly appreciate some help good people! Thanks.