Demo iadsoil

namespace:morph
page:iadsoil

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.

Script

Reading

The image of fractures in soil is read.

1. a = mmreadgray('soil.tif');
2. mmshow(a);

Fractures enhancement

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

1. from ia870 import iacloseth
2. from ia870 import iasebox
3. 
4. 
5. b = iacloseth(a,iasebox(2));
6. mmshow(b);

Gray-scale area open

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

1. from ia870 import iaareaopen
2. 
3. 
4. c = iaareaopen(b,80,iasebox());
5. mmshow(c);

Thresholding

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

1. from ia870 import iathreshad
2. 
3. 
4. d = iathreshad(c,15);
5. mmshow(d);

Final display

Overlay of the fracture lines over the original image.

1. mmshow(a,d);