Main Content

snapshot

Acquire single image frame from Parrot drone FPV camera

Description

example

frame = snapshot(cameraObj) returns a single image from the Parrot® drone camera object, specified as cameraObj. Calling snapshot in a loop returns a new frame for each iteration of the loop.

example

[frame,ts] = snapshot(cameraObj) acquires a single image from the Parrot drone camera object, specified as cameraObj, assigns it to the variable frame, and returns the timestamp ts.

Examples

collapse all

Connect to a Parrot Mambo FPV drone over a wireless network.

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

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

Connect to the FPV camera

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

                    Name: "FPV"
              Resolution: "640x360"                    

Capture an image from the FPV camera

frame = snapshot(cameraObj);

Connect to a Parrot Mambo FPV drone over a wireless network.

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

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

Connect to the FPV camera

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

                    Name: "FPV"
              Resolution: "640x360"                    

Capture an image from the FPV camera and assign it to frame, acquire the timestamp, and assign it to ts

[frame,ts] = snapshot(cameraObj);

Display the acquired image

imshow(frame)

Display the timestamp of the snapshot

ts
time =  
        datetime
          15-Mar-2019 14:07:19                   

Input Arguments

collapse all

Parrot drone camera connection object, specified as a camera object.

Output Arguments

collapse all

The RGB image captured by the FPV camera of the drone, specified as a real-valued matrix.

See Also

|

Introduced in R2019a