xvi List of Figures
22.3 Strategy at an intersection. (a) About to enter an intersection. (b) At the
intersection (marked as “2”), try to go east first. (c) It is a dead end. Turn
around and return to the previous intersection. (d) The mark “2” now
becomes “4”, indicating that it is the fourth visited cell. Since cell “3” is a
deadend,itismarkedblack. ......................... 370
22.4 (a) Since east is a dead end, try to go south. (b) Enter another intersection,
marked as “6”. (c) Go east and find that it is another dead end. (d) Turn
around to the previous intersection, now marked as “8”. (This is the eighth
move in the sequence of moves.) The dead end is replaced by black. . . . 371
22.5 (a) It is not possible to go south at this intersection. Move west and mark
the cell as “9”. (b) This is another dead end. Turn around and mark the
intersection as “10”. (c) Since both options lead to dead ends, we return to
the previous intersection. The visited cells are marked black. (d) Back at
thefirstintersection. .............................. 371
22.6 (a) Going west is an option. (b) It is another dead end. Return to the
previous intersection. (c),(d) All options at this intersection lead to dead
ends,soitshouldreturnalongthecorridor. ................. 371
22.7 Two four-way intersections at A and B. At a four-way intersection, all four
if conditionsaretrue. ............................. 374
22.8 After reaching a dead end, we should turn around and move west. At loca-
tion 2, moving east is an option again. We will get stuck here in these two
cells and need a solution to prevent this from happening. . . . . . . . . . 375
23.1 Example of metadata: the exposure time, the focal length, the time and the
date,etc. .................................... 382
23.2 (a) The RGB color space, showing the primary colors and their mixtures.
White is produced by mixing all three primary colors together. Color filters.
(b) original images. (c) red only, (d) green only, (e) blue only. . . . . . . . 392
23.3 Color filters. (a)–(c) original images. (d) red only, (e) green only, (f) blue
only. ....................................... 392
23.4 Colorinversion.(a),(c):original.(b),(d):inverted............... 393
23.5 Detecting vertical edges. (a) The original image. (b) Gray-scale image. The
detected edges use different threshold values. (c) 120. (d) 100. (e) 80. (f)
is 60. Many vertical edges are not detected when the threshold is too high.
When the threshold is too low, there are many false-positive edges (like the
sky). ....................................... 393
23.6 Equalization. (a),(b): original images. (c),(d): processed images. . . . . . . 393
23.7 Equalization. (a),(b): original images. (c),(d): processed images. . . . . . . 393
24.1 Graphicalrepresentationofthecodebook................... 396
24.2 (a) The characters are sorted by the frequencies. (b) A linked list is created.
List nodes are expressed by rectangles. Tree nodes are expressed by ovals. 401
24.3 (a) Take the tree nodes, L and R, from the first two list nodes. (b) Create
atreenodeN whose left and right children are L and R. (c) Create a new
list node pointing to the newly created tree node. The list nodes are sorted
in the ascending order by the tree nodes’ frequencies. . . . . . . . . . . . 402
24.4 Continuetheprocedure. ............................ 403
24.5 At every step, two tree nodes are removed, combined into a single tree, and
thenthenewtreeisaddedintothelist. ................... 404
24.6 Continuetheprocedureshorteningthelinkedlist............... 405