{'fraction_non_alphanumeric': 0.014295925661186561, 'fraction_numerical': 0.0, 'mean_word_length': 4.577689243027889, '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}}
Optimal Edge Mask Determination Using Simulated Annealing

We investigate the optimum form for edge masks for a variety of edge types and noise characteristics. This is done by creating two images: an input image containing an edge at a known location, and an ideal output image which consists of zeros everywhere except at the location of the edge. The optimization problem is to adjust the values in the edge mask so that the result of convolving the mask with the input image is as close to the ideal image as possible. This difference between the actual output of an edge mask and the ideal output is the cost function which is minimized using simulated annealing. In order to speed up the annealing algorithm, edge masks are forced to be zero-sum, anti-symmetric masks with a central column of zeros (similar to Sobel operators, although usually much larger.) In order to correctly approximate the magnitude of the first derivative, the values in each half of the mask must sum to plus one or minus one. Experiments confirm the general nature of such masks as found by Canny and by other authors. This method can be used when it is desired to find the best edge masks to use for a particular imaging situation using particular hardware. Variations of this method can be used to find optimal detectors for other types of image phenomena, for example corner detectors and texture energy measures.