我想将 edgedetect 与 gstreamer 结合使用。我之前检查过 gst-inspect。这是我得到的结果:
login@machine:~$ gst-inspect opencv
No such element or plugin 'opencv'
login@machine:~$ gst-inspect edgedetect
No such element or plugin 'edgedetect'
安装的插件是:
sudo apt-cache show gstreamer1.0-plugins-bad | grep Version
Version: 1.0.3-1~ubuntu12.04.1~ppa1
Gstreamer-Version: 1.0
“opencv”插件一定是插件坏了。我可以使用插件中包含的其他插件启动 gst-inspect,但不能启动 opencv 或 eddedetect。
我尝试从源代码安装插件,没有任何改变。
最佳答案
今天如果你想使用描述的 GStreamer OpenCV 插件 here和 here你只需要做的是:
sudo apt install gstreamer1.0-opencv
如果你想检查 edgedetect
插件是否可用(以及其他插件):
$ gst-inspect-1.0 edgedetect
Factory Details:
Rank none (0)
Long-name edgedetect
Klass Filter/Effect/Video
Description Performs canny edge detection on videos and images.
Author Michael Sheldon <mike@mikeasoft.com>
Plugin Details:
Name opencv
Description GStreamer OpenCV Plugins
Filename /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstopencv.so
Version 1.14.5
License LGPL
Source module gst-plugins-bad
Source release date 2019-05-29
Binary package GStreamer Bad Plugins (Ubuntu)
Origin URL https://launchpad.net/distros/ubuntu/+source/gst-plugins-bad1.0
GObject
+----GInitiallyUnowned
+----GstObject
+----GstElement
+----GstBaseTransform
+----GstVideoFilter
+----GstOpencvVideoFilter
+----GstEdgeDetect
测试是否正常:
$ gst-launch-1.0 videotestsrc ! videoconvert ! edgedetect ! videoconvert ! xvimagesink
它在我的 Jetson Nano 4Gb 和 Jetpack 4.5.1 上运行良好。
信息:
$ dpkg -L gstreamer1.0-opencv
/.
/usr
/usr/lib
/usr/lib/aarch64-linux-gnu
/usr/lib/aarch64-linux-gnu/gstreamer-1.0
/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstopencv.so
/usr/share
/usr/share/doc
/usr/share/doc/gstreamer1.0-opencv
/usr/share/doc/gstreamer1.0-opencv/AUTHORS
/usr/share/doc/gstreamer1.0-opencv/NEWS.gz
/usr/share/doc/gstreamer1.0-opencv/README.Debian
/usr/share/doc/gstreamer1.0-opencv/README.gz
/usr/share/doc/gstreamer1.0-opencv/changelog.Debian.gz
/usr/share/doc/gstreamer1.0-opencv/copyright
关于ubuntu - gstreamer opencv 边缘检测,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13744763/