nx_camera_sdk
1.0
Camera SDK
|
Pan-tilt-zoom management. More...
#include <camera_plugin.h>
Classes | |
struct | Limits |
Public Types | |
enum | Capability { ContinuousPanCapability = 0x00000001, ContinuousTiltCapability = 0x00000002, ContinuousZoomCapability = 0x00000004, AbsolutePanCapability = 0x00000010, AbsoluteTiltCapability = 0x00000020, AbsoluteZoomCapability = 0x00000040, FlipPtzCapability = 0x00000100, LimitsPtzCapability = 0x00000200, DevicePositioningPtzCapability = 0x00001000, LogicalPositioningPtzCapability = 0x00002000, ContinuousPtzCapabilities = ContinuousPanCapability | ContinuousTiltCapability | ContinuousZoomCapability, AbsolutePtzCapabilities = AbsolutePanCapability | AbsoluteTiltCapability | AbsoluteZoomCapability } |
enum | CoordinateSpace { DevicePtzCoordinateSpace, LogicalPtzCoordinateSpace } |
enum | Orientation { Horizontal = 0x1, Vertical = 0x2 } |
Public Member Functions | |
virtual int | getCapabilities () const =0 |
Returns bitset of Capability enumeration members. | |
virtual int | continuousMove (double panSpeed, double tiltSpeed, double zoomSpeed)=0 |
Starts or stops continuous PTZ movement. More... | |
virtual int | absoluteMove (CoordinateSpace space, double pan, double tilt, double zoom, double speed)=0 |
Sets camera PTZ position in the given coordinate space. More... | |
virtual int | getPosition (CoordinateSpace space, double *pan, double *tilt, double *zoom)=0 |
Gets PTZ position from camera in the given coordinate space. More... | |
virtual int | getLimits (CoordinateSpace space, Limits *limits)=0 |
Gets PTZ limits of the camera. More... | |
virtual int | getFlip (int *flip)=0 |
Gets the camera streams's flipped state. More... | |
![]() | |
virtual void * | queryInterface (const nxpl::NX_GUID &interfaceID)=0 |
Cast to type, specified by interfaceID. More... | |
virtual int | addRef () const =0 |
Increment reference counter. More... | |
virtual int | releaseRef () const =0 |
Decrement reference counter. More... | |
Pan-tilt-zoom management.
VMS client has several PTZ support levels, and the more features are supported by the camera's PTZ manager, the smoother will be the client's experience.
These levels are as follows:
Logical space for absolute positioning is defined as follows:
|
pure virtual |
Sets camera PTZ position in the given coordinate space.
Note that for the function to succeed, this controller must have a capability corresponding to the provided coordinate space, that is DevicePositioningPtzCapability
or LogicalPositioningPtzCapability
.
This function is expected to be implemented if this controller has at least one of the AbsolutePtzCapabilities
.
space | Coordinate space of the provided position. |
pan | |
tilt | |
zoom | |
speed | Movement speed, in range [0, 1]. |
|
pure virtual |
Starts or stops continuous PTZ movement.
Speed is specified in image-based coordinate space and all of its components are expected to be in range [-1, 1]
. This means that implementation must handle flipped / mirrored state of the video stream.
Passing zero in speed should stop PTZ movement.
This function is expected to be implemented if this controller has at least one of the Ptz::ContinuousPtzCapabilities
.
panSpeed | |
tiltSpeed | |
zoomSpeed |
|
pure virtual |
Gets the camera streams's flipped state.
This function is expected to be implemented only if this controller has FlipPtzCapability
.
[out] | flip | Flipped state of the camera's video stream, a bitset of Orientation enumeration members. |
|
pure virtual |
Gets PTZ limits of the camera.
This function is expected to be implemented only if this controller has LimitsPtzCapability
.
space | Coordinate space to get limits in. | |
[out] | limits | Ptz limits. |
|
pure virtual |
Gets PTZ position from camera in the given coordinate space.
This function is expected to be implemented if this controller has at least one of the AbsolutePtzCapabilities
.
space | Coordinate space to get position in. | |
[out] | pan | |
[out] | tilt | |
[out] | zoom |