Connects to and acquires images from cameras in MATLAB via Image Acquisition Toolbox. Covers USB webcams, GigE Vision, USB3 Vision, CoaXPress, Camera Link, and GenICam devices.
Ships in test-and-measurement. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use Image Acquisition Toolbox's videoinput as the primary interface for all camera workflows. Other interfaces (webcam, gigecam) are secondary and should only be used when explicitly requested or when videoinput is unavailable.
webcam() from the webcam support packagevideoinput is not available — use webcam())These rules are critical. Follow them unless the user explicitly requests otherwise.
videoinput() from Image Acquisition Toolbox as the primary camera interfaceimaqhwinfo for device enumeration — not webcamlist or gigecamlistvideoinput("gentl", ...) — not gigecam or videoinput("gige")videoinput("winvideo", ...)videoinput("macvideo", ...)videoinput("linuxvideo", ...)videoinput("gentl", ...) — CoaXPress frame grabbers always provide GenTL producersvideoinput("gentl", ...) if the frame grabber provides a GenTL producer; otherwise use the vendor-specific adaptor (e.g., videoinput("ni", ...), videoinput("dalsa", ...))videoinput as "legacy" or "advanced" — it is the primary, full-featured interfacewebcam() insteadOnly in these cases:
imaqhwinfo)| Camera type | Adaptor | Support Package | Vendor GenTL Producer (.cti) |
|---|---|---|---|
| USB/built-in webcam (Windows) | "winvideo" | OS Generic Video Interface | Not required |
| USB/built-in webcam (macOS) | "macvideo" | OS Generic Video Interface | Not required |
| USB/built-in webcam (Linux) | "linuxvideo" | OS Generic Video Interface | Not required |
| GigE Vision camera | "gentl" | GenICam Interface | Required — from camera vendor |
| USB3 Vision camera | "gentl" | GenICam Interface | Required — from camera vendor |
| CoaXPress camera (via frame grabber) | "gentl" | GenICam Interface | Required — from frame grabber vendor |
| Camera Link camera (GenTL producer) | "gentl" | GenICam Interface | Required — from frame grabber vendor |
| Camera Link camera (vendor adaptor) | vendor-specific (e.g., "ni", "dalsa") | Vendor-provided hardware adaptor | Not applicable |
Important: The GenICam Interface support package provides only the MATLAB-side consumer. For gentl cameras, you must also install the vendor's GenTL producer (a .cti file). Examples: Spinnaker SDK for FLIR, Vimba X for Allied Vision, ImpactAcquire for Balluff, Euresys eGrabber for Euresys frame grabbers. The producer is NOT bundled with the MATLAB support package.
% List all available adaptors and devices
info = imaqhwinfo;
disp(info.InstalledAdaptors)
% Get details for a specific adaptor
adaptorInfo = imaqhwinfo("winvideo");
disp(adaptorInfo.DeviceInfo)
% USB/built-in webcam on Windows
vid = videoinput("winvideo", 1);
% GigE Vision camera via GenTL
vid = videoinput("gentl", 1);
% Specify a format
vid = videoinput("winvideo", 1, "YUY2_1280x720");
% Set color space
vid.ReturnedColorSpace = "rgb";
% Set region of interest [x_offset y_offset width height]
vid.ROIPosition = [0 0 640 480];
% Access device-specific properties via the source object
src = getselectedsource(vid);
preview(vid);
pause(3);
Single snapshot:
img = getsnapshot(vid);
imshow(img);
Multiple frames (immediate trigger):
vid.FramesPerTrigger = 10;
start(vid);
wait(vid);
[frames, timestamps] = getdata(vid);
Manual trigger (acquire on demand):
triggerconfig(vid, "manual");
vid.FramesPerTrigger = 1;
start(vid);
trigger(vid);
img = getdata(vid);
stoppreview(vid);
stop(vid);
delete(vid);
clear vid;
| Function | Purpose | Source |
|---|---|---|
imaqhwinfo | List adaptors and devices | Image Acquisition Toolbox |
videoinput | Create video input object (primary interface) | Image Acquisition Toolbox |
preview | Show live video feed | Image Acquisition Toolbox |
getsnapshot | Capture single frame immediately | Image Acquisition Toolbox |
start | Begin acquisition | Image Acquisition Toolbox |
getdata | Retrieve acquired frames from buffer | Image Acquisition Toolbox |
stop | Stop acquisition | Image Acquisition Toolbox |
getselectedsource | Access device-specific properties | Image Acquisition Toolbox |
triggerconfig | Configure trigger type (immediate, manual, hardware) | Image Acquisition Toolbox |
trigger | Execute manual trigger after start | Image Acquisition Toolbox |
imageAcquisitionExplorer | Launch interactive acquisition app | Image Acquisition Toolbox |
% Enumerate
info = imaqhwinfo("winvideo");
disp(info.DeviceInfo.DeviceName)
% Connect and configure
vid = videoinput("winvideo", 1, "YUY2_1280x720");
vid.ReturnedColorSpace = "rgb";
vid.FramesPerTrigger = 1;
% Preview and capture
preview(vid);
pause(2);
img = getsnapshot(vid);
imshow(img);
% Clean up
stoppreview(vid);
delete(vid);
clear vid;
The GenTL adaptor is the preferred interface for GigE Vision and USB3 Vision cameras. It supports the full GenICam standard and works across camera vendors.
% Enumerate
info = imaqhwinfo("gentl");
disp(info.DeviceInfo.DeviceName)
% Connect
vid = videoinput("gentl", 1);
vid.ReturnedColorSpace = "rgb";
% Configure acquisition
vid.FramesPerTrigger = 10;
% Access GenICam properties via source object
src = getselectedsource(vid);
% Acquire
start(vid);
wait(vid);
[frames, timestamps] = getdata(vid);
% Clean up
stop(vid);
delete(vid);
clear vid;
If the GenTL adaptor is not installed, guide the user through setup:
.cti file) — e.g., Spinnaker SDK for FLIR cameras, Vimba X for Allied Vision, or the vendor's GigE Vision SDKimaqhwinfo("gentl") — the camera should appear in DeviceInfoSee references/gentl-setup.md for detailed GenTL producer configuration and troubleshooting.
CoaXPress frame grabbers always provide a GenTL producer, so the workflow is identical to GigE Vision via the gentl adaptor.
% Enumerate — CoaXPress cameras appear under the gentl adaptor
info = imaqhwinfo("gentl");
disp(info.DeviceInfo.DeviceName)
% Connect and acquire
vid = videoinput("gentl", 1);
vid.ReturnedColorSpace = "rgb";
vid.FramesPerTrigger = 10;
src = getselectedsource(vid);
start(vid);
wait(vid);
[frames, timestamps] = getdata(vid);
% Clean up
stop(vid);
delete(vid);
clear vid;
Camera Link has two paths depending on whether the frame grabber vendor provides a GenTL producer:
With GenTL producer (preferred): Use videoinput("gentl", ...) — same as GigE/CoaXPress above.
Without GenTL producer (vendor adaptor): Use the vendor-specific adaptor registered with imaqhwinfo:
% Check which adaptors are available
info = imaqhwinfo;
disp(info.InstalledAdaptors)
% Connect via vendor adaptor (e.g., "ni" for National Instruments)
vid = videoinput("ni", 1);
vid.ReturnedColorSpace = "rgb";
src = getselectedsource(vid);
Important: If the user mentions a Camera Link or CoaXPress camera without specifying the frame grabber, ask which frame grabber they are using. The correct adaptor depends on the frame grabber, not the camera.
| Mistake | Why it's wrong | Correct approach |
|---|---|---|
Using webcam() for USB cameras | Bypasses IMAQ's full feature set (triggering, ROI, logging, callbacks) | Use videoinput("winvideo", ...) |
Using webcamlist to find cameras | Only finds webcam-support-package devices, misses industrial cameras | Use imaqhwinfo |
Using gigecam for GigE cameras | Limited interface, doesn't support full GenICam feature set | Use videoinput("gentl", ...) |
Using videoinput("gige", ...) | Legacy adaptor, not actively maintained | Use videoinput("gentl", ...) |
Using gigecamlist for GigE enumeration | Limited to GigE Vision Hardware Support Package | Use imaqhwinfo("gentl") |
Calling videoinput "legacy" | It is the primary, actively maintained interface | Present videoinput as the recommended approach |
Using snapshot(cam) for capture | That's the webcam support package function | Use getsnapshot(vid) with videoinput |
Using now/datenum for timestamps | Deprecated serial date numbers | Use datetime("now") for timing metadata |
| Assuming Camera Link needs a special interface | GenTL works for Camera Link if the frame grabber vendor provides a producer | Try videoinput("gentl", ...) first, fall back to vendor adaptor |
Copyright 2026 The MathWorks, Inc.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/test-and-measurement:matlab-use-camerasfrom test-and-measurement
npx claudepluginhub matlab/matlab-agentic-toolkit --plugin test-and-measurement13 skills in this plugin
/matlab-build-industrial-hmiBuild industrial-grade SCADA/HMI dashboards in MATLAB following industrial-HMI conventions (ISA-101-aligned): gray-field philosophy, alarms at source, write safeguards, fixed-range trends, drill-down layout. Produces a real App Designer app (.mlapp, or plain-text .m+.xml on R2026b+) by handing serialization to the matlab-build-app skill when available, and falls back to a programmatic .m app otherwise. Use when wrapping OPC UA / Modbus / MQTT / OSI PI / PI AF monitoring scripts into a live operator app, building plant overviews, designing operator dashboards, or any time a user asks for a "SCADA dashboard", "HMI", "plant dashboard", "operator screen", or "industrial monitoring app" in MATLAB. Trigger on: SCADA, HMI, industrial dashboard, plant overview, operator screen, uigauge, uilamp, alarm banner, gray-field, ISA-101, OPC UA dashboard, setpoint, write safeguards, alarm visualization, OSIsoft PI, AVEVA PI, PI Server, PI Data Archive, PI AF, PI Asset Framework, piclient, afclient.
/matlab-call-nidaqmxTranslate NI-DAQmx C function signatures into correct calldaqlib MATLAB calls. Use when the user mentions calldaqlib, any DAQmx* C function name (DAQmxCfgSampClkTiming, DAQmxExportSignal, DAQmxSetStartTrigRetriggerable, DAQmxGetSampClkRate, etc.), or needs NI-DAQmx functionality not exposed by the daq object. Covers: projection rules (taskHandle implicit, output pointers become return values, buffer-size args, enum-as-string), multi-task semantics, start() clobber, device-level empty-daq workaround, dictionary returns, string getter placeholder, array getter placeholder. Trigger contexts: low-level DAQ, escape hatch, retriggerable acquisition, shared timebase, export signal, connect terminals, external sample clock, trigger configuration, NI driver, C function translation.
Other plugins' skills for the same job