Loading [MathJax]/extensions/tex2jax.js

You are here: Start » Tutorial Exercises » Bottle Inspector Part 3: Foam Detection (bottles_3_foam)

Bottle Inspector Part 3: Foam Detection (bottles_3_foam)

Aim

  • Extend the "Bottle Inspector Part 2" program with verification if there is no foam above the liquid level.
  • Design a simple HMI that will present all the inspection results in the end-user's graphical interface.

Input

  • A set of images of bottles.
  • An array of liquid level points from the previous exercise.

Images are stored in bottles directory.

Output

Application with an HMI which performs several inspections:

  • checking of the number of bottles,
  • validation of the liquid levels,
  • detection of foam above the liquid levels.

The results should be presented in HMI, visualized with green or red primitives.

Hints

The foam is much darker than the normal interior of a bottle above the liquid level.

In the first step, use a CreateRectangle filter to create a ROI based on previously calculated liquid level points.

Measure average intensity within the ROI with CheckPresence_Intensity.

Create a simple HMI form:

  • Show the result of a single inspection (Bool type) in PassFailIndicator control.
  • Present an array of Bool values with BoolIndicatorBoard control.
  • Present an image with the VideoBox control.
  • Use Label controls to improve visual appearance of the HMI.

Solution (FIS)

►Click here to show the solution.