# 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.

## Demo Script

### Reading

The image of fractures in soil is read.

    >>> a = mmreadgray('soil.tif');

    >>> mmshow(a);

a |

### Fractures enhancement

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

    >>> 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).

    >>> c= mmareaopen(b,80,mmsebox());

    >>> mmshow(c);

c |

### Thresholding

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

    >>> d = mmthreshad(c,15);

    Warning: Converting input image from int32 to uint8.

    >>> mmshow(d);

d |

### Final display

Overlay of the fracture lines over the original image.

    >>> mmshow(a,d);

a,d |

[`mmdruler`] [Up] |
Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center.