UVC Y16 reading raw values - Pure Thermal 1

1,769 views
Skip to first unread message

Jure Košir

unread,
May 30, 2017, 8:25:16 AM5/30/17
to Flir Lepton
Hi!

I spent quite a lot of time figuring our how to build project on github to get .elf file which can then be uploaded to STM32... Now everything is working fine and I also get the picture in OpenCV using function videoCapture.

My aim from the start was to be able to get/read additional RAW data from my PT1 in Visual Studio with OpenCV (as I know this comes when Y16 mode is enabled). Now the firmware is uploaded to my PT1, it is working I am receiving image to VS (videocapture) and in demo software from FLIR... But I have no idea how to read raw values (if possible with telemetry enabled).

Any help is appreciated! Thanks for doing great work!

Best regards, Jure

Guillermo Terrén Serrano

unread,
Jun 28, 2017, 12:40:40 PM6/28/17
to Flir Lepton
Hi Jure,

I'm exactly having the same problem. 

I have tried to read Y16 firmware using C++/Python and OpenCV, buy I always get pixels somehow converted to 8 bits YUVY format.

In my problem, I have several devices and I really do not want to use different libraries to do the captures in each one of them since all are usb video class. 

Could you finally perform the readings?

Kind regards,
Guille 

Kurt Kiefer

unread,
Jun 28, 2017, 12:46:47 PM6/28/17
to Flir Lepton
As far as I know there's not a way to get Y16 data on OpenCV for Windows without modifying it. At least, I have never heard anyone report success here, but would love to hear otherwise.

Supposedly on newer version of OpenCV for Linux Y16 capture works: https://github.com/opencv/opencv/pull/7293

For Linux and Mac, have you guys seen this, it will at least solve the problem of capturing from any UVC camera: https://github.com/groupgets/libuvc


Kurt Kiefer

unread,
Jun 28, 2017, 1:05:14 PM6/28/17
to Flir Lepton
Oh! I just looked upstream on libuvc, and it looks like some windows work has been merged there.

If someone will test it, I will be happy to rebase the modifications for PT1 to libuvc on the upstream windows work (I don't have a windows machine).

Guillermo Terrén Serrano

unread,
Jul 1, 2017, 7:55:24 PM7/1/17
to Flir Lepton
Hi,

I could not make to work in Windows. It seems it is just for Linux.

I have a questions, I could not find much information in the internet about this libuvc. I was wondering if there is a way to use this modified libuvc for python for streaming 2 different cameras at the same time. If you can point me where I can see how to set the uvc_context for the devices that I have.

Kind regards,
Guille

Kurt Kiefer

unread,
Jul 4, 2017, 5:24:02 PM7/4/17
to Flir Lepton
Guille, the Windows code is not on the main branch. It is on "master-rebase" and the Windows readme is here: https://github.com/groupgets/libuvc/blob/master-rebase/INSTALL_WINDOWS.md

I think that libuvc should work with two cameras, since the initializer takes a libusb context and wraps that. Register two different callbacks in uvc_start_streaming, or use a single callback and pass in some of your own data two tell the two apart.

Here's the example provided by the original authors that shows how to use it:
Reply all
Reply to author
Forward
0 new messages