标签: python-onvif

Python-ONVIF PTZ控制——绝对和相对移动

我正在用 Python 开发一个应用程序来控制兼容 ONVIF 的相机。

软件:Debian Wheezy、Python 2.7、Quatanium python-onvif 客户端

硬件:Raspberry Pi 2 B、本地路由器上的 IP 摄像头、用于开发的 wifi/VNC

所需的 PTZ 功能包括绝对移动、相对移动、连续移动、停止和使用预设位置。通过下面提取的测试代码,除了绝对和相对移动之外,所有这些都可以工作。所有这些代码执行时没有任何错误,但相机不会因绝对或相对移动而移动。我希望有人能提出这两个函数的问题。该示例有点长,但我尝试包含足够的代码来显示工作部分和非工作部分(带有大写注释)之间的对比,以供参考和测试。

测试草图:

#!/usr/bin/python

#-------------------------------------------------------------------------------
#Test of Python and Quatanium Python-ONVIF with NETCAT camera PT-PTZ2087
#ONVIF Client implementation is in Python
#For IP control of PTZ, the camera should be compliant with ONVIF Profile S
#The PTZ2087 reports it is ONVIF 2.04 but is actually 2.4 (Netcat said text not changed after upgrade)
#------------------------------------------------------------------------------

import onvifconfig

if __name__ == '__main__':

    #Do all …
Run Code Online (Sandbox Code Playgroud)

ip-camera onvif python-onvif

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

ip-camera ×1

onvif ×1

python-onvif ×1