After the threshold operation is completed several functions may be applied to the image to improve the edge definition. The basic functions of erosion and dilation improve edge definition by performing opposite tasks of removing or adding dark pixels at the particle edge. Advanced functions using combinations of erosion and dilation steps such as delineation and convex hull improve the edge definition of particles, leading to accurate area and perimeter determinations that are critical for shape factor calculations. Other software functions perform the task ofseparating touching particles including the crossed fibers in order to quantify fiber length distributions and aspect ratios.