Last Updated on : 2024-10-23 08:34:17download
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.
Create a product
Log in to Tuya Developer Platform and click Create.
Click IP Camera > Multi-Lens Camera > Custom Solution.
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
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.
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.
Configure the function based on camera parameters.
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.
|
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.
|
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.
UI | Function description |
---|---|
|
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. |
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. |
|
One window on top and two windows below. The positioning box at the bottom spans across both lower windows. | |
Two windows on top and one window below. The positioning box at the top spans across both upper windows. |
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:
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.
Create a product
Log in to Tuya Developer Platform and click Create.
Click IP Camera > Focus Shift Dual Camera > Custom Solution.
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
.
ipc_multi_zoom
< ipc_multi_zoom_critical
, the long-focus video stream is used.ipc_multi_zoom
> ipc_multi_zoom_critical
, the short-focus video stream is used.ipc_multi_zoom
= ipc_multi_zoom_critical
, the embedded system can decide which video stream to use.Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback