Tuning the Detection

The defaults find something in most images. This page is how to make them find the right thing.

The settings that matter

Only three, which is much of the appeal:

method-specific/fixed/level

The brightness a pixel must exceed to count as part of a region. Commission it with Analysing a Scene rather than by guessing - it suggests a level and shows you the histogram the level has to sit in.

detect-dark

Turn on when the parts are darker than the background.

fill-holes

Turn on to measure a region as the shape its outline encloses. A washer measures as a ring with this off and as a disc with it on, and both are true answers.

There is no area window here. Every region is reported, and dropping the ones too small or too large to be a part is done where the result is read - only there is it known what a part is.

Preprocessing

Try preprocess/method when regions have soft or noisy edges. LOG and DOG both emphasise features of a particular size - set the sigmas to roughly the size of what you are looking for - and DOH responds to blob-like structure. All three normalise their output, so the intensity thresholds above may need revisiting after enabling one.

When no level works

If the reading will not settle, check system/analyse-scene/output/area-sensitivity before touching the settings. Above 0.05 the picture is brittle — one grey level costs 5 % of the measured area — and no value in input/ repairs that. It is fixed at the camera: sharper edges, more contrast, or more pixels on the part. See Analysing a Scene for which of the three it is.

Speed

In order of effect:

  1. Restrict the area with input/crop.

  2. Raise the level so sensor noise and dust stop crossing the threshold at all. That is cheaper than reporting those regions and discarding them afterwards.