Builds machine vision inspection systems with MATLAB Visual Inspection Toolbox. Covers anomaly detection, object detection, counting, gauging, blob analysis, shape matching, synthetic data generation, and deployment to C/C++, TensorRT, ONNX, and Beckhoff PLCs.
Ships in image-processing-and-computer-vision. 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.
Build machine vision inspection systems using Visual Inspection Toolbox. Select the right approach — rule-based, AI-based, or hybrid — based on problem characteristics, then implement, train, and deploy.
Defect detection and classification
Measurement and gauging
Counting and localization
Training data augmentation
Deployment
matchshape to fixture (locate + normalize pose), then AI on the cropped/warped region. Anomaly detectors are NOT rotation/scale invariantmatchshape + imwarp to canonical orientation before training and inferencestudentTeacherAnomalyDetector; <100 images: patchCoreAnomalyDetector; have anomaly labels: fcddAnomalyDetectorclassify for inference — returns [tf, score, map] for anomaly map visualizationAutoResize=false for full-resolution inference — prevents downscaling that loses small defects. Pair with tiled training when objects are small relative to imageobjectInsertionDatastore is proven for detection tasksmatchshape locates part → transform measurement positions to detected pose → measure at repositioned locationsimageToWorldPlane — converts pixel measurements to physical units using camera calibrationimages.geotrans.Warper for production rectification — precompute the mapping once, apply per frame for maximum throughputpersistent + isempty guard in codegen entry points — load model once, infer many timescoder.loadDeepLearningNetwork for DL models — not coder.load (which is for structs/shape models)coder.Constant for MAT file path — codegen requires compile-time constant pathsexportONNXNetwork — never extract .Network or .Backbone first. The object-level export includes pre/post-processing logicMachine vision inspections compose tools in sequence:
matchshape)| Pattern | Rule-Based Part | AI Part |
|---|---|---|
| Fixture + classify | matchshape locates part, crops ROI | Anomaly detector on cropped region |
| Fixture + detect | matchshape locates part | YOLOX finds defects relative to fixture |
| Pose normalize + anomaly | matchshape + imwarp to canonical pose | Anomaly detector on normalized image |
| Segment + measure | Thresholding / morphology | regionprops on segmented blobs |
| Choose Rule-Based When | Choose AI-Based When |
|---|---|
| Defects have predictable, enumerable geometry | Defect appearance varies unpredictably |
| Lighting and positioning are tightly controlled | Background or part appearance varies |
| Need dimensional measurements (mm, degrees) | Need classification without precise measurement |
| Few or no labeled examples available | Have labeled training data (or can generate synthetic) |
| Require explainable, auditable decisions | Accuracy matters more than explainability |
| Function | Purpose | Toolbox | Available From |
|---|---|---|---|
shapemodel | Build edge-geometry model from template | Visual Inspection Toolbox | R2026b |
matchshape | Find model instances in search image | Visual Inspection Toolbox | R2026b |
caliper | Measure edge distances along a profile | Visual Inspection Toolbox | R2026b |
fitangle | Measure angle between edges | Visual Inspection Toolbox | R2026b |
fitcircle | Measure circle center and radius | Visual Inspection Toolbox | R2026b |
studentTeacherAnomalyDetector | One-class anomaly detection (>100 good images) | Visual Inspection Toolbox | R2026b |
patchCoreAnomalyDetector | One-class anomaly detection (few-shot, <100 images) | Visual Inspection Toolbox | R2026b |
fastFlowAnomalyDetector | Normalizing-flow anomaly detection | Visual Inspection Toolbox | R2026b |
fcddAnomalyDetector | Semi-supervised anomaly detection | Visual Inspection Toolbox | R2026b |
yoloxObjectDetector | Object/defect detection with bounding boxes | Visual Inspection Toolbox | R2026b |
counTRObjectCounter | Counting with intra-class variation (few-shot) | Visual Inspection Toolbox | R2026b |
objectInsertionDatastore | Synthetic labeled training data (copy-paste) | Visual Inspection Toolbox | R2026b |
regionprops | Blob area, perimeter, shape features | Image Processing Toolbox | R2006a |
imageToWorldPlane | Calibrated world-unit measurement | Computer Vision Toolbox | R2022b |
| Situation | Approach |
|---|---|
| Defect appearance unpredictable; good-part images only | Anomaly detection |
| Classify defect types with bounding boxes; have labeled data | YOLOX object detection |
| Defects are geometric deviations from known shape | Shape matching + gauging |
| Dimensional out-of-tolerance (too wide, too narrow) | Caliper / fitcircle / fitangle |
| Situation | Approach |
|---|---|
| Widths, gaps, edge-to-edge distances | caliper |
| Angles between edges | fitangle |
| Hole diameters, arc radii | fitcircle |
| Area, perimeter, shape of segmented blobs | regionprops |
| Need measurements in mm (physical units) | Camera calibration + rectification |
| Part position varies image-to-image | Vision fixturing with matchshape |
| Situation | Approach |
|---|---|
| Identical rigid parts, controlled background | shapemodel / matchshape |
| Intra-class variation, few labeled examples | CounTR (few-shot counting) |
| Multiple classes, complex scenes, have labels | YOLOX detection → count |
| Situation | Approach |
|---|---|
| Rigid part, known edge geometry | shapemodel / matchshape |
| Variable appearance, multiple classes | YOLOX detection |
| Situation | Approach |
|---|---|
| Have segmented defect examples + clean images | Copy-paste synthetic data |
| Good-part images only (no defect labels) | Anomaly detection (one-class) |
| No data at all, defects are geometric | Rule-based (no training needed) |
| Target | Path |
|---|---|
| Standalone app, full MATLAB features | MATLAB Compiler |
| Monitoring dashboard or UI app | MATLAB Compiler |
| Embedded CPU (x86, ARM) | MATLAB Coder |
| NVIDIA Jetson/Orin or dGPU | GPU Coder + TensorRT |
| NPU or AI accelerator | ONNX export |
| Smart camera with vendor SDK | ONNX export |
| Beckhoff industrial PLC | MATLAB Coder → TwinCAT |
Each reference file contains executable code patterns, API calling conventions, and worked examples for its topic. Load the relevant reference before writing code.
persistent + isempty for model loading in codegen entry pointsexportONNXNetwork (never extract .Network)coder.load for deep learning models (use coder.loadDeepLearningNetwork)shapemodel/matchshape over YOLOX for locating rigid partsimages.geotrans.Warper for production rectification throughput| Load when... | Reference |
|---|---|
| Training or using anomaly detectors | references/detect-anomaly.md |
| Locating parts by shape, vision fixturing | references/match-shape.md |
| Training or using YOLOX object detectors | references/detect-objects.md |
| Counting objects (shape matching, CounTR, YOLOX) | references/count-objects.md |
| Measuring with caliper, fitcircle, fitangle | references/measure-gauging.md |
| Blob analysis, regionprops, calibrated measurement | references/blob-analysis.md |
| Deploying models (Compiler, Coder, TensorRT, ONNX) | references/deploy-inspection.md |
| Generating synthetic training data | references/synthetic-data.md |
Copyright 2026 The MathWorks, Inc.
manifest.yaml (opens in a new tab)references/blob-analysis.md (opens in a new tab)references/count-objects.md (opens in a new tab)references/deploy-inspection.md (opens in a new tab)references/detect-anomaly.md (opens in a new tab)references/detect-objects.md (opens in a new tab)references/match-shape.md (opens in a new tab)references/measure-gauging.md (opens in a new tab)references/synthetic-data.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
10 skills in this plugin
/matlab-analyze-spectral-imagesWork with hyperspectral and multispectral images in MATLAB. Covers reading/writing (ENVI, NITF, TIFF, Sentinel-2, Landsat, ASTER), ECOSTRESS spectral libraries, processing (calibration, atmospheric correction, denoising, sharpening, dimensionality reduction, endmember extraction, unmixing, target/anomaly detection, spectral indices, segmentation), labeling (Spectral Image Labeler app, ground truth objects, automation algorithms), and deep learning (pixel classification CNNs, unmixing autoencoders, transfer learning). Use when reading, writing, processing, analyzing, classifying, labeling, or applying deep learning to hyperspectral or multispectral images./matlab-display-imageDisplay images and annotations for image processing, computer vision, and visual inspection. Use when displaying images with imageshow, creating image viewers with viewer2d, adding Regions of Interest (ROI) or annotations, overlaying masks or segmentations, streaming video frames, or building apps with image display./matlab-display-volumeDisplay 3-D image volumes, medical image volumes, surface meshes, and annotations for 3-D image processing. Use when displaying 3-D images or isosurfaces with volshow, creating volume viewers with viewer3d, adding Regions of Interest (ROI) or annotations, overlaying masks or segmentations, streaming volumetric data, or building apps with volume display./matlab-integrate-pytorch-visionCreates MATLAB interfaces to Python image processing and computer vision models from GitHub repositories or pip-installable packages using MPyReq. Use when asked to interface MATLAB with a Python CV/image model (segmentation, depth estimation, object detection, image generation, super-resolution, etc.), given a GitHub repo URL for an image/vision model, or asked to create an MPyReq demo for a deep-learning vision pipeline. Do NOT use for general-purpose Python-MATLAB interfacing, non-vision models (NLP, tabular, audio), model deployment/serving, or MATLAB-only image processing workflows./matlab-model-opticsBuild, import, analyze, tolerate, and optimize optical systems using the Optical Design and Simulation Library. Use when the user asks about optical systems, ray tracing, geometric optics, Zemax import, optical coatings, tolerancing, or optical design optimization.
/matlab-process-imagesLoad this first for any MATLAB task involving images, photos, scans, frames, volumes, or visual data — reading, writing, filtering, enhancing, denoising, sharpening, deblurring, thresholding, segmenting, masking, detecting, counting objects, removing backgrounds, measuring, registering, stitching, aligning, cropping, resizing, or transforming. Covers image I/O (TIFF, PNG, JPEG, RAW, HDR), histograms, edge detection, color, morphology, deep learning for images, quality assessment, and 3-D volumes. Also for image problems (dark, noisy, blurry, low contrast, uneven lighting, hazy, color cast) or data exploration (folder of images). Includes medical imaging I/O (DICOM, NIfTI, NRRD, medicalVolume) and large/blocked images (blockedImage, whole-slide). Skip if the user just wants you to look at an image, with no MATLAB work. Not for Simulink video-block models, C/C++/CUDA code generation or GPU deployment of a network, or point clouds. Hyperspectral and visual inspection have sibling skills.
/image-processing-and-computer-vision:matlab-use-visual-inspectionfrom image-processing-and-computer-vision
npx claudepluginhub matlab/matlab-agentic-toolkit --plugin image-processing-and-computer-visionOther plugins' skills for the same job