DominantColors

DominantColors[image]
returns dominant colors in image.

DominantColors[image,n]
returns at most n dominant colors in image.

DominantColors[image,n,prop]
returns the specified property prop for the regions that belong to the same dominant color.

Details and OptionsDetails and Options

  • DominantColors[image] returns a list of colors that represent clusters of colors that appear in the image. The colors are represented by GrayLevel or RGBColor.
  • The returned colors are ordered based on the size of the clusters they represent.
  • DominantColors uses the Lab color space to find color clusters.
  • The following properties are supported:
  • "Color"representative color for each cluster (default)
    "LABColor"representative color in Lab color space
    "Count"total number of pixels covered by each color cluster
    "Coverage"fraction of the image covered by each color cluster
    "CoverageImage"image representing the region covered by each color cluster
    "MaskCoverage"fraction of the specified mask covered by each color cluster
  • DominantColors[image,n,{"prop1","prop2",}] computes multiple properties.
  • DominantColors[image,n,"Properties"] returns a list of supported properties.
  • DominantColors accepts the following options:
  • MaskingAllregion of interest
    ColorCoverageAutomaticfraction of the image covered
    MinColorDistanceAutomaticminimum color distance
  • With MinColorDistance->d, clusters represented by colors and are merged if ColorDistance[c1,c2]<d. The color with the larger coverage is assigned to the new cluster.
  • With ColorCoverage->f, colors that cover at least the fraction f of the image are returned. With ColorCoverage->{fmin,fmax} a range of coverage fractions can be specified.
  • With Masking->roi, and return properties with respect to the specified region-of-interest roi.
  • Fractions returned by are always with respect to the whole image.
  • DominantColors works with Image3D objects.
Introduced in 2012
(9.0)
| Updated in 2014
(10.0)