[mmdRuler] [Up] Demonstrations

mmdSoil
Detect fractures in soil.

Description

The input-image is a gray-scale image of soil that has some thin fractures. These fractures are detected by the application of the top-hat and area open operators.

Illustrated Source Code

Reading

The image of fractures in soil is read.

Image a = mmReadgray("soil.tif");
mmShow(a);

a

Fractures enhancement

The fracture lines are enhanced by the close top-hat operator.

Image b = mmCloseth(a,mmSebox(2));
mmShow(b);

b

Gray-scale area open

Small connected bright regions are removed by the gray-scale area open operator. Note the connectivity used (mmSebox : 8-connected).

Image c = mmAreaopen(b,80,mmSebox());
mmShow(c);

c

Thresholding

The fracture lines are detected. This threshold is very robust.

Image d = mmThreshad(c,15);
mmShow(d);

d

Final display

Overlay of the fracture lines over the original image.

mmShow(a,d);

a,d

[mmdRuler] [Up]