Shape Matching
R2026bSince R2026b
Detect and localize objects in images using edge-based shape matching. Create shape models from template images, then search inspection images for object instances that match those models. Shape matching provides these capabilities:
2-D pose estimation — Estimate the translation, rotation, and scale of each detected object instance.
Subpixel precision — Localize detected object instances with subpixel accuracy for measurement and alignment.
One-shot detection — Detect objects from a single visual example without additional training data.
Multi-class search — Search for multiple template classes in the same image.
Lighting invariance — Match based on edge orientation features rather than pixel intensity, robust to illumination changes.
Use shape matching when you need precise pose estimation from a single template image without large annotated data sets, such as detecting rigid objects with well-defined edges. Match results provide object locations with subpixel accuracy that you can use to position measurement tools for calibrated dimensional inspection.
Functions
Topics
- Select Detection Approach for Visual Inspection
Choose among anomaly detection, shape matching, object detection, and object counting for your visual inspection application.

