{'fraction_non_alphanumeric': 0.01697045883092395, 'fraction_numerical': 0.0, 'mean_word_length': 4.940298507462686, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, '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}}
Optimal Edge Detection using Expansion Matching and Restoration

Discusses the application of a newly developed expansion matching method for edge detection. Expansion matching optimizes a novel matching criterion called the discriminative signal-to-noise ratio (DSNR) and has been shown to robustly recognize templates under conditions of noise, severe occlusion and superposition. The DSNR criterion is better suited to evaluate matching in practical conditions than the traditional SNR since it considers as "noise" even the off-center response of the filter to the template itself. We introduce a family of optimal DSNR edge detectors based on the expansion filter for several edge models. For step edges, the optimal DSNR step expansion filter (SEF) is compared with the widely used Canny edge detector (CED). Experimental comparisons show that our edge detector yields better performance than the CED in terms of DSNR even under very adverse noise conditions. As for boundary detection, the SEF consistently yields higher figures of merit than the CED on a synthetic binary image over a wide range of noise levels. Results also show that the design parameters of size or width of the SEF are less critical than the CED variance. This means that a single scale of the SEF spans a larger range of input noise than a single scale of the CED. Experiments on a noisy image reveal that the SEF yields less noisy edge elements and preserves structural details more accurately. On the other hand, the CED output has better suppression of multiple responses than the corresponding SEF output. >