morpho {RGeostats}R Documentation

Morphological operations

Description

Perform morphological operations on a variable defined on a Grid

Usage

morpho(dbin, vmin = NA, vmax = NA, 
       oper = "thresh", option = 0, radius = 1, extend=1, niter = 1, ccvoid=NA, 
       flag.dist=1, radix = NA, modify.target = db.locmod())

Arguments

dbin

The db-class structure containing the variable to be processed

vmin

Minimum (inclusive) threshold for the grain definition

vmax

Maximum (exclusive) threshold for the grain definition

oper

Name of the morphological operation:

  • thresh : Convert the input variable into the binary image

  • erode : Perform an erosion on the binary image

  • dilate : Perform a dilation on the binary image

  • open : Perform an opening (erosion then dilation) on the binary image

  • close : Perform a closing (dilation then erosion) on the binary image

  • cc : Calculate the connected components (cells are assigned the rank of the corresponding component)

  • ccsize : Calculate the connected components (cells are assigned the volume of the corresponding component)

  • dist : Calculate the distance to the pore edge

  • angle : Calculate the angle of the tangent to isovalues of a coloured image

option

Type of structuring element or connectivity:

  • 0 : Cross (6-connectivity in 3-D)

  • 1 : Block (26-connectivity in 3-D)

radius

Radius of the structuring element in 3-D. Only used for 'erode', 'dilate', 'open', 'close' and 'dist' operations

extend

Dimension of the isotropic neighborhood extension (counted in number if pixels) used with the option "angle"

niter

Number of times the morphological operation is iterated. This argument is not used for the 'thresh', 'cc' and 'dist' operations

ccvoid

Value assigned to pixels which do not belong to any connected component.

flag.dist

The distance is calculated by inflating the grain (if flag-dist=1) or by shrinking it (flag.dist=0)

radix

Radix of the name given to the variable storing the result in the Db. If not specified, the radix will be set to the name of the operation.

modify.target

Decides whether or not the newly created variables will have their locator defined or not. For more information, see db.locmod.

Value

The Db where the following variable has been added:

- the output image (converted into double) for 'thresh', 'erode', 'dilate', 'open', 'close' and 'dist' operations

- the output variable where each pixel is set to FFFF (for pore) or for the rank of the connected component (sorted by decreasing size)


[Package RGeostats version 11.1.1 Index]