.NET SDK Documentation

    Show / Hide Table of Contents

    Class CameraComponent

    Support for Vector’s camera.

    Vector has a built-in camera which he uses to observe the world around him. You can start receiving camera images from Vector by calling the StartFeed() method. The ImageReceived event will be raised for each frame received. Although there is an ImageEncoding property, the data received from Vector is always in the color JPEG format.

    The camera resolution is 1280 x 720 with a field of view of 90 deg (H) x 50 deg (V).

    Inheritance
    Object
    RobotObject
    Component
    CameraComponent
    Implements
    INotifyPropertyChanged
    Inherited Members
    RobotObject.PropertyChanged
    Namespace: Anki.Vector
    Assembly: Anki.Vector.dll
    Syntax
    public class CameraComponent : Component, INotifyPropertyChanged

    Properties

    | Improve this Doc View Source

    AutoExposureEnabled

    Gets a value indicating whether automatic exposure is enabled.

    If auto exposure is enabled the Gain and ExposureMs values will constantly be updated by Vector.

    public bool AutoExposureEnabled { get; }
    Property Type
    Boolean
    | Improve this Doc View Source

    Config

    Gets the configuration and calibration of the camera.

    public CameraConfig Config { get; }
    Property Type
    CameraConfig
    Remarks

    Camera configuration is only populated with firmware version 1.7 or greater. See CameraSettings.

    | Improve this Doc View Source

    ExposureMs

    Gets the current camera exposure setting in milliseconds.

    public uint ExposureMs { get; }
    Property Type
    UInt32
    Remarks

    Exposure is only populated with firmware version 1.7 or greater. See CameraSettings.

    | Improve this Doc View Source

    Gain

    Gets the current camera gain setting.

    public float Gain { get; }
    Property Type
    Single
    Remarks

    Gain is only populated with firmware version 1.7 or greater. See CameraSettings.

    | Improve this Doc View Source

    IsFeedActive

    Gets a value indicating whether the camera feed is active.

    public bool IsFeedActive { get; }
    Property Type
    Boolean
    | Improve this Doc View Source

    LatestImage

    Gets the latest image from the camera feed.

    public Image LatestImage { get; }
    Property Type
    Image

    Methods

    | Improve this Doc View Source

    CaptureHighResolutionImage()

    Captures a high resolution image from the robot's camera and returns it.

    public Task<Image> CaptureHighResolutionImage()
    Returns
    Type Description
    Task<Image>

    A task that represents the asynchronous operation; the task result contains the image captured from the robot.

    Remarks

    This metohd is only available with firmware version 1.7 or greater. See HighResolutionImageCapture.

    | Improve this Doc View Source

    CaptureSingleImage()

    Request to capture a single image from the robot's camera.

    This call requests the robot to capture an image and returns it. If the camera feed is active, this call returns the contents of the LatestImage property and does not request a new image from the robot.

    public Task<Image> CaptureSingleImage()
    Returns
    Type Description
    Task<Image>

    A task that represents the asynchronous operation; the task result contains the image captured from the robot.

    | Improve this Doc View Source

    EnableAutoExposure()

    Enable auto exposure on Vector's Camera.

    Enable auto exposure on Vector's camera to constantly update the exposure time and gain values based on the recent images. This is the default mode when any SDK program starts.

    public Task<StatusCode> EnableAutoExposure()
    Returns
    Type Description
    Task<StatusCode>

    A task that represents the asynchronous operation; the task result contains the result from the robot.

    Remarks

    This method is only available with firmware version 1.7 or greater. See CameraSettings.

    | Improve this Doc View Source

    SetManualExposure(UInt32, Single)

    Set manual exposure values for Vector's Camera.

    This will disable auto exposure on Vector's camera and force the specified exposure time and gain values.

    See the camera Config for valid ranges for the exposure and gain parameters

    public Task<StatusCode> SetManualExposure(uint exposureMs, float gain)
    Parameters
    Type Name Description
    UInt32 exposureMs

    The exposure in milliseconds.

    Single gain

    The gain.

    Returns
    Type Description
    Task<StatusCode>

    A task that represents the asynchronous operation; the task result contains the result from the robot.

    Remarks

    Requires behavior control. This method is only available with firmware version 1.7 or greater. See CameraSettings.

    | Improve this Doc View Source

    StartFeed()

    Starts the camera feed. The feed will run in a background thread and raise the ImageReceived event for each received image. It will also update the LatestImage property.

    public Task StartFeed()
    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    | Improve this Doc View Source

    StopFeed()

    Stops the camera feed.

    public Task StopFeed()
    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    Events

    | Improve this Doc View Source

    ImageReceived

    Occurs when camera feed event.

    public event EventHandler<ImageReceivedEventArgs> ImageReceived
    Event Type
    EventHandler<ImageReceivedEventArgs>

    Implements

    System.ComponentModel.INotifyPropertyChanged
    • Improve this Doc
    • View Source
    Back to top Copyright (c) 2019 by Wayne Venables