3

我想将 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 或 edgedetect。

我尝试从源代码安装插件,没有任何改变。

4

2 回答 2

1

今天,如果您想使用此处此处描述的 GStreamer OpenCV 插件,您只需要做的是:

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

它在我的带有 Jetpack 4.5.1 的 Jetson Nano 4Gb 上运行良好。

有关信息:

$ 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
于 2021-07-24T21:45:09.730 回答
0

debian/ubuntu 中的 gst-plugins-bad 包中缺少 opencv 元素。自己编译并将安装路径(类似/usr/local/lib/gstreamer-0.10)添加到 gstreamer 的搜索路径(例如使用 GST_PLUGIN_PATH 环境变量)

于 2012-12-19T17:36:21.150 回答