Huemn home
Menu

Research / Image processing

From light to edges.

One photograph, two ways of reading it. Follow changes in intensity across the iris, eyelid and skin.

Aligned crops, photograph at left and its gradient field at right.
Drag the boundary to compare the photographic view with its gradient field.

A common input.

The study begins with Kookaaa’s close-up photograph of a human eye. Both views use the same source and crop, so a change in the appearance of a feature comes from the transform. The photographic side has been cropped and tonally adjusted for this presentation.

Compute the local change.

Convert the encoded RGB channels to a weighted intensity image. Smooth it with a Gaussian of σ = 1.3 pixels, then apply horizontal and vertical Sobel filters with reflected boundaries. Together the two derivatives give the direction and magnitude of the local intensity change.

g = (Gx, Gy)
magnitude = √(Gx² + Gy²)
angle = atan2(Gy, Gx)

Brightness encodes the clipped magnitude relative to the image’s 99.5th percentile. A violet-to-cyan mapping encodes orientation with 180° symmetry. This palette is a display convention. Eyelashes, skin texture and lighting boundaries can all produce strong responses.

Read the spatial spectrum.

A second view subtracts the mean intensity, applies a two-dimensional Hann window and computes the magnitude of a centered Fourier transform. Values near the center represent lower spatial frequencies. The log display compresses large magnitude differences so finer structure remains visible.

Centered Fourier-magnitude image with brighter low frequencies at its center.
Windowed Fourier magnitude of the source image. The display is contrast-scaled.

What follows from this computation.

The output describes spatial structure in one image. It establishes no identity, liveness, attention, diagnosis or learned-model performance.

Source and reproduction.

Photograph
Kookaaa · Close up shot of the human eye, 9 August 2024 · CC0 1.0.
Computation
NumPy, SciPy and Pillow. The supplied script builds the display crops, frequency image and gradients from the credited original.