FindMatchingColor
FindMatchingColor[image,color]
returns a color similar to the color that is present in image.
FindMatchingColor[image,{color1,color2,…}]
returns a list of colors matching each colori.
FindMatchingColor[{image1,image2,…},{color1,color2,…}]
returns lists of matching colors for all imagei.
Details and Options
- FindMatchingColor takes the dominant colors of the image and returns a color it finds close to color. It is typically used for finding the shade of a color present in an image.
- If no color similar to color is available in image, a Missing object is returned.
- The following options can be given:
-
ColorCoverage Automatic fraction of the image covered by a color similar to color DistanceFunction Automatic any distance supported in ColorDistance MaxColorDistance Automatic maximum color distance MinColorDistance Automatic minimum distance used by DominantColors - FindMatchingColor[{col1,col2,…},color] is also supported.
Examples
open allclose allBasic Examples (2)
Scope (4)
Options (3)
ColorCoverage (1)
DistanceFunction (1)
By default, a perceptual color distance is used:
Use DistanceFunction to specify a different distance metric:
MaxColorDistance (1)
By default, only colors close to the target color are returned:
Use MaxColorDistance to specify a custom threshold:
Use MaxColorDistanceInfinity to find the closest color:
Applications (3)
Perform a foreground-background segmentation based on the color of the background:
The image seems to contain blue, but the actual pixel values are very far from it:
Find the matching blue in the image and use it to perform the segmentation:
Transform a color palette using colors from a natural image:
Select images based on the presence of a color:
Find images with yellow objects:
Text
Wolfram Research (2019), FindMatchingColor, Wolfram Language function, https://reference.wolfram.com/language/ref/FindMatchingColor.html.
CMS
Wolfram Language. 2019. "FindMatchingColor." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FindMatchingColor.html.
APA
Wolfram Language. (2019). FindMatchingColor. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindMatchingColor.html