opencv - 无法在树莓派4上使用opencv 4.1.0-openvino打开IP摄像机

标签 opencv raspberry-pi ip-camera openvino

我需要使用树莓派4访问AXIS M1125网络摄像机的视频流。

我有一个适用于我的笔记本电脑和raspberry pi 3的代码。我使用opencv 4.1,该文件来自raspbian的openvino发行版。

camera = cv2.VideoCapture('http://192.168.1.38/axis-cgi/jpg/image.cgi')


当我运行代码并调试OPENCV_VIDEOCAPTURE_DEBUG时,输出为:
[ WARN:0] VIDEOIO(FFMPEG): trying capture filename='http://192.168.1.38/mjpg/1/video.mjpg' ...
[ WARN:0] VIDEOIO(FFMPEG): backend is not available (plugin is missing, or can't be loaded due dependencies or it is not compatible)
[ WARN:0] VIDEOIO(GSTREAMER): trying capture filename='http://192.168.1.38/mjpg/1/video.mjpg' ...
(python3:6939): GStreamer-CRITICAL **: 14:32:38.521: 
Trying to dispose element appsink0, but it is in READY instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
...
[ WARN:0] VIDEOIO(GSTREAMER): can't create capture
[ WARN:0] VIDEOIO(V4L2): trying capture filename='http://192.168.1.38/mjpg/1/video.mjpg' ...
[ WARN:0] VIDEOIO(V4L2): can't create capture
[ WARN:0] VIDEOIO(CV_IMAGES): trying capture filename='http://192.168.1.38/mjpg/1/video.mjpg' ...
[ WARN:0] VIDEOIO(CV_IMAGES): created, isOpened=0
[ WARN:0] VIDEOIO(CV_MJPEG): trying capture filename='http://192.168.1.38/mjpg/1/video.mjpg' ...
[ WARN:0] VIDEOIO(CV_MJPEG): can't create capture

cv2.getBuildInformation()的输出:
Platform:
    Timestamp:                   2019-03-19T16:11:44Z
    Host:                        Linux 4.13.0-45-generic x86_64
    Target:                      Linux 1 arm
    CMake:                       3.7.2
    CMake generator:             Ninja
    CMake build tool:            /usr/bin/ninja
    Configuration:               Release

Video I/O:
    FFMPEG:                      YES
      avcodec:                   YES (57.64.101)
      avformat:                  YES (57.56.101)
      avutil:                    YES (55.34.101)
      swscale:                   YES (4.2.100)
      avresample:                NO
    GStreamer:                   YES (1.10.4)
    v4l/v4l2:                    YES (linux/videodev2.h)

最佳答案

您是否已完成所有依赖项的安装?在/opt/intel/openvino/install_dependencies下。我还建议检查演示应用程序是否正在运行,但仍然存在问题。

关于opencv - 无法在树莓派4上使用opencv 4.1.0-openvino打开IP摄像机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57040760/

相关文章:

opencv - 来自两个校准相机的 3D 重建 - 此管道中的错误在哪里?

javascript - 为 Raspberry Pi 构建 Node.js 发生了什么

ffmpeg - 什么命令将 mjpeg IP 摄像机流转换为 CPU 使用率最低的 mp4 文件?

c++ - 如何将 C++ union 转换为 Delphi

opencv - OpenCV中adaptiveThreshold()的GPU实现

python - 如何使用 PyQt 和 OpenCV 读取帧

python - 警告 : QT_DEVICE_PIXEL_RATIO is deprecated

node.js - 树莓派 opencv 3 和 node-opencv

linux - Raspberry PI - RT2870(内核模块 mt7601Usta)WiFi SUB dongle - 作为 WiFi 接入点

javascript - HTML 多个 Javascript 别名