goodrobots / maverick

UAV Autonomous Systems Management
https://goodrobots.github.io/maverick/
MIT License
169 stars 60 forks source link

Add support for FLIR one thermal cameras #472

Closed fnoop closed 6 years ago

fnoop commented 7 years ago

http://www.eevblog.com/forum/thermal-imaging/question-about-flir-one-for-android/msg840976/#msg840976

fnoop commented 6 years ago

http://wiki.hacdc.org/index.php/FLIR_Pi_HOWTO http://www.eevblog.com/forum/thermal-imaging/question-about-flir-one-for-android/msg846130/#msg846130

fnoop commented 6 years ago

Added flirone service and status entry to maverick, works with custom gstreamer pipeline added to maverick-visiond.conf.

fnoop commented 6 years ago

Need to adapt visiond to detect rgb pixel format and set correct caps:

/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)RGB, width=(int)160, height=(int)128, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)sRGB, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, format=(string)RGB, width=(int)160, height=(int)128, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)sRGB, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = video/x-raw, format=(string)RGB, width=(int)160, height=(int)128, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)sRGB, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-raw, format=(string)RGB, width=(int)160, height=(int)128, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)sRGB, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, width=(int)160, height=(int)128, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)I420
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, width=(int)160, height=(int)128, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)I420
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, width=(int)160, height=(int)128, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)I420

/GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0.GstPad:sink: caps = video/x-raw, width=(int)160, height=(int)128, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)I420
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, width=(int)160, height=(int)128, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1, format=(string)I420
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, format=(string)RGB, width=(int)160, height=(int)128, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)sRGB, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)160, height=(int)128, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)160, height=(int)128, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, ssrc=(uint)3032431013, timestamp-offset=(uint)1495088198, seqnum-offset=(uint)2254, a-framerate=(string)30
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, ssrc=(uint)3032431013, timestamp-offset=(uint)1495088198, seqnum-offset=(uint)2254, a-framerate=(string)30
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, sprop-parameter-sets=(string)"J2QAKKwrQUI2AgPEiagA\,KO4CXLA\=", payload=(int)96, seqnum-offset=(uint)2254, timestamp-offset=(uint)1495088198, ssrc=(uint)3032431013, a-framerate=(string)30
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, sprop-parameter-sets=(string)"J2QAKKwrQUI2AgPEiagA\,KO4CXLA\=", payload=(int)96, seqnum-offset=(uint)2254, timestamp-offset=(uint)1495088198, ssrc=(uint)3032431013, a-framerate=(string)30
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 1495088198
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 2254

According to debug, shouldn't need a decode after the capture - using RGB pixelformat to videoconvert should work.

fnoop commented 6 years ago

Leave the caps alone and autovideoconvert does the job. Adapted visiond to ignore caps if pixelformat not set.