imagefluency: Image Statistics Based on Processing Fluency


imagefluency is an simple R package for image fluency scores. The package allows to get scores for several basic aesthetic principles that facilitate fluent cognitive processing of images. If you want to try it out before installing, you can find an interactive Shiny app here (alpha version).

The main functions are:

Other helpful functions are:

  • img_read() wrapper function to read images into R using read.bitmap() from the readbitmap package
  • rgb2gray() convert images from RGB into grayscale (might speed up computation)
  • run_imagefluency() to launch a Shiny app locally on your computer for an interactive demo of the main functions

The main author is Stefan Mayer.


You can install the current stable version from CRAN.


To download the latest development version from Github use the install_github function of the devtools package.

# install devtools if necessary
if (!require("devtools")) install.packages("devtools")
# install imagefluency from github

Use the following link to report bugs/issues:

Example usage

# visual contrast
# example image file (from package): bike.jpg
bike_location <- system.file("example_images", "bike.jpg", package = "imagefluency")
# read image from file
bike <- img_read(bike_location)
# get contrast

# visual symmetry
# read image
rails <- img_read(system.file("example_images", "rails.jpg", package = "imagefluency"))
# get only vertical symmetry
img_symmetry(rails, horizontal = FALSE)


See the package vignette for a detailled introduction (or type vignette("imagefluency", package = "imagefluency") into the R console) and the reference page for details on each function.


If you want to cite this package in a scientific journal or in any other context, run the following code in your R console:

utils::citation(package = "imagefluency")

There is currently a publication in preparation corresponding this package and the citation will be updated once it’s published.


The img_complexity function relies on the packages R.utils and magick. The img_self_similarity function relies on the packages OpenImageR, pracma, and quadprog. The img_read function relies on the readbitmap package. The run_imagefluency shiny app depends on shiny.


  • Mayer, S. & Landwehr, J, R. (2018). Quantifying Visual Aesthetics Based on Processing Fluency Theory: Four Algorithmic Measures for Antecedents of Aesthetic Preferences. Psychology of Aesthetics, Creativity, and the Arts, 12(4), 399–431. doi: 10.1037/aca0000187

  • Mayer, S. & Landwehr, J. R. (2018). Objective measures of design typicality. Design Studies, 54, 146–161. doi: 10.1016/j.destud.2017.09.004