Detect fractures in soil.
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.
The image of fractures in soil is read.
1. a = mmreadgray('soil.tif'); 2. mmshow(a);
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);
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);
Overlay of the fracture lines over the original image.