visualmetrics

Perceptual, semantic and communicative analysis of visual content.
visualmetrics describes images such as advertisements, posters, packaging
and social media posts at three levels, and puts every measure in one table
that you can join to campaign, survey or eye-tracking data.
| Level |
Question |
Functions |
| Perceptual |
What does the image look like? |
vm_color(), vm_light(), vm_complexity(), vm_composition(), vm_saliency() |
| Semantic |
What does it contain? |
vm_text() (OCR, text area, typographic hierarchy, WCAG contrast) |
| Communicative |
What does each element do? |
vm_codebook(), vm_coding_sheet(), vm_reliability() (Krippendorff’s alpha) |
It describes images; it does not claim to predict how people will respond
to them.
Installation
# install.packages("remotes")
remotes::install_github("pablosancheznunez/visualmetrics")
For text recognition, also install tesseract.
Example
library(visualmetrics)
files <- vm_example() # six synthetic advertisements
f <- vm_extract(files) # all perceptual measures, one long table
vm_wide(f) # one row per image
vm_plot(files[1], overlay = c("saliency", "aoi", "thirds"))
vm_aoi(files) # areas of interest for eye tracking
vm_saliency_fit(files, vm_example_fixations()) # saliency against fixations (NSS, AUC)
groups <- c(ad_01 = "warm", ad_02 = "warm", ad_03 = "warm",
ad_04 = "cool", ad_05 = "cool", ad_06 = "cool")
vm_compare(f, groups) # differences with effect sizes
cb <- vm_codebook_ads() # human coding of communicative functions
vm_coding_sheet(files, cb, coders = c("ana", "luis"), file = "coding.csv")
What makes it different
- Three levels, one table: perceptual measures, recognised text and
human codings share a long format with the level, method and version of
every value (
vm_dictionary() documents each variable).
- Interpretation stays human: communicative functions are coded by
people with codebooks and checked with Krippendorff’s alpha, instead of
being inferred from pixels.
- A bridge to eye tracking: saliency becomes areas of interest and can
be compared with recorded fixations.
- Light: base R image processing with
png and jpeg; OCR is optional.
photoarchive collects
photographs from digital archives;
visualbrief reports
campaign results; eyemineR
and neuroconsumer
support eye-tracking and consumer experiments. visualmetrics provides the
image measures they can share.
Citation
citation("visualmetrics"). MIT License.
评论