Loading [MathJax]/extensions/tex2jax.js

You are here: Start » Tutorial Exercises » Count Nails (nails)

Count Nails (nails)

Aim

Devise an algorithm that counts the nails present among various objects in an image.

Input

A single image with different objects present.

The input image is stored in the nails directory.

Output

An Integer value with number of found nails.

Expected value: 5

Hints

The backlight source makes objects very contrastive. Objects can be separated from the background very easily using basic ThresholdToRegion filter.

Objects are physically separated and that makes it possible to split them into separate blobs using SplitRegionIntoBlobs filter.

Regions can be classified using ready-to-use ClassifyRegions tool which can be found in Toolbox, Region Analysis, Region Logic group.

FabImage Studio also provides separate filters that can be used to classify blobs which can be found in Toolbox, Region Analysis, Region Feature group.

These filter can be very useful to preform classification using different regions' features.

Solution (FIS)

►Click here to show the solution.