| Previous | Table of Contents | Next |
Smoothing reduces output number sequence variations. In direct contrast, the sharpening process emphasizes them. Sharpening calculates how sequence number values vary around the current input sequence number and combines the variation with the current input sequence numbers value to create an output sequence number value. Consider the following filter kernel:
[+1,+1,1]
At each current input sequence number, the input sequence numbers value on the right subtracts from the one on the left and the difference adds to the current input sequence number value. Now consider the following filter kernel:
[1,+1,+1]
At each current input sequence number, the input sequence numbers value on the left subtracts from the one on the right and the difference adds to the current input sequence number value.
With both filter kernels, the three filter kernel multiplier (coefficient) values add to +1. Now consider the following filter kernel:
1/2 [1,+2,+1]
At each current input sequence number, the input sequence numbers value on the right subtracts from the one on the left and the difference adds to twice the current input sequence number value. Here, adding the coefficients produces a sum of 2, so we divide by 2 to obtain a correct weighting that leaves constant input sequence number runs such as... 8, 8, 8, 8, 8, 8, 8, 8, 8,... unchanged other than at the beginning and end points. Thus, sharpening emphasizes local input differences but leaves constant input value runs unchanged. Lets see how the 1/2 [1,+2,+1] sharpening filter kernel modifies the input sequence numbers (Figure 11-7):
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-7: Sharpening 1/2 [1,+2,+1] output array
For the output sequence, this filter kernel increases input sequence number values where the sequence is rising but decreases them where the sequence number is falling. Larger input sequence number variations produce larger output sequence number variations. Now consider the 1/2 [+1,+2,1] filter kernel (Figure 11-8):
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-8: Sharpening 1/2 [+1,+2,1] output array
For the output sequence, this filter kernel decreases input sequence number values where the sequence is rising but increases them where the sequence number is falling. Larger input sequence number variations produce larger output sequence number variations. It follows that sharpening operations have directionalityindividual filter kernels are sensitive to whether input sequences are rising or falling. Now consider the [+1, +1, 1] filter kernel (Figure 11-9):
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-9: Sharpening [+1,+1,1] output array
| Previous | Table of Contents | Next |