kernel_flip: Flip a kernel

kernel_flip_horizontalR Documentation

Flip a kernel

Description

Flip the kernel vertically, horizontally, or both.

Usage

kernel_flip_horizontal(k)

kernel_flip_vertical(k)

kernel_flip_both(k)

Arguments

k

[matrix] The kernel.

Value

The flipped kernel, a matrix.

Examples


kernel <- matrix(c(
  1, 2, 3,
  0, 1, 0,
  2, 3, 4
), nrow = 3, ncol = 3)
kernel_flip_horizontal(kernel)
kernel_flip_vertical(kernel)
kernel_flip_both(kernel)

LandSciTech/pfocal documentation built on Aug. 27, 2022, 8:55 a.m.