Skip to content

The Camera Control

Hoël Vasseur edited this page Jun 23, 2016 · 1 revision

Camera control

In OpenVivoe you can even control a camera. Let's imagine that you have a camera of which cropping and scaling parameters are controllable within a shell script for example. Then, you may want the manager to control the camera using VIVOE, by setting the RoI objects in the MIB. With OpenVivoe this is possible. All you have to do is to set the command line to use in a specific key in the configuration file, as follows:

[source_1]
channelUserDesc=source camera
gst_source=v4l2src device=/dev/video0 ! capsfilter caps="video/x-raw,format=I420,width=640,height=480,interlace-mode=(string)progressive,framerate=(fraction)20/1" ! avenc_mpeg4
camera_ctl=./path/to/a/script/which/control/camera %a %b %c %d

The string format reminding the "printf" format with the '%' correspond to the MIB's objects:

  • %a will be dynamically replace by the value of channelRoiOriginTop
  • %b will be dynamically replace by the value of channelRoiOriginLeft
  • %c will be dynamically replace by the value of channelRoiExtentBottom
  • %d will be dynamically replace by the value of channelRoiExtentRight

When OpenVivoe receives a SNMP request from the manager to update one of those parameters. If the key camera_ctl is present in configuration file, the command line associated even if this parameter is not used in this command line.

WARNING!!

This can be used along with traditional RoI but we do not insure the result of using both of those functionality.