poisson_blend — COLORTRANSPORT blend op

• Data kinds: image2d × image2d × mask → image2d

• Call: import fullseye as fs; fs.ledger.poisson_blend(src, dst, mask, offset=(0, 0)) (to call the implementation directly, import colortransport; colortransport.poisson_blend(src, dst, mask, offset=(0, 0)); from the registry, opscolortransport.get("poisson_blend"))

• Return value through the ledger: fullseye.ledger.poisson_blend(...) returns only the declared out type image2d (the underlying function also returns auxiliary values). When you need what was dropped, use fullseye.ledger.poisson_blend.raw(...) or call colortransport.poisson_blend directly.

Usage

Seamless compositing that carries the gradient field (Pérez, Gangnet & Blake, SIGGRAPH 2003).

Inside mask it keeps the gradient of src and solves for the image that equals the values of dst on the boundary. Hence the output satisfies the following 2 properties by construction, and that serves as a cross-check of correctness:

• the Laplacian inside matches the Laplacian of src (up to the residual of the solve)

• outside the mask it matches dst exactly (not 1 pixel is touched)

The colour of the pasted object changes. That is the purpose of the operation, but if you feed it as-is into a use such as "measure the colour of the pasted object", what you measure is the colour of the destination. The return value is (blended, info), and info["changed_pixels"] and info["max_shift"] tell how much actually moved.

Parameters

src : array_like

The picture to paste. (H, W) or (H, W, C).

dst : array_like

The destination. At least as large as src.

mask : array_like

Boolean of the same (H, W) as src. It must not touch the border

(explicitly rejected, because the boundary condition cannot be taken).

offset : (int, int)

(row, col) at which the top-left of src is placed within dst.

Returns

(ndarray, dict)

Background guides (the physics and conventions behind this op)

• colorimetry — Colorimetry and spectra — colour is fixed only by spectrum × illuminant × observer

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• color_transport — py -3.11 examples/color_transport.py

Ops the type connects to (they accept image2d as input)

histogram_match

Same category (blend)

—


*Provenance: colortransport.py — COLORTRANSPORT operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.