Main Content

camera

Connection to Parrot drone FPV camera

Add-On Required: This feature requires the MATLAB Support Package for Parrot Drones add-on.

Description

This object represents a connection to the Parrot® drone's first-person view (FPV) camera. To acquire images from the Parrot drone camera, use this object with the functions listed in Object Functions.

Note

The Parrot Mambo FPV drone's FPV camera enters a low power mode, to save battery and prevent over heating if the drone is idle in the landed state for more than 3 minutes. Creating a new camera connection fails when the FPV camera is in low power mode. The snapshot and the preview functions time out with an already existing camera connection. To ensure the camera is activated, take off the drone before creating a new camera connection (See takeoff).

Creation

Description

cameraObj = camera(parrotObj) creates a camera object that connects to the camera of the Parrot drone, represented by parrotObj.

example

cameraObj = camera(parrotObj,droneCamera) creates a camera object that connects to the specified camera of the Parrot drone, represented by parrotObj.

example

Input Arguments

expand all

Parrot drone connection object, specified as a parrot object.

Name of the Parrot drone camera, specified as one of array values in the AvailableCameras property of the parrot object.

Properties

expand all

This property is read-only.

Name of the connected Parrot drone camera, specified as a string.

Example: "FPV"

Data Types: string

This property is read-only.

The video resolution of the incoming video stream of the current cameraObj, returned as a string.

Example: "640x360"

Data Types: string

Object Functions

The object functions are used to interact with your Parrot drone camera

previewPreview live video data from Parrot drone FPV camera
snapshotAcquire single image frame from Parrot drone FPV camera
closePreviewClose Parrot drone FPV camera preview window

Examples

collapse all

Connect to a Parrot drone by creating a parrot object..

parrotObj = parrot('Mambo')
parrotObj = 
          parrot with properties:

                    Name: "Mambo"
                      ID: "Mambo_564853"
                   State: "landed"
            BatteryLevel: 50%
        AvailableCameras: ["FPV"]
     

Connect to the drone camera using the camera object

cameraObj = camera(parrotObj)
cameraObj = 
          Camera with properties:

                    Name: "FPV"
              Resolution: "640x360" 
     

Connect to a Parrot drone by creating a parrot object..

parrotObj = parrot('Mambo')
parrotObj = 
          parrot with properties:

                    Name: "Mambo"
                      ID: "Mambo_564853"
                   State: "landed"
            BatteryLevel: 50%
        AvailableCameras: ["FPV"]
     

Connect to the FPV camera using the camera object

cameraObj = camera(parrotObj,'FPV')
cameraObj = 
          Camera with properties:

                    Name: "FPV"
              Resolution: "640x360" 
     

Version History

Introduced in R2019a

See Also

| |