You are here: Start » Tutorial Exercises » Bottle Inspector Part 1: Counting Bottles (bottles_1_counting)
Bottle Inspector Part 1: Counting Bottles (bottles_1_counting)
Aim
Prepare a program that returns the number of bottles found in the provided images.
Input
A set of images with bottles. The bottle count may vary but the maximal number of bottles is 4.
Images are stored in
bottles
directory.
Output
An image with the bottle count printed on it.
Hints
The bottle tops can be viewed as darker regions on the brighter background. The profile below shows the transitions of brightness values along a selected scan path. We want to detect the objects that start with a bright-to-dark transition and end with an opposite one.
The ScanMultipleStripes filter can be used for this purpose.
Solution (FIS)
►Click here to show the solution.
Further Readings
- 1D Edge Detection - The article explaining how edge detection filters work.