closePreview

Close IP camera preview window

Description

example

closePreview(cam) closes the IP camera preview window for the ipcam object cam. 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 ipcam object.

Examples

collapse all

You can open or close the IP camera preview window any time after creating the ipcam object.

Create an object, cam, using the URL of the IP camera. The URL address must be for a Motion JPEG (mjpeg) HTTP or RTSP stream, so the URL must start with http.

cam = ipcam('http://172.28.17.193/video.mjpeg')
cam = 

Display Summary for ipcam:

             URL: 'http://172.28.17.193/video.mjpeg'
        Username: ''
        Password: ''
         Timeout: 10
             

Preview the image from the camera.

preview(cam)

The preview window opens and displays live video stream from your camera. The banner of the preview window shows the camera URL. The lower portion of the window shows the timestamp in seconds, resolution, and the frame rate in frames per second. Timestamp is the elapsed time since the object was created.

Close the preview.

closePreview(cam)

The preview window closes.

Introduced in R2015a