Main Content

closePreview

Close Ryze drone camera preview window

Since R2020a

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

Description

closePreview(cameraObj) closes the preview window of the Ryze drone camera, specified as cameraObj. You can close the preview at any time using the closePreview function. If you do not explicitly close the preview, it closes when you clear the camera object.

example

Examples

collapse all

Connect to a Ryze Tello drone.

droneObj = ryze()
droneObj = 
          ryze with properties:

                    Name: "Tello"
                      ID: "TELLO-D2B07B"
               IPAddress: "192.168.10.1"
                   State: "landed"
            BatteryLevel: 50%
             StationMode: 0
        AvailableCameras: ["FPV"]

Connect to the drone camera using the camera object.

cameraObj = camera(droneObj);
cameraObj = 
          Camera with properties:

                    Name: "FPV"
              Resolution: "720x960" 
preview(cameraObj)

Preview video from the camera.

preview(cameraObj);

The preview window opens and displays live video stream from your camera. The lower portion of the window shows the timestamp in seconds, resolution, and frame rate in frames per second.

Close the preview.

closePreview(cameraObj);

Input Arguments

collapse all

Ryze drone's camera connection object, specified as cameraObj.

Version History

Introduced in R2020a

See Also

| |