ph_total_variation_flow — 2D physics op

• Datenarten: image → image

• Aufruf: fullseye.apply(img, "ph_total_variation_flow", a=0.5, b=0.5) (das 2-D-Modell ist ein Bild plus zwei skalare Regler a,b∈[0,1])

• GPU: ja (mechanischer GPU-Pfad aus der Allow-List, CuPy). device="auto" wählt die GPU ab der gemessenen Größe (4,194,304 Pixel)

ph_total_variation_flow: input → output

*Die Abbildung ist die tatsächliche Ausgabe auf einer synthetischen 128×128-Eingabe. Links Eingabe, rechts Ausgabe. Punktwolken als Draufsicht-Streudiagramm (Helligkeit = z), 1-D-Reihen als Linie, Volumen als Maximum-Projektion entlang z, Videos als mittleres Bild, komplexe Bilder als Betrag; Rückgabewerte, die kein Bild ergeben, werden als Werte gezeigt.*

*Die Ausgabe ist in einer viridis-artigen Falschfarbe dargestellt (dunkles Violett = klein, Gelb = groß), damit ein Feld von Größen — Abstand, Phase, Orientierung, Tiefe — lesbar ist.*

Regler a durchfahren (0,1 / 0,5 / 0,9, der andere Regler auf Standard):

▸ ph_total_variation_flow: Regler a durchfahren (Doku-Website)

Regler b durchfahren (0,1 / 0,5 / 0,9, der andere Regler auf Standard):

▸ ph_total_variation_flow: Regler b durchfahren (Doku-Website)

Auf anderen Bildern (synthetische Szene / Foto / Münzen. Obere Reihe: Eingaben, untere Reihe: deren Ausgaben. Regler auf Standard):

▸ ph_total_variation_flow: andere Eingaben (Doku-Website)

*Die 4. Spalte ist eine Farb-Eingabe (H,W,3). Dieser Op verarbeitet Farbe, ohne Kanäle zu vermischen (er faltet den Farbkanal nicht als dritte Raumachse).*

Verwendung

Diffusionsfluss zur Rauschunterdrückung mittels Totalvariation (Rudin-Osher-Fatemi) (kein HALCON-Operator, "").

> Die ausführliche Beschreibung unten ist der Originaltext — Zusammenfassung und Überschriften sind übersetzt.

Gradient descent of the ROF energy TV(I) + (lam/2)||I - I0||^2:

I_t = div(grad I / |grad I|) - lam (I - I0).

The TV term (curvature of the level sets) flattens noise while preserving sharp edges; the fidelity term keeps the result anchored to the noisy input I0 so it denoises rather than collapsing to a constant. a sets the step count (1..80 explicit steps of dt=0.008), b the fidelity weight lam in [10, 30] (b=0 smooths most, b=1 stays closest to the input).

The steps march towards the ROF minimiser, a fixed point: once the fidelity has had time to act (lam * steps * dt of a few units, reached by a ~ 0.5 at b=0) more steps no longer change the answer, so raising a never turns a denoiser into a blur. A flat region of perimeter P and area A loses about (P/A)/lam of its contrast at the fixed point, so small features fade more than large ones (the usual ROF bias); raise b for light noise.

Until 2026-11-05 lam was 0.02..0.22: its time constant 1/lam (4.5..50) was far longer than the whole run (80 * 0.008 = 0.64), so the fidelity did nothing, the op was a pure TV flow drifting to a constant, and the error against the clean image grew with a (noisy square, sigma 0.05: 0.019 at a=0.1, 0.067 at a=1, worse than the noisy input's 0.050; even a clean input lost 0.067).

The curvature term is the mean of the four forward/backward staggerings (forward gradient + backward divergence and its mirror, per axis), so the flow commutes with flipping the image. Until 2026-11-05 (adversarial review round 2) only the forward-gradient / backward-divergence pair was used, and flipping the input changed the result by up to 0.15.

Ausführlicher Anwendungsleitfaden

• Leitfaden zur Familie gallery2d_physics_alife_3d

Referenzen (Beispieldaten, Literatur)

• Katalog der Beispieldaten (Download-URLs / Lizenzen) — 2-D nutzt skimage.data (BSD/Public Domain) plus synthetische Bilder, 3-D nennt Download-URLs echter Datenquellen (Stanford, PDS, …).

• Herkunft und Literatur der Operatoren — die Quellen der Forschung/Verfahren, auf denen diese Operatorfamilie beruht.

• Der kanonische Algorithmus (Autor, Jahr) und seine Anwendungen stehen im Familienleitfaden oben.

In Studio ausprobieren

Das Programm unten ist nachweislich lauffähig (gleiche Eingabe wie die Abbildung). In der Studio-Hilfe wird dieser Block zu Schaltflächen, die es sofort laden und ausführen.

ph_total_variation_flow 0.50 0.50

▸ Diese Pipeline laden  ·  Laden & ausführen

Ausführbare Beispiele (verifizierte Samples, die diesen Operator wirklich aufrufen)

• find_ops_by_meaning — py -3.11 examples/find_ops_by_meaning.py

• gallery2d_physics_alife_3d — py -3.11 examples/gallery2d_physics_alife_3d.py

Typkompatible Folge-Operatoren (nehmen image als Eingabe)

identity · gaussian · mean_box · mean_box_wh · bilateral · kuwahara · unsharp · median

Gleiche Kategorie (physics)

ph_perona_malik · ph_coherence_enhancing_diffusion · ph_reaction_diffusion · ph_heat_flow · ph_mean_curvature_motion


*Provenance: ops.py — 2D Operator-Registry. Diese Notiz wird von tools/opdocs.py md erzeugt (nicht von Hand bearbeiten).*

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