signal op• 데이터 종류: signal → signal
• 호출: import fullseye as fs; fs.ledger.companding_mu_law(x, mu=255.0, bits=8)(구현을 직접 호출하려면 import dsp; dsp.companding_mu_law(x, mu=255.0, bits=8), 원장에서 가져오려면 ops1d.get("companding_mu_law"))
μ-법칙 압신 —— G.711 곡선을 임의의 1차원 신호에 적용.
> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.
Compress with `F(v) = sign(v) * ln(1 + mu|v|) / ln(1 + mu)` on the signal
scaled to `[-1, 1]`, quantise uniformly, expand back. The steps end up fine
near zero and coarse near full scale, which is the right allocation when the
interesting part of the signal is small compared with its peaks — speech,
vibration, anything with a large crest factor.
This is where mu-law comes from: the image operator
`companding_mu_law` is the same curve applied to intensity. Reporting both
keeps the family honest about which dimension the technique was designed for.
Applicability — it is the crest factor that decides. Measured on a sine
of amplitude *A* with one sample pinned at full scale, so the crest factor is
exactly `1/A` (mean square error relative to a uniform quantiser):
crest 50 4 bit 0.011 6 bit 0.014 (about 90x better)
crest 20 4 bit 0.122 6 bit 0.101
crest 6.7 4 bit 0.613 6 bit 0.616
crest 2.0 4 bit 4.22 6 bit 6.03 (several times WORSE)
So the rule is crest factor above roughly 7 — speech, vibration, impact.
Below that, a plain uniform quantiser wins and mu-law actively hurts.
★Note the peak is a single sample: on random signals of the same family
the advantage swung between 0.55 and 0.87 purely with the seed, because the
largest excursion sets the scale. Measure the crest factor of *your* signal,
do not assume it from the distribution.
Other limits: `mu` near 0 degenerates to uniform quantisation (that is how
you check the curve is doing anything), and the curve is fixed — unlike a
Lloyd-Max codebook fitted to the signal — which is the point when values must
stay comparable across recordings.
• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.
• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.
• 알고리즘의 정전(저자·연도)과 용도는 위의 패밀리 사용 가이드에 적혀 있습니다.
• gallery2d_gray_arith — py -3.11 examples/gallery2d_gray_arith.py
signal 를 입력으로 받는 것)create_funct_1d_array · create_funct_1d_pairs · smooth_funct_1d_gauss · smooth_funct_1d_mean · derivate_funct_1d · integrate_funct_1d · zero_crossings_funct_1d · local_min_max_funct_1d
signal)lowpass · highpass · bandpass · envelope · rms · local_std · quantize · resample
*Provenance: dsp.py — ONED 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.