There are various ways in the Wolfram Language to transform an image and create an effect. Popular image effects range from making an image look old—for example, a sepia color effect—all the way to transferring the style of an image to another. Here we use a few examples to show how image effects can be created.
It is also common to use a small number of colors to represent an image. This transformation, known as color quantization, can be performed by the function ColorQuantize:
Color quantization can be performed with or without dithering. Compare the result without dithering:
Edges of the quantized image can also be highlighted by subtracting them from the quantized image:
Create a grayscale version of the image:
Increase the contrast of the grayscale image:
The function ImageEffect has a variety of other color transformations, such as creating a sepia effect:
Another type of image effect is to add a frame around an image. One can add a simple frame by adding a constant color frame, e.g. with the ImagePad function in the Wolfram Language:
ImageEffect has a few framing effects, including vignette, faded, torn paper and other frames:
Images can be stylized using image processing techniques to simulate charcoal drawing, oil painting, embossing and more. ImageEffect has a few stylization effects:
Deep neural networks also offer models to restyle an image based on the style of another image. ImageRestyle uses a neural network approach to perform such a style transfer:
The amount of style transfer can also be controlled using a style transfer image together with a restyle weighting factor:
In this notebook, we illustrated a number of effects that can be applied to images using the ImageEffect function together with a few of the many image processing functions available in the Wolfram Language. However, this is only a taste of what’s possible. Using the power and flexibility of Mathematica and the Wolfram Language, it is possible to create and apply virtually any effect suited to your artistic application, limited only by your imagination and creativity.