Contents
Mach Band Illusion
The eye accentuates abrupt changes in brightness, so that regions of
constant brightness near the edges appear to have varying brightness.
- Make a new window with the File -> New menu.
- Most any size is OK,
- The default 552 x 436 will do nicely. (For this document, I've chosen
300x150)
- Make a horizontal ramp in the window. In
ImageJ, just use the Fill with Ramp option in the New
image dialog.
- Edit -> Select All
- Edit -> Draw Scale
- Click on the pencil tool
to
stop the 'marching ants' border.
- Reduce the number of gray levels in the ramp to 10.
- Process / Math / Multiply / .05. Then Process
/ Enhance Contrast. Omit following step.
- Change the ramp to 10 bands rather than a continuous ramp
- Options -> LUT Options
- Type in 10 for the number of colors/grayscales.
- (The default is 256, which is for the continuous ramp. The Options
-> Grayscale
Note that the gray level bands, both in the LUT window and in the image
window, appear to be shaded or have a "Venetian Blind" appearance.
Despite their appearance, the bands each consist of only one gray level.

- This can be shown in the LUT window by moving the
cursor around. (Mac and ImageJ).
Note at this point, that the change is in the LUT window, and not in the image
itself. The image has been changed in ImageJ
- To show this, click on the Line Profile
tool
and drag the rubber band line across
the image:

(Alternatively, use the line selction tool
,
then the Analyze -> Plot Profile menu.
Note - the line selection tool
and Analyze / Plot Profile are available in ImageJ. The
line profile has steps, as shown in the last plot, below.
The resulting profile (in the Plot window) shows that the image really
has continuous gray levels:
- To make the image actually have the pixel values that it appears to
have
- Click on the pencil tool
to deactivate
the line selection.
- Use the Process - > Convert to Grayscale
or Process -> Apply LUT menu. This makes the pixel values what
they appear to be, and reverts the LUT to a grayscale ramp. More mathematically,
for each pixel in the image:
- The pixel value is used as an index to the LUT.
- The LUT value (RGB values are given in the INFO window, but they are
all the same.) is inserted in the image, replacing the old pixel value.
- NIH Image Manual (Wayne Rasband): "Applies the current look-up
table function to each pixel in the current selection (or the entire image
if there is no current selection) and restores the default look-up table
(the identity function). This modifies the gray values so that when the
image is viewed using the default grayscale look-up table it will look
the same as it did before. It also makes any brightness and contrast changes
permanent. It can be used to posterize (reduce the number of gray values)
an image by loading and applying, for example, a LUT consisting of four
shades of gray. It can also be used to convert color (false color- DSB)
images to grayscale (same key command but renamed to 'Convert to Grayscale'.
DSB) , and to convert a thresholded image to binary."
Now the image is unchanged in appearance, but the LUT is a gray level
ramp:

and the profile shows steps, as expected:

The profile shows that the intensity across any band is constant, yet
each band appear darker on the left side than on the right. This is the
Mach Band illusion.