Learn R Programming

rayimage (version 0.2.3)

render_reorient: Reorient Image

Description

Reorients an image or matrix. Transformations are applied in this order: x, y, and transpose.

Usage

render_reorient(
  image,
  flipx = FALSE,
  flipy = FALSE,
  transpose = FALSE,
  filename = NULL,
  preview = FALSE
)

Arguments

image

Image filename, 3-layer RGB array, or matrix.

flipx

Default FALSE. Flip horizontally

flipy

Default FALSE. Flip vertically.

transpose

Default FALSE. Transpose image.

filename

Default NULL. The filename of the image to be saved. If this is not given, the image will be plotted instead.

preview

Default FALSE. Whether to plot the convolved image, or just to return the values.

Value

3-layer RGB reoriented array or matrix.

Examples

Run this code
# NOT RUN {
#Original orientation
# }
# NOT RUN {
plot_image(dragon)
# }
# NOT RUN {
#Flip the dragon image horizontally
# }
# NOT RUN {
dragon %>%
 render_reorient(flipx = TRUE) %>%
 plot_image()
# }
# NOT RUN {
#Flip the dragon image vertically
# }
# NOT RUN {
dragon %>%
 render_reorient(flipy = TRUE) %>%
 plot_image()
# }
# NOT RUN {
#'#Transpose the dragon image
# }
# NOT RUN {
dragon %>%
 render_reorient(transpose = TRUE) %>%
 plot_image()
# }

Run the code above in your browser using DataLab