| Previous | Table of Contents | Next |
This is the chapters final topic and sets the stage for the following chapter. It provides an introduction to the following imaging concepts:
These three concepts share a common conceptrunning calculations.
Consider the following number sequence:
Rather than look at numbers, its easier to look at a chart that shows the number pattern (Figure 11-3).
14 |------------------------------------------------------------ | 14 13 |------------------------------------------------------------ | 13 12 |------------------------------------------------------------ | 12 11 |------------------------------------------------------------ | 11 10 |------------------------------------------------------------ | 10 9 |------------------------------------------------------------ | 9 8 |--------***------****-----***---***---***---*----***-------- | 8 7 |-------****------****-----***---***---***---*----****------- | 7 6 |------*****----*******----***---***---********---*****------ | 6 5 |-----******----*******----***---***---********---******----- | 5 4 |----*******--**********---***---***************--*******---- | 4 3 |---********--**********---***---***************--********--- | 3 2 |--**********************************************-*********-- | 2 1 |-***********************************************-**********- | 1 0 + ------------------------------------------------------------ + 0 Input:012345678882244668888642228882228884448886668642088876543210 ============================================================
Figure 11-3: Sample number sequence
Now, the number sequence has a shape. From left to right it:
Smoothing removes high frequency variations using averaging techniques. Remember the Wedges small choppy wave? To remove it, leaving the large lumbering wave essentially intact, use smoothing. Lets see how it works with our number sequence.
First, image processing operations typically receive digital image input number sequences which processes use to derive output sequences. Processing usually leaves the original data intact as it produces derived sequencesimportant because subsequent calculations often reference the original data as well soon see.
Second, if smoothing uses averaging, one salient question is, What kind of averaging? In our first example, we generate an averaging curve by adding three adjacent sequence values and dividing the sum by three using integer arithmetic, generating an arithmetic mean (average). This mean value is output at the middle numbers location in the output curve.
For example, the first three numbers, 0, 1, and 2, add up to 3. Dividing by 3 produces 1. Therefore the middle input sequence number with a value of 1 has an output point value of 1. In the case of the sequence numbers 8, 4, and 4, their sum is 16 and dividing by 3 using integer arithmetic produces 5. So, the middle input number with a value of 4 has an output value of 5. If we replaced the 4 with a 5 in the input sequence, the next calculation would incorrectly use the 5 instead of the correct value4.
This approach works for interior sequence numbers but fails for the starting and ending values, which both have a zero value. In this instance, we use the end points twice in the sum before dividing the sum by 3. This approach is purely a matter of convenienceother strategies work.
Now consider the output curve using this averaging scheme (Figure 11-4 on the following page):
14 |------------------------------------------------------------ | 14 13 |------------------------------------------------------------ | 13 12 |------------------------------------------------------------ | 12 11 |------------------------------------------------------------ | 11 10 |------------------------------------------------------------ | 10 9 |------------------------------------------------------------ | 9 8 |---------*--------**-------*-----*-----*----------*--------- | 8 7 |-------***-------****------*-----*-----**---------***------- | 7 6 |------*****-----******----***---***---********----****------ | 6 5 |-----******----*******----***---****-*********---******----- | 5 4 |----********--*********--*****-****************--*******---- | 4 3 |---*********-**********--*****-****************-*********--- | 3 2 |--********************************************************-- | 2 1 |-**********************************************************- | 1 0 +------------------------------------------------------------+ 0 Input:012345678882244668888642228882228884448886668642088876543210 ========-=-+=-=-=-==-====+-=-+=+-=-+=+-=-===-===+-=-========
Figure 11-4: Smoothing 1/3 [+1,+1,+1] output array
The figures title indicates we use three input points to calculate an output value. We multiply each input points value by +1 and then add, dividing the sum by 3 using integer arithmetic. The result is the output value for the center sequence number. The notation 1/3 [+1, +1, +1] is referred to as the processs filter kernel or set of weighting coefficients. A filter kernel nearly always uses an odd number of values symmetrically surrounding a center point.
| Previous | Table of Contents | Next |