ColorReplace

ColorReplace[image, color]
finds regions in image whose pixel values are similar to color and replaces them with transparent pixels.

ColorReplace[image, color->replacement]
replaces all pixels with the specified replacement color.

ColorReplace[image, color, t]
replaces all pixels whose values are within a distance t from color.

ColorReplace[image, marker]
uses the mean of the pixel values in image specified by the marker image as a reference color.

Details and OptionsDetails and Options

ExamplesExamplesopen allclose all

Basic Examples (3)Basic Examples (3)

Replace a background with transparency:

In[1]:=
Click for copyable input
Out[1]=

Replace black pixels in an image:

In[1]:=
Click for copyable input
Out[1]=

Specify a color distance to separate the greenscreen:

In[1]:=
Click for copyable input
Out[1]=
New in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »