{'fraction_non_alphanumeric': 0.02097902097902098, 'fraction_numerical': 0.0, 'mean_word_length': 5.046948356807512, '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}}
A fast matching algorithm based on K-degree template

To improve the correctness and real-time performance in the process of image matching, this paper proposed a fast matching algorithm based on image K-gray-degree clustering. Given a template with irregular shape, this algorithm divides the image into certain size blocks called R_block, and calculates their mean gray value, then clusters original templates to K-degree templates according to gray distribution of matching targets. At the same time the algorithm cluster the divided template to a K-degree template Tk and create a K-degree template set based on Tk, then matching these Kdegree templates into the searching image from coarse to fine. In the process of coarse matching, it only needs to check whether corresponding blocks between template and sub-image are in the same degree. In the process of fine matching, the algorithm makes it possible for efficient matching of a template into an image based on the improved NCC formula, which is based on differential ordinal array, this reduces multiplication significantly. Experiments show that this algorithm is robust and fast under the condition of non-linear changing of local lighting, noise, target matching of irregular shape, and even matching in complex background.