Loading [MathJax]/extensions/tex2jax.js

You are here: Start » Program Examples » Cap (Easy)

Cap (Easy)

Aim

The task of this example is to check whether a seal (plastic ring under the cap) is correctly placed.

Input

An image of the top of a bottle. The position of the bottle is variable.

Output

The result of the inspection printed on the image. If a defect is detected, a rectangle is drawn around it.

Hints

This is an easier variant of the same example "Caps". If you are on a more advanced level in programming in FabImage Studio, please refer to that example. If you are new to FabImage Studio, then carry on here.

The first step to perform required inspection is the detection of the position of an object in an image. As the bottle moves particularly along the X axis and the background is consistent, the best way would be applying the 1D Edge Detection technique and creating a local coordinate system based on a detected edge.

Labeling connections is explained in this article.

Solution (FIS)

►Click here to show the solution.

Used Filters

►Click here to show the filters list.

Further Readings