Photographic Contrast Masks Using Cellular Automata

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

Contrast masks are commonly used to adjust the tone of specific areas of a photograph. The mask in this Demonstration is generated by a two-dimensional cellular automaton using a binarized version of the photograph as initial condition.


You can choose different resolutions and a different binarizing threshold. Different rules generate a variety of mask patterns. Increasing the steps makes the mask grow in size.

The adjusted photograph is made by blending the original with the mask. Setting the blending fraction to 0 shows the original photograph. Setting the blending fraction to 1 shows the mask only.


Contributed by: Erik Mahieu (May 2012)
Open content licensed under CC BY-NC-SA



Snapshot 1 shows the mask used in the thumbnail. The other masks can be displayed by setting the blending fraction slider to 1.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.