Find Object
This function block helps you locate a smaller template image inside a larger image using selectable matching methods and an adjustable sensitivity slider. It provides visual feedback and detailed location outputs to help with inspection, counting, and further processing.
π₯ Inputs
This block accepts the following input sockets:
Main ImageAccepts the image where the object search will be performed.Object ImageAccepts the template image (single or list) of the object to find.
π€ Outputs
This block provides the following output sockets:
Image AnyVisual result where detected matches can be highlighted.Object PositionsCoordinates of detected object centers (multiple).Object CountNumber of detected objects.Rectangle CoordinatesBounding rectangles for each detected object (multiple).
πΉοΈ Controls
MethodChoose the template matching algorithm to use from a list of available methods.Match Threshold %Adjust the slider to control how strict the matching should be. Higher values reduce false positives but may miss faint matches.ResultDisplays the detected object count for quick feedback.
π― Key Features
Visual overlay of detections on the input image for fast verification.
Multiple output sockets that provide both visual and numeric detection results for downstream processing.
Works with a single template or a list of templates to find the best available match.
π How to Use
Provide a source image into the
Main Imageinput.Provide a template or list of templates into the
Object Imageinput.Select a
Methodthat fits your scene and template characteristics.Tune the
Match Threshold %slider until detection precision is acceptable.Inspect results using the visual output and numerical sockets.
βοΈ What Happens When It Runs
When executed, the block searches the provided Main Image for regions that match the provided Object Image based on the selected method and threshold. It returns a visualization, the center positions of detections, their count, and bounding rectangles.
π‘ Tips and Tricks
To reduce false matches from noisy images, run the image through
BlurorDenoisingbefore this block.If templates and main image sizes differ, use
Image Resizeto standardize sizes for more reliable matching.To focus search only on a specific area, crop the image first using
Image ROI Selectand feed the cropped image into this block.After detection, use
Rectangles in Rectangleto filter out detections outside a region of interest.Visualize and inspect detections with the
Show Imageblock to confirm results interactively.Save interesting frames or failures using
Image LoggerorImage Writefor audit and tuning.For complex scenes or many object classes consider pairing with
Object DetectionorObject Detection - Customblocks when template matching becomes unreliable.
π οΈ Troubleshooting
If no objects are found, try lowering the
Match Threshold %or improving template contrast with preprocessing likeContrast OptimizationorAdjust Colors.If many false positives appear, increase the
Match Threshold %and consider filtering the image withHSV FilterorImage Thresholdto emphasize the object.If results vary across images, ensure templates are consistent with expected appearance (scale, rotation, illumination) or use multiple templates via the
Object Imageinput list.
Last updated
Was this helpful?