Getting PT1/2 feed through OpenCV - Basic steps? What am I missing?

360 views
Skip to first unread message

grantn...@gmail.com

unread,
Aug 19, 2018, 8:32:10 PM8/19/18
to Flir Lepton
Hi all,

Could anyone who has accomplished getting PT1/2 feed in OpenCV to work on ubuntu or mac write out steps for how it should be working, please? It seems everything I try goes nowhere, and I feel I must be missing something truly obvious and is perhaps left unsaid in tutorials and github issues. 

I have used both Ubuntu 16.04 and my Mac and have been completely unable to get the feed from PT1 or 2 using basic VideoCapture() commands. (I use python.)

On Ubuntu, I can get cheese, VLC, and uvcview to work. On the Mac, I can get GetThermal app and facetime to get the feed (not vlc on mac though). The camera does work on both of my machines. 

It's just getting opencv to get feed. I have followed https://github.com/groupgets/purethermal1-uvc-capture (where I am getting "no module found "uvc" despite trying all of the options I can think of like pyuvc https://github.com/pupil-labs/pyuvc). Strangely, on Ubuntu I was able to get the uvc-radiometry.py to work, but not opencv-capture.py... but neither on mac. Also tried https://github.com/groupgets/pylepton and no success.

Could my problem even just be not having software in the right folder? or making connections between things I get through brew or pip? (things like ffmpeg, libusb, libuvc). Willing to write out all the things I tried if requested. 

If anyone is willing to walk me through, please feel free to email me. I will be eternally grateful for the help. 

Best,

Theresa

Karl Parks

unread,
Aug 19, 2018, 8:36:33 PM8/19/18
to grantn...@gmail.com, Flir Lepton
I believe you need libuvc. Not pyuvc. Is that possibly your problem? 

I copied the libuvc portion from the link your shared.

uvc-radiometry.py
This example uses ctypes to hook into libuvc and circumvents the troubles associated with using OS camera capture drivers, particularly on Mac OS X, whose standard capture drivers do not support the Y16 data type for grabbing raw sensor data.

This example leverages the Radiometric Lepton 2.5. The same approach can of course modified to support other Leptons as well.

You'll need the modified version of libuvc from groupgets/libuvc.

git clone https://github.com/groupgets/libuvc
cd libuvc
mkdir build
cd build
cmake ..
make && sudo make install
If you don't want to install this system-wide, you can copy the shared library to your working directory.

Then run the example:

./uvc-radiometry.py

--
You received this message because you are subscribed to the Google Groups "Flir Lepton" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flir-lepton...@googlegroups.com.
Visit this group at https://groups.google.com/group/flir-lepton.
To view this discussion on the web visit https://groups.google.com/d/msgid/flir-lepton/1e8728a4-4190-4ff4-8ec4-a794e845aad1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Aerospace Engineering Major
Computer Science Minor
San Diego State University
(530) 526-7030 | kheirl...@gmail.com

Karl Parks

unread,
Aug 19, 2018, 8:40:01 PM8/19/18
to grantn...@gmail.com, Flir Lepton
You can also try my fork here which has some pretty good instructions for ubuntu based off of the pure thermal 2 work by groupgets.

Karl

https://github.com/Kheirlb/purethermal1-uvc-capture/blob/master/readme.md

grantn...@gmail.com

unread,
Sep 5, 2018, 11:30:54 PM9/5/18
to Flir Lepton
Thank you so much for your reply. Sorry for delay, was focused on other aspects of my project for a bit. I tried your uvc-capture fork and it did work as-is with my camera, and I will look into more about what I can do to get what I need done with the information you provided. I will report back with what I figure out! Thanks again.
Reply all
Reply to author
Forward
0 new messages