Area zoom implementation

Area zoom is implemented via PTZ commands: PTZ Click-to-Move and Drag-to-Zoom. For Click-to-Move is used tag PanTilt in space PanTiltSpase/TranslationSpaceFov. For Drag-to-Zoom is used tag Zoom in space ZoomSpace/TranslateSpaceFov.

Zoom Translation Space in FOV

The Relative Zoom Translation Space in FOV is introduced to simplify the navigation and zooming with dome cameras in graphical user interfaces. When the user wants to zoom in relative to the current camera view, the user requests a movement with respect to the current FOV.

Shape, rectangle

Description automatically generated

If a user wants to zoom in on a certain position in the current camera view, the Relative Zoom Translation in FOV can be combined with Relative Pan/Tilt Translation in FOV. This combination achieves the Area Zoom functionality.

A picture containing chart

Description automatically generated

The Zoom factor is the relation between the target and current view. The orientation of the target view (horizontal or vertical) determines which of the two dimensions (width or height) is used to calculate the zoom factor.

For example, if the target view is oriented horizontally (width > height), the zoom factor is based on the relation between the target view’s width and the current view’s width:

zoomfactor = targetview(width)/currentview(width)

If the target view is oriented vertically (height > width), then it is the height that is used:

zoomfactor = targetview(height)/current(height)

A value of 0.5 means the target view’s width or height is half in relation to the current view’s width or height, and an object in the target view is twice as big compared to the same object in the current view. A value of 1.0 means that the target view’s width or height is the same as the current view’s width or height and thus Zoom is not necessary.

Values below 1.0 specify Zoom In, values above 1.0 specify Zoom Out. (Please note that the Zoom Out values are specified only for completeness of the specification, and in XProtect it is not possible to perform Zoom Out via Area Zoom).

The following XML illustrates Area Zoom command for the transformation pictured above:

<tptz:RelativeMove>

  <tptz:ProfileToken>defaultPrimary</tptz:ProfileToken>

    <tptz:Translation>

      <tt:PanTilt xsi:type="tt:Vector2D" x="0.5" y="0.4"

                space="http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationSpaceFov"/>

      <tt:Zoom xsi:type="tt:Vector1D" x="0.37"

    space="http://www.milestonesys.com/ver10/tptz/ZoomSpaces/TranslationSpaceFov"/>

    </tptz:Translation>

    <tptz:Speed>

      <tt:PanTilt xsi:type="tt:Vector2D" x="1" y="1"/>

      <tt:Zoom xsi:type="tt:Vector1D" x="1"/>

    </tptz:Speed>

</tptz:RelativeMove>

If a device supports the Zoom Translation Space in FOV, it must specify it in the SupportedPTZSpaces field in the GetNodeResponse and GetNodesReponse commands.

The proposed range for this relative direction space ranges from 0 to plus infinity. The relative direction space is defined as follows.

<tt:RelativeZoomTranslationSpace>

  <tt:SpaceURI>

    http://www.milestonesys.com/ver10/tptz/ZoomSpaces/TranslationSpaceFov

  </tt:SpaceURI>

  <tt:XRange>

    <tt:Min>0</tt:Min>

    <tt:Max>INF<tt:Max>

  </tt:XRange>

</tt:RelativeZoomTranslationSpace>