Learn R Programming

pfocal (version 1.0.0)

kernel_flip_horizontal: 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

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab