Skip to contents

Calculates the absolute pixel difference between two images.

Usage

img_difference(
  image1,
  image2,
  threshold = NULL,
  file = NULL,
  overwrite = FALSE
)

Arguments

image1, image2

character or magick-image. Images to be compared.

threshold

numeric. The image threshold that should be applied between 0 and 1. All values below the threshold percentage will be converted to 0.

file

character or NULL. File path to the output image.

overwrite

logical. If overwriting files is allowed.

Value

a magick image.