Multi-Lens Camera Solution

Last Updated on : 2024-10-23 08:34:17download

Dome and bullet camera solution

Compared to traditional cameras, the dual-lens dome and bullet camera offers a wide angle for panoramic views and a narrow angle for detailed observation. This enables smart track through dome-bullet linkage and provides both wide views and detail capture. One device serves the purpose of two, making the installation easier.

Multi-Lens Camera Solution

Core strengths

  • You do not need to update the embedded SDK. The device only needs to splice video streams and send a spliced stream to the SDK, avoiding extra integration work compared to monocular cameras.
  • Multiple video streams can be spliced for transmission, preventing issues such as audio-video desynchronization or streaming failures that may arise from separate channel transmission.
  • After configuration on the Tuya Developer Platform, the app automatically handles video stream splitting.
  • Supports dome-bullet linkage.

Solution description

Create a product

  1. Log in to Tuya Developer Platform and click Create.

    Multi-Lens Camera Solution
  2. Click IP Camera > Multi-Lens Camera > Custom Solution.

  3. Specify the product name and product model, and click Create.

    If no camera solution on the platform interests you, consult Tuya personnel.

Implementation logic on the device

  • Based on the product form, the device splices two video streams into a single stream and sends it to the Tuya SDK (this process requires certain chip performance). The SDK will transmit the stream. After the app receives the stream, the app will split the video stream according to the platform configuration.
  • In dome-bullet linkage, the device must rotate according to the coordinates sent back by the app, positioning itself to the destination location the user wants to view.

Version requirements for app SDK

Integrating dual-lens cameras requires the app SDK version to be higher than v5.5, while integrating tri-lens cameras requires the app SDK version to be higher than v5.7.

Integration method

  1. Go to the Advanced Functions section on Tuya Developer Platform, turn on IPC Video Split Ability, and click Configuration. This function is available after your Tuya project manager adds your account to the allowlist.

    Multi-Lens Camera Solution
  2. Configure the function based on camera parameters.

    Multi-Lens Camera Solution
  • The configuration is complex. You can modify parameters based on the following example. If you have any questions, contact your project manager.
  • For better readability, line breaks are added to the following example. Before you copy and paste the modified version, you must remove the line breaks.

Parameters for splitting dual-channel video streams

"total_split_num":2,
"split_info": [
{"index":1,"type":2,"res_pos": [[0,0,640,360],[0,0,1920,1080]]},
{"index":2,"type":1,"res_pos": [[0,360,640,360],[0,1080,1920,1080]]}],
"align_info":
{"align_type":21,"align_group": [[1],[2]],"localizer_group": [2]}}

Parameters for splitting tri-channel video streams

One window on top and two windows below:

 "total_split_num":3,
"split_info": [ 
{"index":1,"type":1,"res_pos": [[0,0,640,360],[0,0,1920,1080]]},
{"index":2,"type":2,"res_pos": [[0,360,320,360],[0,1080,960,1080]]}, {"index":3,"type":2,"res_pos": [[320,360,320,360],[960,1080,960,1080]]}],
"align_info":
{"align_type":31,"align_group": [[1],[2,3]],"localizer_group": [2,3]}
}

Two windows on top and one window below:

"total_split_num":3,
"split_info": [ 
{"index":1,"type":2,"res_pos": [[0,0,320,360],[0,0,960,1080]]}, {"index":2,"type":2,"res_pos": [[320,0,320,360],[960,0,960,1080]]},
{"index":3,"type":1,"res_pos": [[0,360,640,360],[0,1080,1920,1080]]}],
"align_info":
{"align_type":32,"align_group": [[1,2],[3]],"localizer_group": [1,2]}
}

Parameter description

Parameter Description
total_split_num The number of video channels for splitting. Only two video channels are supported for splitting.
split_info The information about video stream splitting.
index The sequence number of lenses, starting from 1.
type The linkage type.
  • 0: no linkage
  • 1: dome camera linkage
  • 2: bullet camera linkage
res_pos The position information of the camera in standard definition, high definition, or other resolutions, which is formatted as [x,y,w,h].
align_info The app window layout after video streaming splitting.
align_type The window layout type.
  • 20: two video streams that are stacked vertically
  • 21: two video streams that are stacked side by side
  • 31: three windows with one on top and two below
  • 32: three windows with two on top and one below
align_group The two-dimensional array. Place windows arranged in the same row within one array.
localizer_group The one-dimensional array, which is used to mark the position of the display bounding box. The value is one of the one-dimensional arrays in the align_group array.

Special data points (DPs)

DP name Identifier Data transmission type Data type Description
Center of the cross frame for positioning (bullet camera lens) ipc_multi_locate_coor Deliverable and reportable (read-write) String The coordinates where the user wants the dome camera to rotate by performing an operation in the app of the bullet camera. The x,y coordinates are expressed as percentages relative to the width and height, separated by a comma (,). For example, "83, 21".

After receiving the DP, the device calculates the angle to rotate to the corresponding position.

Interface introduction

UI Function description
Multi-Lens Camera Solution
Multi-Lens Camera Solution
After users tap the landscape screen icon, the windows are displayed and arranged based on index. If index is 1, the window is displayed in full screen and other windows are displayed vertically on the right.
Tapping the icon in the red box can display or hide the small window.
Tapping the small window can swap its position with the large window.
Multi-Lens Camera Solution When the device is in dome-bullet linkage mode, dragging the crosshair on the screen prompts the app to send the specific DP ipc_multi_locate_coor to the device. Then, the device calculates the angle and rotates to the corresponding position.
Multi-Lens Camera Solution One window on top and two windows below. The positioning box at the bottom spans across both lower windows.
Multi-Lens Camera Solution Two windows on top and one window below. The positioning box at the top spans across both upper windows.

Dual-lens solution featuring long and short focus

This solution is suitable for dual-lens cameras with long-focus and short-focus lenses. The long-focus lens captures details with a narrower field of view, while the short-focus lens provides a wider field of view for a global perspective. The following figure shows the appearance of the dual-lens cameras:

Multi-Lens Camera Solution

The dual-lens camera with long and short focus does not require distinguishing between the behaviors of the two cameras in the playback window of the app. Therefore, the playback panel is displayed as if the device were a monocular camera. The video stream of the playback window is switched only during the zoom process.

Solution description

Create a product

  1. Log in to Tuya Developer Platform and click Create.

    Multi-Lens Camera Solution
  2. Click IP Camera > Focus Shift Dual Camera > Custom Solution.

  3. Specify the product name and product model, and click Create.

    If no camera solution on the platform interests you, consult Tuya personnel.

Advanced functions

Make sure that Focus Shift Ability is selected.

Custom DP

Add the following custom DPs:

DP name Identifier Data transmission type Data type Description
Zoom factor for dual (multi) lens cameras ipc_multi_zoom rw Value The zoom range.
Default value: 10-30. The step is 1, the scale is 1, and the unit is x.
Example: The zoom range is from 1.0x to 3.0x, with a minimum zoom interval of 0.1.
Zoom threshold for dual (multi) lens cameras ipc_multi_zoom_critical rw String The zoom threshold for each lens in a multi-lens camera. If multiple lenses exist, separate the values with commas (,).
Example: For a dual-lens camera, use "20" or for a tri-lens camera, use "17,30". The actual zoom factor is calculated as ipc_multi_zoom ÷ scale.

Embedded changes

The embedded system adjusts the focal length based on the value of ipc_multi_zoom.

  • If ipc_multi_zoom < ipc_multi_zoom_critical, the long-focus video stream is used.
  • If ipc_multi_zoom > ipc_multi_zoom_critical, the short-focus video stream is used.
  • If ipc_multi_zoom = ipc_multi_zoom_critical, the embedded system can decide which video stream to use.

UI display

Multi-Lens Camera Solution Multi-Lens Camera Solution