Image Processing Reference
In-Depth Information
Fig. 5.7 The principle of correlation, illustrated with a 3
×
3kernelona6
×
6image
}
SetPixel ( output ,
x,
y,
temp );
}
}
When applying correlation, the values in the output can be above 255. If this is
the case, then we normalize the kernel coefficients so that the maximum output of
the correlation operation is 255. The normalization factor is found as the sum of
the kernel coefficients. That is x y h(x,y) . For the left-most kernel in Fig. 5.6
the normalization factor becomes 1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
+
1
=
9, and the
resulting kernel coefficients are 1 / 9 as opposed to 1.
Search WWH ::




Custom Search