Extended Features

Last Updated on : 2023-08-09 09:25:03

The extended features of pan-tilt-zoom (PTZ) control include site favorites, preset points, and panorama stitching.

  • Site favorites: The user can save the current view and position of the camera as one of the site favorites. The site name can be customized.
  • Preset points: A preset point is like a simplified favorite site. Up to four preset points can be set, each with a fixed name that cannot be customized.
  • Panorama stitching: The camera uses the PTZ feature to capture images from different perspectives or angles. Then, the captured images are stitched together to create a seamless panoramic image.

Site favorites

Add a site to favorites on the mobile app:

Extended Features

How to add a site to favorites:

  1. The user rotates the camera to the intended position using the mobile app, taps Add, and names the site. The mobile app then sends this operation as a DP command to the camera, which is then sent to the PTZ component through E_TY_MSG_PTZ_PRESET_ADD.

  2. On receiving the command, the PTZ component will check if the number of site favorites has reached the upper limit. If so, it will return a failure response. Otherwise, it will read and save the current position to the PTZ configuration, assign an index ID to this site, and send the E_TY_MSG_PTZ_PRESET_ADD message to the event component to report the result.

    Sites in the favorites are sorted by pan angle in ascending to facilitate planning patrol routes.

How to delete a site from favorites:

  1. The user sends a DP command to the camera using the mobile app.

  2. The camera sends the _TY_MSG_PTZ_PRESET_DEL message to the PTZ component, which will retrieve and delete the specified site by index ID and report success. If the specified site is not found, the PTZ component reports a failure.

    Users can add up to 16 sites to their favorites. If the limit is reached, they must delete a site before adding a new one.

Preset point

Adding a preset point is like adding a site to favorites. The user adds a preset point to the camera using the mobile app by sending a DP command to the camera. These preset points are identified by preset names that cannot be changed. The PTZ component receives E_TY_MSG_PTZ_LINK_POS_SET.

Extended Features

Panorama stitching

The camera captures images from different angles using the PTZ feature and uploads them for stitching. The user can then view the stitched panoramic image on the mobile app.

Currently, only horizontal stitching is supported.

How panorama stitching works

Self-check
Move to the
specified position.
Send a message to 'event'.
Wait for image capture to finish.
'event' finishes image capture,
uploads the image via the SDK,
and sends a message to PTZ.
PTZ moves to the next position.
Repeat the above process
until all the images are uploaded.
Return to the
original position.
  1. The mobile app sends the stitching type to the camera, which then sends the command E_PANORAMA_START to the PTZ component through E_TY_MSG_PTZ_PANORAMA.
  2. On receiving the command, the PTZ component will check if a self-check is in progress. If so, it will report panorama stitching as unavailable due to the ongoing self-check. Otherwise, it will save the received panorama stitching information to PTZ configuration and perform a self-check.
  3. After the self-check, the PTZ motor moves to the first target position. After the position is reached, the PTZ component sends the command E_PANORAMA_SEND to the event component through E_TY_MSG_PTZ_PANORAMA.
  4. The event invokes the capture component to capture and upload images to the mobile app using the SDK. Once completed, it sends E_PANORAMA_SEND_DONE to the PTZ component through E_TY_MSG_PTZ_PANORAMA.
  5. On receiving the message, the PTZ motor moves to the next position and then repeats the above process until all the required images for stitching are uploaded.
  6. The camera returns to its original position after finishing the panorama stitching task.

If any issues occur during the process mentioned above, such as network failure or privacy mode being enabled, you can send E_PANORAMA_EXIT to the PTZ component through E_TY_MSG_PTZ_PANORAMA. This will interrupt PTZ movement and return it to its original position.