Image Processing Reference
In-Depth Information
Mathematically, for an image which is a matrix of N × N points, the brightness of the
pixels in a new picture (matrix), N , is the result of adding b brightness values to the pixels
in the old picture, O , given by:
1, N (1.1)
Real images naturally have many points. Unfortunately, the Mathcad matrix dialog box
only allows matrices that are 10 rows and 10 columns at most, i.e. a 10
N x , y = O x , y + b
x , y
10 matrix. Real
images can be 512
128, this implies a storage
requirement for 262 144, 65 536 and 16 384 pixels, respectively. Since Mathcad stores all
points as high precision, complex floating point numbers, 512
512, but are often 256
256 or 128
512 images require too
much storage, but 256
128 images can be handled with ease. Since this
cannot be achieved by the dialog box, Mathcad has to be 'tricked' into accepting an image
of this size. Figure 1.15 shows the image of a human face captured by a camera. This image
has been stored in Windows bitmap (.BMP) format. This can be read into a Mathcad
worksheet using the READBMP command (yes, capitals please! - Mathcad can't handle
readbmp ), and is assigned to a variable. It is inadvisable to attempt to display this using
the Mathcad surface plot facility as it can be slow for images, and require a lot of memory.
256 and 128
0 1 2 3 4 5 6 7 8 9 10 11
78 75 73 79 83 77 73 79 79 77 79 78
74 71 74 77 79 71 66 71 74 79 79 77
70 73 79 77 74 64 55 55 66 78 77 81
70 77 83 77 66 52 42 47 63 74 75 80
74 77 79 70 53 37 29 37 53 68 77 78
76 77 78 64 45 30 22 26 45 66 80 86
75 79 78 60 43 28 16 20 48 71 81 91
76 77 70 48 36 24 12 21 51 73 84 91
75 76 61 40 33 21 12 24 55 79 88 91
77 76 55 34 27 16
012345678
158 155 153 159 163 157 153 159 159
154 151 154 157 159 151 146 151 154
150 153 159 157 154 144 135 135 146
150 157 163 157 146 132 122 127 143
154 157 159 150 133 117 109 117 133
156 157 158 144 125 110 102 106 125
155 159 158 140 123 108
0
1
2
3
4
5
6
7
8
9
10
11
12
0
1
2
3
4
5
6
7
8
9
10
11
12
Face =
New face =
96 100 128
156 157 150 128 116 104
92 101 131
155 156 141 120 113 101
92 104 135
9 21 56 84 93 95
157 156 135 114 107
96
89 101 136
77 70 45 27 19 9
7 26 61 88 97 97
157 150 125 107
90
89
87 106 141
73 60 37 26 18 5
7 32 68 88 95 99
153 140 117 106
98
85
87 112 148
71 53 34 26 18 6
7 33 67 88 96 103
151 133 114 106
98
86
87 113 147
(a) Part of original image as a matrix
(b) Part of processed image as a matrix
(c) Bitmap of original image
(d) Bitmap of processed image
Figure 1.15
Processing an image of a face
Search WWH ::




Custom Search