Find edges of image, identify which get.edges.from are on the edge and which are

find_edge_cells(
  get.edges.from,
  find.edge.cells = NULL,
  edge.buffer.width = 2,
  rotated = NULL
)

Arguments

get.edges.from

sf object. This object will be used to define the edges.

find.edge.cells

sfobject. This is the object that will be evaluated. Defaults to get.edges.from (i.e. finds which cells of get.edges.from lie on the edge of get.edges.from )

edge.buffer.width

Numeric. The width (in pixels) that defines the edge. Defaults to 2.

rotated

Numeric. The angle (in degrees) that the image has been rotated. Defaults to NULL.

Value

A list with two components.

edge

Numeric. Vector containing the indices of all edge get.edges.from.

lose

Numeric. Vector containing the indices of all get.edges.from on the bottom or right-hand edge.

Details

The get.edges.from parameter can be the output from image_to_poly().