Problems with libuvc in purethermal1-uvc-capture examples

2,668 views
Skip to first unread message

Sven

unread,
Mar 5, 2018, 6:52:17 PM3/5/18
to Flir Lepton
Dear all,

I have successfully set-up a Purethermal 1 development platform in Ubuntu in combination with the Lepton 2.5. Flashing the firmware via Eclipse is not an issue and I get correct radiometric temperature values and video in the Getthermal App. However, for two days already I am trying to perform the simple Purethermal1 UVC Capture exampels from https://github.com/groupgets/purethermal1-uvc-capture.

The opencv-capture.py works (after changing the for loop to capture from the first camera in the system (video1 is the webcam and video0 is the thermal imager)).

However, for both uvc-deviceinfo.py and uvc-radiometry.py i get the following message: "uvc_open error".

I have followed the instuctions for installing the modified version of libuvc from groupgets/libuvc. However, it is still not working. Maybe it is not installed correctly? Or am I am missing any other prerequisites?

Can someone guide me in the right direction how I can find the problem?

Thank you very much for your help!

Sven

Kurt Kiefer

unread,
Mar 5, 2018, 7:08:50 PM3/5/18
to Flir Lepton
The only required prerequisite is libusb1, which you must have if you were able to build libuvc. Did you install libuvc system-wide, or did you copy the shared library into the current directory (or somewhere in the LD_LIBRARY_PATH)? You might also try running as root, in case your your user simply doesn't have permissions to open the usb device.

Kurt

Sven

unread,
Mar 6, 2018, 3:31:48 AM3/6/18
to Flir Lepton
Dear Kurt,

Thank you for your quick response. I installed libuvc in /home/ by following the commands

git clone https://github.com/groupgets/libuvc
cd libuvc
mkdir build
cd build
cmake .. 
make && sudo make install
This does indeed not give any errors. Is this approach sufficient to install the library system-wide or do I need to do it differently?

Thanks again,
Sven


Op dinsdag 6 maart 2018 01:08:50 UTC+1 schreef Kurt Kiefer:

Sven

unread,
Mar 6, 2018, 2:49:17 PM3/6/18
to Flir Lepton
Dear Kurt,

It was indeed a problem of root permissions. However, both ./uvc-deviceinfo.py and ./uvc-radiometry.py cannot properly find the device. Output of ./uvc-radiometry.py is as follows:

sudo ./uvc-radiometry.py
device opened!
Version gpp: 0.0.0 dsp: 0.0.0
FLIR part #:
FLIR serial #: '\x00\x00\x00\x00\x00\x00\x00\x00'
uvc_start_streaming failed: -2

Can this be a similar problem as I had with opencv-capture.py that only worked after changing the for loop to capture from the first camera in the system (video1 is the webcam and video0 is the thermal imager).

Hope to here from you,
Sven

Op dinsdag 6 maart 2018 09:31:48 UTC+1 schreef Sven:

Kurt Kiefer

unread,
Mar 6, 2018, 3:22:11 PM3/6/18
to Flir Lepton
I think this is like you say, these programs are choosing the wrong device. The call to uvc_find_device() can take a few arguments, that are set to their defaults in those examples. PT1's USB VID/PID is 0x1e4e/0x0100, so try the call like this:

res = libuvc.uvc_find_device(ctx, byref(dev), 0x1e4e, 0x0100, 0)

Sven

unread,
Mar 6, 2018, 3:30:38 PM3/6/18
to Flir Lepton
It it is working Kurt,

Once again, thank you very much for your efforts!

Sven

Op dinsdag 6 maart 2018 21:22:11 UTC+1 schreef Kurt Kiefer:
Reply all
Reply to author
Forward
0 new messages