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.
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.
The Zoom factor is the relation between the target view and the current view. For example, a value of 0.5 means the target view is half in relation to the current view, and an object in the target view is twice as big compared to the same object in the current view.
Values below 1.0 specify Zoom In, values above 1.0 specify Zoom Out.
zoomfactor = targetview / currentview
The following XML illustrates Area Zoom command:
<tptz:RelativeMove>
<tptz:ProfileToken>defaultPrimary</tptz:ProfileToken>
<tptz:Translation>
<tt:PanTilt xsi:type="tt:Vector2D" x="-0.371604711" y="0.0589635596"
space="http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationSpaceFov"/>
<tt:Zoom xsi:type="tt:Vector1D" x="1.59614503"
space="http://www.avigilon.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 minimum range for this relative direction space ranges from 0 to plus infinity. However, a device may provide a different range. The relative direction space is defined as follows.
<tt:RelativeZoomTranslationSpace>
<tt:SpaceURI>
http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationSpaceFov
</tt:SpaceURI>
<tt:XRange>
<tt:Min>0</tt:Min>
<tt:Max>INF<tt:Max>
</tt:XRange>
</tt:RelativeZoomTranslationSpace>