Learn R Programming

colorizer (version 0.1.0)

juxtapose: Compare Images

Description

juxtapose compares the original image with the colorized version obtained with colorize.

Usage

juxtapose(
  response,
  type = c("side-by-side", "stacked", "c-focus", "h-focus", "v-focus", "h-split",
    "v-split", "d-split", "u-animate", "s-animate"),
  pane = c("plot", "view", "none")
)

Arguments

response

a response object of a colorize function call.

type

defines the type of juxtaposition:

  • side-by-side original image left, colorized right.

  • stacked original above colorized.

  • c-focus colorized center with original image border.

  • h-focus above and below strips of original image.

  • v-focus left and right strips of original image.

  • h-split horizontally halved.

  • v-split vertically halved.

  • d-split diagonally halved.

  • u-animate animated, colorized to the top (upwards).

  • s-animate animated, colorized from left to right (sideways).

pane

defines in which pane the image is displayed: Plots or Viewer.

Value

The function adds the comparison to the response object and returns it invisibly.

Examples

Run this code
# NOT RUN {
# Compare images
res <- colorize(img = "https://upload.wikimedia.org/wikipedia/commons/9/9e/Breadfruit.jpg")
juxtapose(res)
# }

Run the code above in your browser using DataLab