Find Object

This function block is designed to detect objects within a main image using a specified template (sub-image). It provides options to select different matching methods and adjust the sensitivity for detecting the object.

📥 Inputs

Main Image The primary image in which you want to search for the object.

Object Image The template image of the object that you wish to detect within the main image.

📤 Outputs

Image Any The output shows the altered main image with detected object(s) highlighted.

Object Positions This output provides the coordinates of detected objects in the main image, allowing for multiple detection points.

Object Count This output returns the total number of detected instances of the object in the main image.

Rectangle Coordinates This output includes the coordinates of the bounding rectangles around detected objects.

🕹️ Controls

Method A dropdown menu that allows you to select the object detection method type from various template matching methods such as TM_CCOEFF_NORMED or TM_SQDIFF.

Match Threshold % A slider to adjust the sensitivity of the match. This value affects how strict the detection will be.

Result A label displaying the current count of detected objects in the main image.

🎨 Features

Multiple Detection Methods Users can choose from various methods to tailor the detection process for different scenarios.

Dynamic Sensitivity Adjustment The threshold slider allows users to easily adjust how sensitive the matching process is.

Detailed Output Outputs include not only the modified image but also the locations, count, and bounding boxes of detected objects.

📝 Usage Instructions

  1. Input Images: Connect the main image to Main Image input and the template image to Object Image input.

  2. Select Method: Choose the desired matching method from the Method dropdown.

  3. Set Threshold: Adjust the Match Threshold % slider to determine how sensitive the match detection will be.

  4. Evaluate: Run the block to perform the object detection. The count and positions of detected objects will be shown in the output label.

📊 Evaluation

When executed, this function block analyzes the main image for instances of the object defined by the template, returning results that include the modified image, object positions, total count, and rectangle coordinates.

💡 Tips and Tricks

Test Different Methods

Experiment with different matching methods available in the dropdown menu. Some templates may yield better results with certain methods based on their complexity or orientation.

Adjusting the Threshold

For preliminary tests, start with a low threshold value (e.g., 0-5) to ensure you capture all potential matches, then gradually increase for refinement.

Using Preprocessing

Consider using Histogram Equalization or Blur function blocks before this one to enhance the image quality, which might improve detection accuracy.

Analyzing Multiple Objects

If you expect to find multiple objects, ensure your template and main image are oriented similarly. You may also apply Image Threshold to improve results.

🛠️ Troubleshooting

No Objects Found

If no objects are detected, check that the object image is clear and accurately represents the target in the main image. Adjust the threshold to see if more matches can be found.

Maximum Matches Reached

If you get an error regarding the maximum number of matches, try increasing the threshold value in the Match Threshold % slider to reduce the number of detected instances.

Last updated