{'fraction_non_alphanumeric': 0.01625, 'fraction_numerical': 0.0, 'mean_word_length': 5.209302325581396, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Fast Template Matching Based on Normalized Cross Correlation with Centroid Bounding

In this paper, we propose a fast pattern matching algorithm based on normalized cross correlation (NCC) with centroid bounding to achieve very efficient search. The algorithm will calculate histogram around centroid within maximum circle with radius R. After dividing the image into blocks by R×R size, calculating the similarity between the color histograms of the image block and centroid around circle to get potential blocks that the centroid of the template might be in, then by applying NCC to get the final result. Experimental results show the proposed algorithm is very efficient comparing with full-search NCC. The results has broad applications in the fields of object detecting, image retrieval and etc.