dtof_cube_depth — PHOTON dtof op

데이터 종류: histcubedepth

호출: import photoncount; photoncount.dtof_cube_depth(cube, bin_ps=100.0, mode='peak', offset_ps=0.0, min_counts=1.0, empty_value=0.0, subtract_background=False)(또는 opsphoton.get("dtof_cube_depth"))

사용법

`(H, W, T)` 광자 히스토그램 큐브로부터의 깊이 맵 —— dToF 역문제.

> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.

The array version of :func:dtof_depth, with the same four *mode* estimators

and the same `t_flight = t_measured - offset_ps` sign convention. The time

axis is last: a `(D, H, W)` voxel volume passed in here would be read as

`W` time bins and return a plausible-wrong depth map, so the shape is

checked and the error message says exactly that.

Pixels whose total counts are below *min_counts* — and, in the peak-based

modes, pixels whose histogram is exactly flat (no peak to find, so

`argmax` would report bin 0 for every one of them) — are set to

*empty_value* (default 0.0, a value no real return can have since

`d > 0`). Set

`empty_value=float('nan')` if you would rather propagate a NaN — that is an

opt-in, never the default, because a NaN depth map silently poisons every

downstream reduction.

Where a sub-bin *mode* cannot be applied to a pixel — the peak is in the

first or last bin, or the three samples are flat / non-positive for the log

fit — that pixel **falls back to the bin-centre (`"peak"`) estimate**. A

per-pixel exception would be useless on a megapixel cube; the fallback is

documented here and pinned in the tests, and it degrades to the coarser

estimator rather than to a wrong one.

Ground truth: on a noiseless simulated cube of a tilted plane from 1.0 to

3.0 m (32x32 pixels, 256 bins x 100 ps, 500 ps IRF) the RMS depth error is

4.39 mm for `"peak", 3.2e-16 m for "centroid"`, 0.114 mm for

`"parabolic" and 1.6e-8 m for "gaussian"`. With Poisson noise (20

signal + 5 ambient photons per pixel, seed 0) the same four give 19.9 mm,

164.8 mm (background subtracted), 18.7 mm and 19.2 mm — at 20 photons the

estimator choice is worth about 6%, and the centroid is 8x worse than doing

nothing clever at all.

Returns a float64 `(H, W)` depth map in metres.

Raises `ValueError`: a cube that is not 3-D / has fewer than 2 time

bins / holds negative counts / exceeds :data:MAX_CUBE_ELEMENTS, a

non-positive *bin_ps*, an unknown *mode*, a negative *min_counts*, a

non-finite *empty_value* other than NaN, and — instead of returning negative

distances — an *offset_ps* that exceeds the measured arrival time of any

valid pixel (a mis-signed or mis-scaled calibration delay).

자세한 사용 가이드

photon_timeresolved 패밀리 가이드

참고(샘플 데이터·문헌)

• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.

• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.

• 알고리즘의 정전(저자·연도)과 용도는 위의 패밀리 사용 가이드에 적혀 있습니다.

실행 가능한 예제(이 연산자를 실제로 호출하는 검증된 샘플)

photon_timeresolvedpy -3.11 examples/photon_timeresolved.py

타입이 이어지는 다음 연산자(depth 를 입력으로 받는 것)

dtof_cube_simulate

같은 카테고리(dtof)

dtof_depth · dtof_cube_simulate


*Provenance: photoncount.py — PHOTON 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*

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