Configure a Single Stream Camera
A single_stream
camera reads from a HTTP server streaming image data.
The server that the model reads from should output an image:
- If it’s a color image server, then it should output JPEG, PNG, or our custom VIAM color format,
image/vnd.viam.rgba
. - If it’s a depth image server, it should output either a Z16 PNG, or our custom VIAM depth format,
image/vnd.viam.dep
.
Your single_stream
camera can output:
- A
depth
stream which outputs a 2D depth map or, if you provideintrinsic_parameters
, a point cloud. - A
color
stream which outputs color values in 2D.
On the COMPONENTS subtab, navigate to the Create Component menu.
Enter a name for your camera, select the type camera
, and select the single_stream
model.

Fill in the attributes for your single stream camera:

{
"name": "<camera_name>",
"type": "camera",
"model" : "single_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>,
"url": <string>
}
}
The following attributes are available for single stream cameras:
Name | Inclusion | Description |
---|---|---|
intrinsic_parameters | Optional | The intrinsic parameters of the camera used to do 2D <-> 3D projections:
|
distortion_parameters | Optional | Modified Brown-Conrady parameters used to correct for distortions caused by the shape of the camera lens:
|
stream | Required | color or depth . The image to be returned when you call Next() or NextPointCloud() . |
debug | Optional | Enables the debug outputs from the camera if true . Defaults to false . |
url | Required | The color or depth stream url. |
If you have a camera that uses its own SDK to access its images and point clouds (like an Intel RealSense camera), you can attach a camera server as a remote component to your robot. These remote cameras show up just like regular cameras on your robot.
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.