{'fraction_non_alphanumeric': 0.014345991561181435, 'fraction_numerical': 0.0, 'mean_word_length': 5.625698324022347, '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 Schrödinger formalism for simultaneously computing the Euclidean distance transform and its gradient density

In this work, we employ the well-known Hamilton-Jacobi to Schrödinger connection to present a unified framework for computing both the Euclidean distance function and its gradient density in two dimensions. Previous work in this direction considered two different formalisms for independently computing these quantities. While the two formalisms are very closely related, their lack of integration is theoretically troubling and practically cumbersome. We introduce a novel Schrödinger wave function for representing the Euclidean distance transform from a discrete set of points. An approximate distance transform is computed from the magnitude of the wave function while the gradient density is estimated from the Fourier transform of the phase of the wave function. In addition to its simplicity and efficient O(N log N) computation, we prove that the wave function-based density estimator increasingly, closely approximates the distance transform gradient density (as a free parameter approaches zero) with the added benefit of not requiring the true distance function.