Raspberry PI Video Capture - Capturing an Image

2,999 views
Skip to first unread message

Tam Tran

unread,
Apr 9, 2015, 12:06:06 AM4/9/15
to flir-...@googlegroups.com
I want to use the raspberry_video function to produce images of the FLiR livefeed because the images look better than using the raspberry_capture function (the raspberry_video images have color), but the problem is, I don't know how to start. I am proficient in C and I can see that I can somehow modify the main.cpp (In the raspberripi_video folder) (somewhere at line 47) to create and save an image file in bmp/jpeg/png format that's pulled from the SPI thread but creating and saving is the step I am lost about. Any suggestions? 

Dale jason

unread,
Apr 17, 2015, 12:40:27 AM4/17/15
to flir-...@googlegroups.com
I have a modified version of raspberrypi_Video that among other things can save a picture.  I had to modify several files that add and then process the button presses.  The key is to learn the GUI Qt.  There are several good tutorial on youtube by voidrhealms for the wanting to learn how.

I have attached the lepton thread code were most of the action takes place to give you a clue.  I have attached all the changes that actually make and connect the buttons.  .

Compared with the existing code should give you a good start.



Dale Eason
LeptonThread.cpp
LeptonThread.h
Message has been deleted
Message has been deleted

Dale jason

unread,
Jul 12, 2015, 8:24:48 PM7/12/15
to flir-...@googlegroups.com
Here is a good link on how to do that using another camera but you can do similar with the lepton.  You will need an SD or MicroSD card attached to the arduino.  I don't know the specifics of how to use an arduino with a lepton however.


Dale
Message has been deleted
Message has been deleted

Muhammad Desri Murdianto

unread,
Apr 16, 2016, 12:06:17 PM4/16/16
to Flir Lepton
Hi,
I try replaced LeptonThread.h and LeptonThread.cpp in raspberry_qt and raspberrypi_video with your files, But still failed in gui..(only perform FFC)

please help me for step by step how to make gui like your screeshoot..


thanks


Rafael Bayareh

unread,
Jul 1, 2016, 2:42:41 PM7/1/16
to Flir Lepton
Muhammad Desri Murdianto,

Did you run qmake && make in the console?

The codes provided by Dale Jason are helpfull as a guide, but they seem incomplete.

If I get any result, I will post it as soon as I can.

Have a nice day.

Trí Dân Nguyễn

unread,
Nov 24, 2016, 11:12:55 AM11/24/16
to Flir Lepton
Thank you Dale, your files helped me a lot.
I add below my main.cpp files, with it, you can see the GUI as same as the one Dale have.

Just copy my  main.cpp and Dale's LeptonThread.cpp and LeptonThread.h above to the raspberrypi_video folder, and then qmake && make it again. 
main.cpp

Trí Dân Nguyễn

unread,
Nov 24, 2016, 11:25:59 AM11/24/16
to Flir Lepton
Hello Dale, your modified code has a bug, the snapshot button can only save one image when you press the snapshot button, if you press it again, the image saved before is overwrited. I'm working on how to save image with file name is the current date and time of the system. Can you help me with it? I'm using QDateTime Class in Qt to convert current Date and time to Qstring to name the file, but it not work yet.
Here is my code. Can anyone tell me what's wrong with it?


And here's the error when compile (I modified Dale's LeptonThread.cpp








Vào 11:40:27 UTC+7 Thứ Sáu, ngày 17 tháng 4 năm 2015, Dale jason đã viết:

Shazwan Ramdan

unread,
Jan 12, 2017, 3:10:00 PM1/12/17
to Flir Lepton
can u tell me how to include the GUI?

Rafael Bayareh

unread,
Jan 13, 2017, 12:22:37 PM1/13/17
to Flir Lepton
The GUI is programmed in the file main.cpp. The way that the GUI is programed is called QT, which is a library from C++. Once you compile and run the program, you will be able to see the GUI on the desktop.

Shazwan Ramdan

unread,
Jan 14, 2017, 2:39:40 AM1/14/17
to Flir Lepton
Did they make the GUI by hardcode or using QT Creator? If they using QT creator how can i resume their work and adding new features?

Rafael Bayareh

unread,
Jan 14, 2017, 3:41:16 PM1/14/17
to Flir Lepton
By hardcode. If you explore the files, you will find the .cpp files. You can edit them with a text editor.

Shazwan Ramdan

unread,
Jan 16, 2017, 2:29:02 AM1/16/17
to Flir Lepton
Thank you for the info. Btw anyone know how to add new image box beside the pixmap? i want to put the picamera image beside it instead overlay the normal image and thermal image.

Rafael Bayareh

unread,
Jan 17, 2017, 11:06:37 AM1/17/17
to Flir Lepton
I don't know how. Qt is very complex for me. I've been learning with this book: https://www.dropbox.com/s/6ajcahx55r17pv5/C%20GUI%20Programming%20with%20QT4%2C%202nd%20Edition.pdf?dl=0

I hope it helps.

Shazwan Ramdan

unread,
Jan 31, 2017, 6:12:25 AM1/31/17
to Flir Lepton
can someone make me/ teach me how to make the thermal image overlay with pi camera image?i need to make face recognition btw.

Shazwan Ramdan

unread,
Feb 9, 2017, 10:58:54 AM2/9/17
to Flir Lepton
anyone can help me to include face detection in this FLIR Lepton video stream? or help me in putting a new column to show my raspicam, ty.

Rajesh Prathipati

unread,
Oct 29, 2018, 8:00:36 AM10/29/18
to Flir Lepton
hii Dale,
i am trying sice i week to capture image from lepton thermalcam breakout 1.4 , i had tried all u r tutorial but iam getting errors please can u send me the refferal code for that

Rajesh Prathipati

unread,
Oct 29, 2018, 8:06:01 AM10/29/18
to Flir Lepton
heelo tri,
this is Raj. is this code is for capturing the images .if this
can u tell me procedure for this process. 
Reply all
Reply to author
Forward
0 new messages