Skip to content

Chapter 28

Images as two-dimensional signals

Four lessons in Part X, Modulation, analytic signals and images. Read them in order, or start anywhere: a prerequisite is a link, never a gate.

Start with 28.1
0 of 4 readabout 83 minutes

Lessons in this chapter

Image: a 128 by 128 pixel grating, level stripes 8.0 pixels apart, at 90 degrees from across. Frequency plane, u across and v down from −0.5 to 0.5 cycles per pixel: a filled dot, (u, v), at u 0.0000, v 0.1250, joined to the centre by a thin line, and an open ring, the mirror, at u 0.0000, v −0.1250.Image: a 128 by 128 pixel grating, level stripes 8.0 pixels apart, at 90 degrees from across. Frequency plane, u across and v down from −0.5 to 0.5 cycles per pixel: a filled dot, (u, v), at u 0.0000, v 0.1250, joined to the centre by a thin line, and an open ring, the mirror, at u 0.0000, v −0.1250.

Lesson 115 minYou are hereRead

Images as signals

An image is a signal of two indices: read a spatial frequency's size and direction from its stripes, and see moiré and jaggies as aliasing.

Two 12 × 12 grids of squares shaded from dark for 0 to light for 1, with each value printed. Image: 0 everywhere except a 6 × 6 square of 1s in rows and columns 3 to 8. The 3 × 3 window is outlined at row 11, column 11, reaching past the border onto edge copies. Output: all 144 squares filled; the square's inside is 1.000, its edges 0.667, its corners 0.444, and a ring of 0.111 to 0.333 surrounds it. Sum of the nine products at row 11, column 11: 0.000.Two 12 × 12 grids of squares shaded from dark for 0 to light for 1, with each value printed. Image: 0 everywhere except a 6 × 6 square of 1s in rows and columns 3 to 8. The 3 × 3 window is outlined at row 11, column 11, reaching past the border onto edge copies. Output: all 144 squares filled; the square's inside is 1.000, its edges 0.667, its corners 0.444, and a ring of 0.111 to 0.333 surrounds it. Sum of the nine products at row 11, column 11: 0.000.

Lesson 220 minYou are hereRead

Image filtering

Slide a grid of weights over an image to blur, sharpen or find edges, and use a median to remove salt-and-pepper specks.

Three square panels of 64 by 64 pixels. Image: grey levels of a constant plus two gratings, upright stripes 4 times across and tilted stripes 3 times across and 6 times down. After the rows, bins k₁ from −32 to 31 across and rows down: a line down k₁ = 0 at 0.500, and fainter lines down k₁ = −4, −3, 3 and 4 at 0.125, the same in every row. After the columns, bins k₁ and k₂ from −32 to 31 with 0 in the centre: 5 dots, each ringed, 0.500 at the centre and 0.125 at (4, 0), (−4, 0), (3, 6) and (−3, −6); every other bin is 0.Three square panels of 64 by 64 pixels. Image: grey levels of a constant plus two gratings, upright stripes 4 times across and tilted stripes 3 times across and 6 times down. After the rows, bins k₁ from −32 to 31 across and rows down: a line down k₁ = 0 at 0.500, and fainter lines down k₁ = −4, −3, 3 and 4 at 0.125, the same in every row. After the columns, bins k₁ and k₂ from −32 to 31 with 0 in the centre: 5 dots, each ringed, 0.500 at the centre and 0.125 at (4, 0), (−4, 0), (3, 6) and (−3, −6); every other bin is 0.

Lesson 328 minYou are hereRead

The 2-D DFT

Compute a 2-D DFT as row then column DFTs, read an image's spectrum, blur it with a mask, and see why phase carries the shapes.

A small picture of the test card with two blocks outlined: smooth (dashed square) at rows 8 to 15, columns 96 to 103, and edge (solid square) at rows 16 to 23, columns 48 to 55. Three 8 by 8 grids: pixels, with each grey level printed; DCT, each cell shaded by log10 of its size from −1 to 3 with its sign; quantised, with the stored whole numbers and zeros blank. The edge block is outlined in the accent colour. Pixels: the edge block, values 97 to 230. DCT: the edge block's, largest size 406.1, 89.3 % of the energy in the first ten zig-zag places. Quantised: the edge block's, 27 of 64 numbers not zero. Zig-zag sequence up to its last nonzero number: 22, 14, −34, −4, 1, −2, 2, 3, −13, 1, 1, −2, 2, −1, −1, 0, 0, 0, −4, 2, 1, 0, 1, −1, 1, 0, 0, 0, 0, 0, 0, 0, −1, 1, 0, 0, 0, 0, −1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, −1.A small picture of the test card with two blocks outlined: smooth (dashed square) at rows 8 to 15, columns 96 to 103, and edge (solid square) at rows 16 to 23, columns 48 to 55. Three 8 by 8 grids: pixels, with each grey level printed; DCT, each cell shaded by log10 of its size from −1 to 3 with its sign; quantised, with the stored whole numbers and zeros blank. The edge block is outlined in the accent colour. Pixels: the edge block, values 97 to 230. DCT: the edge block's, largest size 406.1, 89.3 % of the energy in the first ten zig-zag places. Quantised: the edge block's, 27 of 64 numbers not zero. Zig-zag sequence up to its last nonzero number: 22, 14, −34, −4, 1, −2, 2, 3, −13, 1, 1, −2, 2, −1, −1, 0, 0, 0, −4, 2, 1, 0, 1, −1, 1, 0, 0, 0, 0, 0, 0, 0, −1, 1, 0, 0, 0, 0, −1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, −1.

Lesson 420 minYou are hereRead

Image compression

Cut an image into 8 × 8 blocks, take each block's DCT, round it with JPEG's table, and watch quality trade bits against error.

After this chapter

Where to go next.

The chapters either side, and the rest of Part X in the library.

Phasorium
LibraryEvery lesson, in order

Parts

About Phasorium
Look