| Previous | Table of Contents | Next |
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. However, output sequence variations are significantly more pronounced than with the 1/2 [1,+2,+1] filter kernel which is equivalent to [1/2,+1,+1/2]. The equivalent filter kernel only adds half the local input variations rather than all of it and computationally suffers by performing two intermediate value divisions rather than one single one at the end.
Finally, consider the [1,+1,+1] filter kernel (Figure 11-10):
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-10: Sharpening [1,+1,+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.
Unsharp masking is another process that accentuates differences usually using a two-step process. The first step creates an output sequence using a smoothing filter kernel. The second step creates the final output sequence by:
Unsharp masking subtracts out a fraction of the low spatial frequencies to increase the contribution of the high spatial frequencies. Also, subtracting the input mask [0, 2, 0] from the smoothing mask [1,1,1] you get a high-pass filter [1,1,1] which accentuates changes in both slopes. This is the Laplacian, or second finite difference, filter. You need to make it [1,3,1] to scale correctly and sharpen rather than edge detect. This shows that unsharp masking is just a variant of the sharpening filter.
People use unsharp masking rather than a sharpening filter because sometimes blurring is physically easier than sharpening (e.g., with photography) or because of computational advantages (reduced chance of overflow). Otherwise, an unoriented sharpening filter is preferred.
As with sharpening, the final output sequence leaves constant-value sequence number runs untouched other than the beginning and end values. However, the accentuation affects both rises and falls, occurring where input sequence numbers begin and stop rising or falling. For example, rather than immediately beginning to rise, the output curve first drops before the rise. Similarly, rather than immediately stopping a rise, the output sequence briefly continues rising before dropping back.
Unsharp masking, therefore, has an initial undershoot and subsequent overshoot effect for input sequence rises. Similarly, unsharp masking has an initial overshoot and subsequent undershoot effect for input sequence falls. The effect is similar to automobile drivers who veer in one direction before turning in the opposite direction. Numerically, the effect exaggerates numeric rises and falls with an anticipatory counter movement. Figure 11-11 illustrates unsharp masking using the 1/3 [+1,+1,+1] filter kernel as the first steps smoothing mask. The second step scales the difference using a coefficient of 1 (leaves the difference unchanged).
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-11: Unsharp masking 1/3 [+1,+1,+1] output array
| Previous | Table of Contents | Next |