Loading [MathJax]/extensions/tex2jax.js

You are here: Start » Tutorial Exercises » Conditions in Formulas (conjunction)

Conditions in Formulas (conjunction)

Aim

Create an algorithm that checks if the input image contains a certain set of objects.

Inspection should pass in three cases:

  • There is a mount and two bolts in the image or
  • there is a mount and a single washer or
  • there is a mount and a single washer and two bolts.

Input

The set of images with different objects.

Images are stored in conjunction directory.

Output

Result of inspection drawn on the input image.

Hints

Use Edge-based Template Matching to find particular types of objects.

Use formulas to analyze the results of Template Matching.

Solution (FIS)

►Click here to show the solution.

Additional Tasks

  • Create the equivalent of the formula using blocks.

  • Make the condition more strict to pass only if two bolts are present and a washer is not present. Or, if a washer is present and no bolts are present. Tip: it is enough to change a single operator to provide this functionality.