The Eikonal equation is an approximation used in solving wave equations, and it turns out to also be good for stripes! We try to make a phase map, ( p), based on the brightness of the image ( I), with \nabla p = 2\pi |(1-I)/ L_{min}|, where L_{min} is the minimum wavelength desired. This can be approximately solved with the gray-weighted distance transform, which builds a solution outward from a set of seed points.

For example, here’s Lena with a different seed points. The first starts at the center, the second starts at the top and sides of the image, and the third starts at detected edges in the image.