sobel3d — 3D feature op

• Data kinds: voxel → gradient

• Call: import fullseye as fs; fs.ledger.sobel3d(vol, device='cpu') (to call the implementation directly, import match3d; match3d.sobel3d(vol, device='cpu'); from the registry, ops3d.get("sobel3d"))

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

• GPU: this op has a GPU path (device="cuda")

Usage

The 3-D gradient (gz, gy, gx). Separable conv3d of the derivative [-1,0,1] × the smoother [1,2,1].

vol is accepted as numpy or as a torch tensor (also on the GPU) (for keeping data resident on the device, e.g. scene_flow).

Returns 3 torch tensors (not numpy), each (1,1,D,H,W) float32, on device. gz is the derivative along axis 0, gy along axis 1, gx along axis 2 (if the input is (D,H,W), in (depth,row,col) order). To get numpy back, use g[0, 0].cpu().numpy().

Gain: derivative [-1,0,1] (2 for slope 1) × smoothing [1,2,1] on the other 2 axes (4 each) yields 32 times the true gradient (not normalised). If you need the true value, divide by 32 (curvature_maps / scene_flow_lk divide internally. hessian3d has gain 1, so take care when mixing them). Edges use replicate padding (no false edges at the boundary). A 3-D tensor input gets a batch dimension added; a 5-D one is used as is. dtype is cast down to float32.

Downstream: unit gradients for curvature_maps / match_shape_3d, normals for hough_plane_3d. For edge strength without direction, morph_gradient3d is an alternative.

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.

Runnable examples (verified samples that actually call this op)

• diff_features — py -3.11 examples_3d/diff_features.py

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

fuse_to_voxel

Same category (feature)

hessian3d · curvature_maps · edt_jfa · edt_jfa_vector · vol_frangi · vol_local_std · vol_local_thickness · vol_orientation_coherence


*Provenance: match3d.py — 3D 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.