typed op• 데이터 종류: qimage → qimage
• 호출: fullseye.apply(img, "tb_qft2", a=0.5, b=0.5)(2-D 는 이미지 1 장 + 스칼라 노브 2 개 a,b∈[0,1] 모델)

*그림은 128×128 합성 입력에서 실제로 실행한 출력. 왼쪽이 입력, 오른쪽이 출력. 점군은 위에서 본 산점도(밝기 = z), 1-D 열은 꺾은선, 볼륨은 z 방향 최대값 투영, 동영상은 가운데 프레임, 복소 영상은 진폭이며, 그림이 되지 않는 반환값은 값 자체를 표시한다.*
*노브 a 는 출력을 바꾸지 않는다(실측: 0.1 / 0.5 / 0.9에서 동일).*
*노브 b 는 출력을 바꾸지 않는다(실측: 0.1 / 0.5 / 0.9에서 동일).*
단계(앞에 오는 op → 이 op, 왼쪽에서 오른쪽으로):
▸ tb_qft2: 단계 (문서 사이트)
다른 영상에서도(합성 장면 / 사진 / 동전. 윗줄이 입력, 아랫줄이 그 출력. 노브는 기본값):
▸ tb_qft2: 다른 입력 이미지 (문서 사이트)
사원수(초복소수) 2차원 푸리에 변환. → (H, W, 4) 중심 정렬된 스펙트럼.
> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.
The colour analogue of complexops.cx_fft: a colour image is transformed as one hypercomplex signal rather than three unrelated real ones. The kernel is exp(-mu * 2*pi*(u*x/W + v*y/H)) for a unit pure quaternion *mu* (default: the grey axis of RGB, Sangwine's choice), and because quaternions do not commute the kernel can be applied on either side:
• side="left" — F[u,v] = sum_{x,y} E(x,y,u,v) * f[x,y]
• side="right" — F[u,v] = sum_{x,y} f[x,y] * E(x,y,u,v)
The argument is required. Left and right are not a sign convention. On the fuzzer's (32, 32) dichromatic render they differ by max|F_L - F_R| = 19.11 against a peak modulus of 1045 (1.8 % of full scale) and on a random colour field by 33.35 against 892.9 (3.7 %; another seed gives 34.05 against 892) — with no exception and no NaN to mark the difference. Mixing them across a round trip is much worse, because there the disagreement is not attenuated by the spectrum's dynamic range: iqft2(qft2(q, "left"), "right") returns an image whose error reaches 1.113 on data whose own range is 0.9994 — a completely different picture that still looks like a picture. (On the grey-axis-dominated dichromatic render the same mistake costs only 0.054 against a range of 1.076, which is the dangerous case: a 5 % error is exactly the size that survives a visual check.)
The spectrum is returned centred (DC at the array centre, via fftshift), matching the convention complexops.cx_fft established for the cimage sort. iqft2 un-centres before inverting, and the round trip is exact: measured max|iqft2(qft2(q, s), s) - q| = 2.22e-15 for both sides on a standard-normal (32, 32, 4) field.
Every quaternion splits as q = A + B*nu with A, B in the commutative subfield generated by mu (the *symplectic decomposition*, Ell & Sangwine 2007). The kernel commutes with A and *anti*-commutes past nu, so the whole transform reduces to two ordinary complex FFTs — for the left transform both with the standard kernel, for the right one of them with the conjugate kernel. That reduction is what makes left and right differ, and it is verified against a brute-force O(N^2) quaternion DFT written straight from the definition, on a 4x4 image, for three different mu and both sides: the largest disagreement over all six combinations is 8.2e-15. The fast path is checked against the definition, not against itself. The choice of the internal nu is likewise verified not to matter (two different nu, max difference 1.4e-14 — see _mu_basis).
Because the decomposition above is *linear* in the channels, the QFT is a fixed recombination of the three per-channel complex FFTs: rebuilding qft2(q, "left") from three numpy.fft.fft2 calls on the R, G and B planes agrees to max|err| = 1.14e-13. So this transform buys no information a channelwise FFT does not already contain, and this module does not claim it does. It also does not buy speed — it moves four real transforms' worth of data where the channelwise route moves three, and pays for the symplectic pack/unpack on top: measured on (256, 256), best of 20, 8.246 ms against 3.409 ms, i.e. 2.42x slower (run to run, 2.3x-2.4x). What it buys is that the four numbers stay one algebraic object, so a rotor can be applied to the spectrum and the colour meaning of mu survives the transform.
Raises ValueError: *qimage* is not a valid (H, W, 4) field; *side* is not 'left' / 'right'; *mu* is not a finite non-zero 3-vector.
Typed bridge of the quat op qft2 into the 2-D evolution registry: the same implementation, called under the op(v, a, b) convention. This op has no tunable parameter; a and b are unused.
• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.
• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.
아래 프로그램은 실제로 실행됨을 확인했습니다(그림과 같은 입력). Studio 도움말에서는 이 블록이 버튼이 되어 즉시 불러와 실행할 수 있습니다.
img_to_rgb 0.50 0.50 tb_rgb_to_quaternion 0.50 0.50 tb_qft2 0.50 0.50
아래 예제는 원래의 대장 op qft2를 호출한다. 이 브리지 op는 같은 구현을 fn(v, a, b) 규약에 맞춘 것뿐이므로 동작은 그대로 적용된다(호출 형식만 다름).
• quaternion_monogenic — py -3.11 examples/quaternion_monogenic.py
qimage 를 입력으로 받는 것)identity · tb_quaternion_to_rgb · tb_quat_norm · tb_quat_conjugate_image · tb_quat_normalize_image · tb_monogenic_amplitude · tb_monogenic_phase · tb_monogenic_orientation
typed)tb_points_to_voxel · tb_estimate_point_normals · tb_iss_keypoints · tb_project_points · tb_render_point_depth · tb_statistical_outlier_removal · tb_radius_outlier_removal · tb_voxel_grid_downsample
*Provenance: ops.py — 2D 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.