Photo Node-Gallery

Period
2026
Contribution
Design, development, and photography
Status
Live interactive archive

An interactive photography archive that connects images through colour. I built the image-processing pipeline, neighbour-generation algorithm and graph interface, bringing an arrangement of printed photographs into a digital space.

Photo Node-GalleryGraph

Browsing by colour

The project began with photographs on my bedroom wall. While arranging my prints, I found that grouping similar colours gave the collection a pleasing visual structure. Complementary colours helped neighbouring groups meet, creating connections between photographs of different subjects.

Printed photographs arranged across a bedroom wall in groups of similar colours, with contrasting colours where the groups meet.
The bedroom photo wall that inspired Photo Graph.

I wanted to explore that arrangement digitally. A graph lets each photograph connect to several others, so viewers can follow relationships through the collection instead of choosing a category first. The implementation currently models similar-colour connections; the complementary relationships on the wall remain outside its comparison model.

Building it involved three decisions: how to represent a photograph's colour, which comparisons should become links, and how to arrange those links while keeping the photographs readable.

Defining what “similar” means

I started with a simple descriptor: the average RGB colour of each photograph, converted into a CIELAB vector. The average provides a broad signal about the image's colour cast and illumination. It is also easy to inspect: I can display the descriptor as a swatch beside the photograph and see what the reduction has preserved.

The processing order matters. I average the RGB channels across the analysis image, then convert that average into LAB. This produces three coordinates,

[L∗,a∗,b∗][L^*, a^*, b^*]: lightness, a green-to-red axis and a blue-to-yellow axis.

For photograph Iᵢ, the representation and comparison are:

vi=Lab⁡ ⁣(meanRGB⁡(Ii))dij=ΔE00(vi,vj)\begin{aligned} \mathbf{v}_i &= \operatorname{Lab}\!\left(\operatorname{meanRGB}(I_i)\right) \\ d_{ij} &= \Delta E_{00}(\mathbf{v}_i, \mathbf{v}_j) \end{aligned}

CIEDE2000 adjusts differences in lightness, chroma and hue to account for perceptual unevenness in LAB. Chroma describes how far a colour is from neutral; hue describes its colour direction. The formula includes a chroma–hue interaction, so its result is more involved than the straight-line distance between the three coordinates.

The descriptor makes this comparison compact, but also limits what it can recognise. Separate blue and magenta regions in a performance photograph collapse into one average. Different colour distributions can produce similar vectors, and the positions of objects and colours disappear entirely. The graph therefore follows overall colour affinity, with no knowledge of what a photograph depicts.

People at a performance under blue and magenta lights.
RGB
22.7 · 37.3 · 140.4
LAB
21.669 · 34.237 · -58.043
A crowd facing a stage under blue light.
RGB
44.5 · 46.5 · 176.8
LAB
28.649 · 43.350 · -68.667

CIEDE2000 difference 5.933

Inspect the arithmetic
CIEDE2000: adjusted differences divided by perceptual scales
TermDifferenceScaleNormalised
Lightness+6.9801.367+5.107
Chroma+13.8184.343+3.181
Hue+2.2341.534+1.456

ΔE₀₀ = √(26.081 + 10.121 + 2.120 + (-3.117)) ≈ 5.933

The interaction is signed; values are rounded only for display.

Euclidean reference: ΔE₇₆ = √(ΔL*² + Δa*² + Δb*²) ≈ 15.640

Shared comparison code

I compared this baseline with a mean in Oklab, a 64-component Oklab histogram and a weighted palette compared using Earth Mover distance. The histogram and palette preserve more of an image's colour distribution, but neither outperformed mean LAB with CIEDE2000 on the top-four criterion in my small manual review. I retained the simpler representation for this archive. The review covered seven hand-picked queries, so I treat it as a model-selection aid; a stronger assessment would use new queries and separately collected judgments.

Colour-model comparison and review method

The saved 26 August 2026 benchmark covered 100 photographs. For each of seven queries, I selected eight positive and eight negative examples based on colour and tone. I filtered each model's ranking to those 16 judged candidates, then counted positives in the first four positions. This gives 28 evaluated positions across the seven queries.

Positive results among the first four judged candidates per query.
ConfigurationPositive positions
Mean LAB / CIE7624 / 28
Mean LAB / CIEDE200025 / 28
Mean Oklab21 / 28
Oklab histogram / Hellinger23 / 28
Oklab palette / Earth Mover20 / 28

CIEDE2000 gained one positive position over CIE76 in this review. The same queries informed model selection. Unjudged photographs were excluded from the score rather than counted as incorrect, so the counts do not describe the first four neighbours from the complete archive.

Graph cutoffs also differed: CIEDE2000 used 16 and CIE76 used 19. Connectivity depends on these settings as well as the comparison formula. The benchmark describes the saved August extraction, separately from the worked example and live archive.

A snow-covered street lined with trees at night.

Snow / pale neutral

Dense texture across a wall of perforated metal panels.

Dense neutral texture

A high-contrast scene with magenta light and layered lettering.

Magenta performance light

A black-and-white view down a narrow alley.

Dark monochrome

An amber-lit interior with carved wood and a row of statues.

Warm amber interior

Dense green woodland around a clearing.

Woodland green

People at a performance under blue and magenta lights.

Deep blue atmosphere

The photographs used for the saved colour-affinity review.

Turning similarity into a useful graph

With 100 photographs, comparing every unique pair requires 4,950 calculations. That is manageable during preprocessing, but drawing every pair would overwhelm the images. I select a sparse set of relationships:

  1. Calculate colour differences between photographs.
  2. Exclude candidates beyond the colour-difference cutoff.
  3. Keep up to four nearest neighbours for each photograph.
  4. Combine those directional selections into undirected links.
  5. Convert the retained differences into weights for the layout.

The neighbour limit applies to each photograph's selections. Its final number of links can be higher because other photographs can select it too. A connection therefore survives when either end chooses the other.

For colour difference d and cutoff τ, I calculate the link weight as:

s=max⁡ ⁣(0,min⁡ ⁣(1,1−dτ))s = \max\!\left(0,\min\!\left(1,1-\frac{d}{\tau}\right)\right)

Closer matches receive larger weights. At the cutoff, the weight reaches zero and no link is retained. The cutoff therefore affects both which relationships appear and the weights of the surviving links.

Increasing the neighbour limit gives photographs more connections, but adds clutter. Tightening the cutoff can leave photographs isolated. I used the manual colour review alongside visual inspection of the graph to settle on the current defaults: up to four neighbours and a CIEDE2000 cutoff of 16.

In the worked example, Harbour is Performance's third-nearest candidate, with a colour difference of 15.467. Its weight is only 0.033, placing it just inside the cutoff. A small reduction in the cutoff removes that connection. This makes it a useful example of how the browsing rules affect the graph.

Photograph 1Photograph 3Photograph 4Photograph 5Photograph 7Photograph 8Photograph 9Photograph 10Photograph 11Photograph 12Photograph 13Photograph 14Photograph 15Photograph 16Photograph 18Photograph 19Photograph 20Photograph 21Photograph 24HarbourPhotograph 28Photograph 29Photograph 30Photograph 31Photograph 32Photograph 33Photograph 34Photograph 35Photograph 36Photograph 37Photograph 38Photograph 39Photograph 40Photograph 41Photograph 43Photograph 45Photograph 46Photograph 47Photograph 48Photograph 49Photograph 50Photograph 51Photograph 55Photograph 56Photograph 57Photograph 61Photograph 63Photograph 64Amber interiorPhotograph 66Photograph 67Photograph 68Photograph 69Photograph 70Photograph 72Photograph 73Photograph 74Photograph 75Photograph 76Photograph 78Photograph 81Photograph 82Photograph 83Photograph 84Photograph 86Photograph 87Photograph 88Photograph 89Photograph 91Photograph 92Photograph 93Photograph 94Photograph 95Photograph 96Photograph 97Photograph 98Photograph 99Photograph 101Photograph 103Photograph 104Photograph 105Photograph 106Photograph 107Photograph 108Photograph 109Photograph 110Photograph 111PerformancePhotograph 113Photograph 114Photograph 115Photograph 116Photograph 117Photograph 118Photograph 119Photograph 120Photograph 121Photograph 122Photograph 124Photograph 125

252 links · 2 isolated photographs

Nearest candidates to Performance; selected candidate kept in view
PhotographΔE₀₀Link weight
1. Photograph 755.9330.629Nominated
2. Photograph 2415.1960.050Nominated
3. Harbour15.4670.033Nominated
4. Photograph 3219.259No linkBeyond cutoff

Both inspectors use a frozen extraction of 100 photographs dated 4 November 2026. The neighbour map keeps positions fixed while its links change. This snapshot is separate from the live archive. Its data fixture and preparation notes record the source images, descriptors and extraction settings.

Making the graph usable

Image analysis and neighbour generation happen when the archive is updated. The browsing interface loads the precomputed graph, so panning and zooming do not require decoding original images or comparing photographs again.

A force layout lets a photograph be drawn toward several related images at once. Stronger link weights favour shorter distances and stronger attraction; repulsion spreads the collection out. The resulting positions reflect those competing influences across the graph.

Photographs occupy rectangles rather than points. I preserve their aspect ratios and use rectangle collisions to account for their different dimensions. Preferred link spacing also considers image size, reducing overlap between large photographs.

Rendering is handled separately from the simulation. Images load near the viewport and upgrade resolution as zoom and device pixel ratio require it. The canvas follows its container size, and narrow screens retain a pannable view rather than fitting the whole collection into tiny thumbnails.

The layout is a way to explore the relationships. Moving a photograph changes its screen coordinates while its colour vector and calculated differences stay the same. Nearby images may also be positioned together because of their other neighbours, so screen distance is only a visual expression of the graph's relationships.

Updating the archive

Adding a photograph can change the nearest neighbours of existing photographs as well as introducing a new node. The admin pipeline prepares image features, uploads the original and generates the affected relationships. Cloudflare R2 delivers published images; Supabase stores metadata and graph state.

One failure I needed to handle was a committed upload whose response never reaches the browser. Repeating an ordinary insert could create duplicates. Instead, each batch has a stable identity: retrying a completed batch returns its recorded result, while reusing that identity with a different payload is rejected.

A separate revision check handles concurrent updates. If the graph changes while relationships are being generated, registration rejects the stale work so it can be regenerated. New nodes, affected relationships and the accepted batch result are committed together in a database transaction.

Recovering interrupted uploads

Before sending image bytes, the client records the batch's paths, checksums and upload phase in a recovery journal. After an interruption, it can check which objects arrived and request any missing originals again. Recovery continues the same batch.

Object storage sits outside the database transaction. Originals are published before registration, and source cleanup follows a successful commit. Recovery objects are retained when an operation fails, while failed cleanup leaves the journal available for another attempt.

The registration tests cover rollback, rejection of stale generations and replay without duplicate nodes. These checks address failures at different points in the update, including a lost response after a successful commit.

The average-colour descriptor remains the clearest limitation. It can connect photographs with different distributions of colour and separate photographs whose lighting differs, even when their subjects are closely related. My next experiment would use a held-out review focused on those cases, testing whether a distribution-aware representation produces more useful browsing paths. That would give the added complexity a concrete purpose: preserving visual relationships that the current average cannot express.