Configure a Dual Stream Camera

A dual_stream HTTP client camera combines the streams of two camera servers to create colorful point clouds. One camera server streams a color stream and the other camera server streams a depth stream.

On the COMPONENTS subtab, navigate to the Create Component menu. Enter a name for your camera, select the type camera, and select the dual_stream model.

Creation of a dual stream camera in the Viam App config builder.

Fill in the attributes for dual stream camera:

Configuration of a dual stream camera in the Viam app config builder.
    "name": "<camera_name>",
    "type": "camera",
    "model" : "dual_stream",
    "attributes": {
        "intrinsic_parameters": {
            "width_px": <integer>,
            "height_px": <integer>,
            "fx": <float64>,
            "fy": <float64>,
            "ppx": <float64>,
            "ppy": <float64>
        "distortion_parameters": {
            "rk1": <float64>,
            "rk2": <float64>,
            "rk3": <float64>,
            "tp1": <float64>,
            "tp2": <float64>
        "stream": "<color|depth>",
        "debug": <boolean>,
        "color_url": <string>,
        "depth_url": <string>

The following attributes are available for dual stream cameras views:

intrinsic_parametersOptionalThe intrinsic parameters of the camera used to do 2D <-> 3D projections:
  • width_px: The expected width of the aligned image in pixels.
  • height_px: The expected height of the aligned image in pixels.
  • fx: The image center x point.
  • fy: The image center y point.
  • ppx: The image focal x.
  • ppy: The image focal y.
distortion_parametersOptionalModified Brown-Conrady parameters used to correct for distortions caused by the shape of the camera lens:
  • rk1: The radial distortion x.
  • rk2: The radial distortion y.
  • rk3: The radial distortion z.
  • tp1: The tangential distortion x.
  • tp2: The tangential distortion y.
streamRequiredcolor or depth. The image to be returned when you call Next() or NextPointCloud().
debugOptionalEnables the debug outputs from the camera if true. Defaults to false.
color_urlRequiredThe color stream url.
depth_urlRequiredThe depth stream url.

View the camera stream

Once your camera is connected, go to the CONTROL tab, and click on the camera’s dropdown menu. Toggle “View Camera”. If everything is configured correctly, you will see the live video feed from your camera.

Example Camera view inside Viam app

Next Steps