fullseye

polarization_demosaic_color — OPTICS polarization op

使い方

Split a colour polarisation-sensor mosaic (Sony IMX250MYR family, a 4x4 block = a 2x2 Bayer block whose every colour site is itself a 2x2 block of polarisers) into four RGB images: (4, H, W, 3) in :data:POLARIZATION_SWEEP_ANGLES order, each channel interpolated to full resolution. The rgbvolume sort carries it (four “slices” of RGB).

Two closed forms composed, no new estimate: (1) the pixels at each of the four polariser positions form a plain Bayer mosaic at half resolution, so each is demosaicked with :func:gfx2d.raw_demosaic_bilinear and written back to its positions — after which every pixel has RGB and the polarisation mosaic is still interleaved; (2) each RGB channel is then a monochrome polarisation mosaic, handled by :func:polarization_demosaic. This is the decomposition Polanalyser documents for that sensor; bayer is the pattern of the half-resolution Bayer grid (RGGB for the IMX250MYR as read row-major from the top-left site) and layout the polariser angles inside a site.

Ground truth: twelve affine planes (4 angles x RGB) mosaicked and split come back to 1e-12 away from the border (bilinear is exact on affine fields, and the composition of two exact steps is exact).

Raises ValueError: raw is not 2-D, has a height or width that is not a multiple of 4, is non-finite, or layout / bayer is invalid.

ファミリ共通の入力契約(fail-closed)

optics の全 op は入力を検証してから計算する(黙って通さない):

詳しい使い方ガイド

参考(サンプルデータ・文献)

実行できる例(この op を実際に呼ぶ検証済みサンプル)

型が繋がる次の op(rgbvolume を入力に取れる)

—

同カテゴリ(polarization)

jones_element · jones_apply · stokes_from_jones · mueller_element · mueller_apply · stokes_analyze · polarization_demosaic · mueller_from_intensities


Provenance: optics.py — OPTICS operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。

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