find_dominant_colour: Find dominant colour in an image

View source: R/find_dominant_colour.R

find_dominant_colourR Documentation

Find dominant colour in an image

Description

This function finds the dominant colour in an image. This is used when the option "remove_dominant_colour" argument in pairwise_comparison() is TRUE.

Usage

find_dominant_colour(image)

Arguments

image

The image in which the dominant colour must be determined

Value

Dominant colour

Note

This is part of a suite of functions required to compare images.

Author(s)

Kurinchi Gurusamy

References

https://sites.google.com/view/equal-group/home

See Also

pairwise_comparison()

Examples

# Create a plot and save this as file
filename <- tempfile(fileext = ".png")
png(filename)
plot.new()
hist(rnorm(100))
recordPlot()
dev.off()
# Read image
library(magick)
image <- image_read(filename)
# Perform the function
results <- find_dominant_colour(image)

EQUALCompareImages documentation built on Sept. 9, 2025, 5:35 p.m.