| Previous | Table of Contents | Next |
Figure 11-12 illustrates unsharp masking using the 1/4 [+1,+2,+1] filter kernel as the first steps smoothing mask.
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-12: Unsharp masking 1/4 [+1,+2,+1] output array
Finally, since each unsharp masking step references the input sequence, it is possible to perform the complete process as a single step. The logic follows:
| FinalValue == InputValue + ScalingValue (InputValue SmoothingValue) | by definition |
| FinalValue == InputValue + 1 * (InputValue SmoothingValue) | substituting |
| FinalValue == 2 * InputValue SmoothingValue | combining |
Figure 11-13 illustrates the single step processs identical result using the 1/4 [+1,+2,+1] filter kernel as the first steps smoothing mask.
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-13: Direct unsharp masking 1/4 [+1,+2,+1] output array
This chapter covered smoothing, sharpening, and unsharp masking. These three processes are fundamental digital image processing techniques that de-emphasize or accentuate numeric differences. As the next chapter shows, digital images are simply two-dimensional number collections. Digital image processing applies smoothing, sharpening, and unsharp masking techniques to these number collections using two-dimensional masks which, in degenerate cases, are one-dimensional masks similar to the ones this chapter uses.
With two-dimensional images:
The MATH.C program in Appendix C provides a means to further study these operations on values that range from zero to 14.
| Previous | Table of Contents | Next |