图像采集
从 IP 摄像头采集图像
使用 ipcam
对象创建到 IP 摄像头的连接。要创建该对象,您需要摄像头的 URL。如果摄像头需要身份验证,请指定用户名和密码。URL 必须为 HTTP/RTSP 上的 Motion JPEG (mjpeg) 或 RTSP 流上的 H.264。
使用 snapshot
函数从 IP 摄像头采集图像。您可以采集单个图像,也可以设置循环来采集多个图像。使用 preview
函数测试摄像头流。
有关显示如何连接的示例和查找 IP 摄像机的 URL 和流编解码器的提示,请参阅Connect to IP Cameras。
函数
ipcam | Create ipcam object to acquire images from an IP
camera |
preview | Preview live video data from IP camera |
snapshot | Acquire single image frame from an IP camera |
closePreview | Close IP camera preview window |
主题
- Find IP Camera URL
Find the URL of your IP Camera.
- Set Properties for IP Camera Acquisition
Set device specific properties of the IP camera during or after object creation and using the
webread
function. - Acquire Images from IP Cameras
Learn how to use the
snapshot
function to acquire one image frame from an IP camera and display it. - Acquire IP Camera Images in a Loop and Create an AVI File
Acquire multiple image frames from an IP camera, and log the images to an AVI file using MATLAB® VideoWriter.