gstreamer

连Python都不熟也能跑通AI人脸识别?“隐藏Boss”竟是它!

*爱你&永不变心* 提交于 2021-02-19 17:06:29
摘要 :先把AI人脸识别跑起来,然后研究它是如何实现的,整个过程中确实收获不少。所谓先跟着做,再跟着学,实践与理论结合,自己感觉有理解了一些基础概念入个门,在此分享一下自己的捣鼓经验。 1、买台小“电脑” 既然要做人脸识别,那得找台带摄像头的小电脑啊。首先得价格便宜,简单搜了下,基本有以下几个选择: 树莓派4: ARM系统,生态好。价格合适,55刀。CPU在3个中最好,算力0.1TFLOPS K210:RISC-V的(非ARM),价格是最实惠的,299元。算力有0.8TOPS Jetson Nano:ARM系统,比树莓派4还贵,但是多一个英伟达的GPU(当然是丐版的GPU),价格99刀。算力0.47TFLOPS 这3个里面,考虑到人脸识别应该有更多的AI属性,那么带GPU能做AI推理不是更香么,于是就选择了英伟达的Jetson Nano开发板(主要也是想先入门英伟达的GPU派系,谁叫现在NVIDIA比较香呢)。 参考链接: https://www.zhihu.com/question/384561694 https://zhuanlan.zhihu.com/p/81969854 2、启动系统 这里需要先把“系统image”刷到 tf 卡里面,然后把tf卡插到开发板上,然后开机启动。启动有2个点需要注意: 跳线帽,需要插上(不然电源点不亮)。 第一次开机会卡住,需要重启一次。 启动后

using gstreamer with python opencv to capture live stream?

半腔热情 提交于 2021-02-19 07:32:32
问题 First of all i have python 3 with the library Gstreamer in it. print(cv2.getBuildInformation()) it shows Gstreamer with YES next to it. Here is the transmitter code using gstreamer in rasperryPi 3: gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw,width=320,height=240 ! videoconvert ! x264enc tune=zerolatency ! rtph264pay ! udpsink host='my ip address' port=10000 and i will be using a python code to determine shapes , recognize objects .. etc here is my python code: import numpy as np

gstreamer error when streaming side-by-side 720p

我只是一个虾纸丫 提交于 2021-02-11 18:22:45
问题 gstreamer raises an error when trying to stream side-by-side video from a stereoscopic UVC camera. I have a stereoscopic camera attached via USB to an ARM board, but on the highest resolution setting that the camera allows gstreamer is raising an Invalid Dimension 0x0 error. v4l2-ctl --list-formats-ext -d /dev/video2 ioctl: VIDIOC_ENUM_FMT Index : 0 Type : Video Capture Pixel Format: 'MJPG' (compressed) Name : Motion-JPEG Size: Discrete 2560x960 Interval: Discrete 0.017s (60.000 fps) Interval

Gstreamer duplicate 2channel audio

若如初见. 提交于 2021-02-11 14:49:50
问题 I would like to generate 2 audio tones using audiotestsrc but then duplicate those two channels across 16 channels (i.e 8channels of the one tone and 8channels of the other). I have a command that generates 2 tones for 2 channels: gst-launch-1.0 interleave name=i ! audioconvert ! wavenc ! filesink location=file.wav audiotestsrc wave=0 freq=100 volume=0.4 ! decodebin ! audioconvert ! "audio/x-raw,channels=1,channel-mask=(bitmask)0x1" ! queue ! i.sink_0 audiotestsrc wave=1 freq=150 volume=0.4 !

Adding/Inserting a GstBuffer to the Gstbuffer pool

﹥>﹥吖頭↗ 提交于 2021-02-11 14:29:27
问题 can any one guide me on how do we can add/insert the Gstbufffer to the GstBuffer pool? The GstBuffer Pool configuration is as shown below. pool = gst_buffer_pool_new(); config = gst_buffer_pool_get_config(pool); size = 420*420*3; // size of the pool buffer min_ = 1; max_ = 5; caps = gst_caps_from_string("video/x-raw"); gst_buffer_pool_config_set_params (config, caps, size, min_, max_); gst_caps_unref(caps); if ( gst_buffer_pool_set_config (pool, config)){ std::cout << "[INFO] Pool

VideoWriter OpenCV - cannot put pipeline to play in function CvVideoWriter_GStreamer::open

馋奶兔 提交于 2021-02-10 15:02:13
问题 Almost exactly the same question : OpenCV error - cannot put pipeline to play in function CvVideoWriter_GStreamer::open Context : I'm trying to create a video and save it in a .avi file with OpenCV 3.3.0 and Python 2.7. Problem : This code : fourcc = cv2.VideoWriter_fourcc(*'XVID') out = cv2.VideoWriter('data/out/output.avi', fourcc, 30, (800, 600)) Raises : (python2.7:12345): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed ** (python2.7:12345):

VideoWriter OpenCV - cannot put pipeline to play in function CvVideoWriter_GStreamer::open

微笑、不失礼 提交于 2021-02-10 15:01:36
问题 Almost exactly the same question : OpenCV error - cannot put pipeline to play in function CvVideoWriter_GStreamer::open Context : I'm trying to create a video and save it in a .avi file with OpenCV 3.3.0 and Python 2.7. Problem : This code : fourcc = cv2.VideoWriter_fourcc(*'XVID') out = cv2.VideoWriter('data/out/output.avi', fourcc, 30, (800, 600)) Raises : (python2.7:12345): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed ** (python2.7:12345):

VideoWriter OpenCV - cannot put pipeline to play in function CvVideoWriter_GStreamer::open

久未见 提交于 2021-02-10 15:01:33
问题 Almost exactly the same question : OpenCV error - cannot put pipeline to play in function CvVideoWriter_GStreamer::open Context : I'm trying to create a video and save it in a .avi file with OpenCV 3.3.0 and Python 2.7. Problem : This code : fourcc = cv2.VideoWriter_fourcc(*'XVID') out = cv2.VideoWriter('data/out/output.avi', fourcc, 30, (800, 600)) Raises : (python2.7:12345): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed ** (python2.7:12345):

There is a standard template of gstreamer metadata already defined?

风流意气都作罢 提交于 2021-02-08 10:45:36
问题 I'm writing a gstreamer-1.0 plugin in c. I would need to pass a parameter through the pipeline from one plugin to another by passing through other elements. I want to use metadata. I just have to transmit a "double" type variable and would like to avoid having to define a new metadata and its API. I tried to search a list of metadata already defined but have not found anything. My question is: There is a metadata already defined that has these characteristics ? 回答1: I'm not aware of any

There is a standard template of gstreamer metadata already defined?

瘦欲@ 提交于 2021-02-08 10:43:13
问题 I'm writing a gstreamer-1.0 plugin in c. I would need to pass a parameter through the pipeline from one plugin to another by passing through other elements. I want to use metadata. I just have to transmit a "double" type variable and would like to avoid having to define a new metadata and its API. I tried to search a list of metadata already defined but have not found anything. My question is: There is a metadata already defined that has these characteristics ? 回答1: I'm not aware of any