Configure a Fake Camera

A fake camera is a camera model for testing. The camera always returns the same image, which is an image of a gradient. This camera also returns a point cloud.

You can optionally specify a height and width.

Navigate to the Config tab of your robot’s page in the Viam app. Click on the Components subtab and click Create component. Select the camera type, then select the fake model. Enter a name for your camera and click Create.

Configuration of a fake camera in the Viam app config builder.

Edit and fill in the attributes as applicable.

{
    "name": "<your-camera-name>",
    "type": "camera",
    "model" : "fake",
    "attributes": {
        "width": <int>,
        "height": <int>
    }
}

The following attributes are available for fake cameras:

NameTypeInclusionDescription
widthintOptionalThe width of the image in pixels. The default width is 1280.
heightintOptionalThe height of the image in pixels. The default height is 720.

View the camera stream

Once your camera is configured, go to the Control tab, and click on the camera’s dropdown menu. Then toggle the camera or the Point Cloud Data view to ON. You will see the live video feed from your camera. You can change the refresh frequency as needed to change bandwidth.

Fake Camera View

Next Steps



Have questions, or want to meet other people working on robots? Join our Community Discord.