我想用GStreamer支持构建opencv。

我按照以下指南从源代码(版本1.8.1)构建了GStreamer:
http://kacianka.at/?p=145
我的主目录中有'gstreamer_build'文件夹,其中包含带有以下内容的'bin'文件夹:



我将此路径添加到我的环境变量PATH中。

当我像这样使用cmake时:



我得到以下输出,清楚地表明未找到gstreamer:

-- checking for module 'gstreamer-base-1.0'
--   package 'gstreamer-base-1.0' not found
-- checking for module 'gstreamer-video-1.0'
--   package 'gstreamer-video-1.0' not found
-- checking for module 'gstreamer-app-1.0'
--   package 'gstreamer-app-1.0' not found
-- checking for module 'gstreamer-riff-1.0'
--   package 'gstreamer-riff-1.0' not found
-- checking for module 'gstreamer-pbutils-1.0'
--   package 'gstreamer-pbutils-1.0' not found
-- checking for module 'gstreamer-base-0.10'
--   package 'gstreamer-base-0.10' not found
-- checking for module 'gstreamer-video-0.10'
--   package 'gstreamer-video-0.10' not found
-- checking for module 'gstreamer-app-0.10'
--   package 'gstreamer-app-0.10' not found
-- checking for module 'gstreamer-riff-0.10'
--   package 'gstreamer-riff-0.10' not found
-- checking for module 'gstreamer-pbutils-0.10'
--   package 'gstreamer-pbutils-0.10' not found

还有这个:
Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  NO
--     FFMPEG:                      NO
--       codec:                     NO
--       format:                    NO
--       util:                      NO
--       swscale:                   NO
--       resample:                  NO
--       gentoo-style:              NO
--     GStreamer:                   NO
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     OpenNI2:                     NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    Using libv4l1 (ver 1.0.1) / libv4l2 (ver 1.0.1)
--     XIMEA:                       NO
--     Xine:                        NO
--     gPhoto2:                     NO

谁能帮我这个?

最佳答案

我有同样的问题。

gstreamer-base对应于libgstbase-1.0.so(或libgstbase-0.10.so),可在包libgstreamer1.0-0 (或 libgstreamer0.10-0 (视情况而定))中找到。在下面,我们安装“-dev”软件包。

我在软件包libgstreamer-plugins-base1.0-dev 包中找到的其他库(libgst-video,libgst-app,libgst-riff,libgst-pbutils)(再次,替换为您要使用的版本v0.1 ,或v1.0)。

因此,以下命令应用于安装缺少的依赖项:

sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev

重复cmake命令,可能事先清除构建目录的内容。

关于opencv - 用Gstreamer编译Opencv,cmake找不到GStreamer,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/37678324/

10-17 00:33