Edge Detector Mask
-1 0 -1
0 4 0
-1 0 -1
Edge in well lit area
50 100 100
50 100 100 convolution with edge mask yields:
50 100 100 400 - 50 - 50 - 100 - 100 = 100
Edge in poorly lit area
5 10 10
5 10 10 convolution with edge mask yields:
5 10 10 40 - 5 - 5 - 10 - 10 = 10
Smoothing mask
1 1 1
1/9 * 1 1 1
1 1 1
convolution of smoothing mask with edge in well lit area
yields:
50+50+50+100+100+100+100+100+100 / 9 = 750/9 = 83
convolution of smoothing mask with edge in poorly lit
area yields:
5+5+5+10+10+10+10+10+10 / 9 = 75/9 = 8
dividing original convolution by the smoothing mask
result:
edge in well lit area: 100 / 83 = 1
edge in poorly lit area: 10 / 8 = 1