Learn R Programming

magick (version 1.2)

analysis: Image Analysis

Description

Functions for image calculations and analysis. This part of the package needs more work.

Usage

image_compare(image, reference_image, metric = "")

image_fft(image)

Arguments

image

magick image object returned by image_read() or image_graph()

reference_image

another image to compare to

metric

string with metric type

Details

For details see Image++ documentation. Short descriptions:

  • image_compare calculates a metric by comparing image with a reference image.

  • image_fft returns Discrete Fourier Transform (DFT) of the image as a magnitude / phase image pair. I wish I knew what this means.

Other analysis functions will be added in future versions!

See Also

Other image: animation, attributes, color, composite, device, editing, effects, index, ocr, painting, transform

Examples

Run this code
# NOT RUN {
logo <- image_read("logo:")
logo2 <- image_blur(logo, 3)
logo3 <- image_oilpaint(logo, 3)
if(magick_config()$version >= "6.8.7"){
  image_compare(logo, logo2, metric = "phash")
  image_compare(logo, logo3, metric = "phash")
}
# }

Run the code above in your browser using DataLab