juxtapose: Compare Images

Description Usage Arguments Value Examples

View source: R/juxtapose.R

Description

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

Usage

1
2
3
4
5
6
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

1
2
3
4
5
6
## Not run: 
# Compare images
res <- colorize(img = "https://upload.wikimedia.org/wikipedia/commons/9/9e/Breadfruit.jpg")
juxtapose(res)

## End(Not run)

colorizer documentation built on Nov. 8, 2020, 4:39 p.m.