morpho {RGeoS}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, niter = 1, 
radix = NA, modify.target = TRUE)

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

  • dist : Calculate the distance to the pore edge

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

niter

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

radix

Radix of the name given to the variable storing the result in the Db.

modify.target

When TRUE, the result is set as new target variable in the Db.

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 RGeoS version 9.1.1 Index]