Classical Machine Learning
Remove the tray's isolated speck
The changed foreground is a thin real candidate
The tray mask contains a broad seed region and a speck. Botie's opening can remove small structures, including some that might be real.
BOTIE
The inputs we are comparing
Threshold mask
Broad seed and speck
| 1 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 |
| 0 | 1 | 1 | 1 | 0 |
| 0 | 1 | 1 | 1 | 0 |
| 0 | 0 | 0 | 0 | 0 |
A thin region disappears
| 0 | 0 | 0 |
| 1 | 1 | 1 |
| 0 | 0 | 0 |
Symmetric footprint
Same in both cases
| 1 | 1 | 1 |
| 1 | 1 | 1 |
| 1 | 1 | 1 |
Result for broad seed and speck
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 |
| 0 | 1 | 1 | 1 | 0 |
| 0 | 1 | 1 | 1 | 0 |
| 0 | 0 | 0 | 0 | 0 |
A cross-shaped seed and an isolated speck
This check uses the pieces from “Open the mask with the same footprint twice”.
BOTIE
- Threshold mask
1 0 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0 - Symmetric footprint
0 1 0 1 1 1 0 1 0
Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.
Build a construction in the workspace above first. This case will test those pieces.
Why can dilation restore the broad square after erosion but fail to restore the thin line, and what should guide footprint selection?
Judge a mask-cleaning operation by which real structures it must preserve as well as which artefacts it should remove.
Both operations use zero outside the image and centrally symmetric odd-sized footprints. Opening can remove real thin objects too.
Work through the Python challenges →