Fast normalized cross correlation for defect detection
Normalized cross correlation (NCC) has been used extensively for many machine vision applications, but the traditional normalized correlation operation does not meet speed requirements for time-critical applications. In this paper, we propose a fast NCC computation for defect detection. A sum-table scheme is utilized, which allows the calculations of image mean, image variance and cross-correlation between images to be invariant to the size of template window. For an image of size MN and a template window of size mn, the computational complexity of the traditional NCC involves 3mnMN additions/subtractions and 2mnMN multiplications. The required numbers of computations of the proposed sum-table scheme can be significantly reduced to only 18MN additions/subtractions and 2MN multiplications.
normalized cross correlation defect detection sum tables