matlab-use-cameras

Connect to cameras and acquire images in MATLAB using Image Acquisition Toolbox videoinput.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-use-cameras
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-use-cameras
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/test-and-measurement/matlab-use-cameras
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-use-cameras

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Connecting MATLAB to cameras involves choosing between multiple interfaces (videoinput, webcam, gigecam) and adaptors (winvideo, gentl, vendor-specific), and picking the wrong one leads to limited functionality, missing features, or failed connections. This Skill guides the AI agent to always use the correct Image Acquisition Toolbox interface for webcams, GigE Vision, USB3 Vision, CoaXPress, and Camera Link cameras.

Core Features & Use Cases

  • Device enumeration and connection: List available cameras with imaqhwinfo and connect via videoinput with the correct adaptor for each platform and camera type.
  • Acquisition workflows: Preview live video, capture single snapshots, acquire multiple frames with immediate or manual triggering, and configure ROI, color space, and device-specific properties.
  • GenTL setup guidance: Install the GenICam Interface support package and vendor GenTL producers for GigE Vision, USB3 Vision, CoaXPress, and Camera Link frame grabbers.
  • Use Case: A user asks how to capture images from a FLIR GigE Vision camera. The agent enumerates devices with imaqhwinfo("gentl"), connects with videoinput, acquires frames with start/getdata, and cleans up properly.

Quick Start

Ask the agent to connect to your webcam in MATLAB, preview the live feed, and capture a snapshot using Image Acquisition Toolbox.

Frequently Asked Questions about matlab-use-cameras

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect to a camera in MATLAB?

Use videoinput from Image Acquisition Toolbox as the primary camera interface. First enumerate devices with imaqhwinfo, then create a video input object with the appropriate adaptor such as videoinput("winvideo", 1) on Windows.

How do I acquire images from a GigE Vision camera in MATLAB?

Use videoinput("gentl", ...) with the GenICam Interface support package rather than gigecam or the legacy gige adaptor. You must also install the camera vendor's GenTL producer (.cti file), such as Spinnaker SDK for FLIR cameras.

What is the difference between videoinput and webcam in MATLAB?

videoinput from Image Acquisition Toolbox is the primary, full-featured interface supporting triggering, ROI, logging, and callbacks. webcam from the support package is a limited alternative used only on MATLAB Online or when Image Acquisition Toolbox is unavailable.

How do I list available cameras in MATLAB?

Use imaqhwinfo to enumerate all installed adaptors and devices, for example imaqhwinfo("winvideo") returns DeviceInfo for Windows cameras. Avoid webcamlist or gigecamlist, which only see a subset of devices.

Why does the gentl adaptor show no devices in MATLAB?

The GenICam support package provides only the MATLAB-side consumer; you must also install the camera vendor's GenTL producer (.cti file) and register its path. Verify installation by checking that gentl appears in imaqhwinfo InstalledAdaptors.

When should I not use videoinput for camera acquisition?

Avoid videoinput on MATLAB Online, where it is unavailable and webcam() must be used instead. Also use webcam() only when the user explicitly requests it or Image Acquisition Toolbox is not installed.