Write one program to generate five test images.
Create a 512x512 image that contains eight vertical bands. Each band should have the same width, and have uniform intensity. The bands should increase linearly in brightness from left to right (i.e., the band on the left should have an intensity of zero; the band on the right should have an intensity of 255).
Transpose Image A1 to get an image with horizontal mach bands, with the darkest band on the top, and brightest band on bottom.
Create a 512x1024 image by sampling a sinusoid grating. The sinusoid should
vary in frequency linearly from 0 to
pi/3 from left to right, and its
amplitude should vary linearly from maximum (127.5) to minimum (0) from top
Create a 512x1024 image containing four squares:
Two "outer squares" side by side, each 512x512.
These represent two different surround intensities
Two 64x64 squares, each centered inside an outer square.
These represent background intensities
In this framework, try the following:
B1 = B2 = X, where
X is any value.
This sets both small squaress to the same intensity.
S1 at a value sufficiently different from
X (where you can perceive a difference between them).
S2. This demonstrates the effects of
Also try all combinations of intensities 0, 128, and 255 for
X is not equal to
S1) for a total of 6
combinations. For each combination try several values of
You may want to turn off the light for this experiment so that the environment surround has the same brightness as the image surround.
Create a 512x512 image with the following properties
A 512x512 "outer square", representing the surround intensity
An 8x8 square centered in the image, representing the
F = I, then slowly increase
F until you can just
notice the difference between
dI = F - I.
Again, a dark environment may be needed for you to perceive the full effect when your screen surround is dark.
F vs I and
dI/I vs ln(I) to illustrate Weber's law.
Include tables of your values along with the plots.