@photivra/engine 2.15.0 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +102 -1
- package/CITATION.cff +1 -1
- package/README.md +6 -6
- package/SECURITY.md +1 -1
- package/THIRD_PARTY.md +38 -0
- package/dist/camera/lens-projection.d.ts +5 -0
- package/dist/camera/lens-projection.js +10 -0
- package/dist/camera/lens-projection.js.map +1 -1
- package/dist/capture/native-environment-lean.js +1 -1
- package/dist/capture/native-environment-lean.js.map +1 -1
- package/dist/capture/native-raw-development.d.ts +15 -0
- package/dist/capture/native-raw-development.js +12 -6
- package/dist/capture/native-raw-development.js.map +1 -1
- package/dist/capture/raw-development-kernel.d.ts +10 -3
- package/dist/capture/raw-development-kernel.js +25 -6
- package/dist/capture/raw-development-kernel.js.map +1 -1
- package/dist/core/internal-radiance-evaluator.d.ts +5 -2
- package/dist/core/internal-radiance-evaluator.js.map +1 -1
- package/dist/core/version.d.ts +1 -1
- package/dist/core/version.js +1 -1
- package/dist/core/version.js.map +1 -1
- package/dist/equipment/generic-lens-catalogue.d.ts +227 -0
- package/dist/equipment/generic-lens-catalogue.js +243 -0
- package/dist/equipment/generic-lens-catalogue.js.map +1 -0
- package/dist/facade/defocus-bokeh-zones.d.ts +33 -0
- package/dist/facade/defocus-bokeh-zones.js +53 -0
- package/dist/facade/defocus-bokeh-zones.js.map +1 -0
- package/dist/facade/defocus-image-space-provider.d.ts +118 -0
- package/dist/facade/defocus-image-space-provider.js +448 -0
- package/dist/facade/defocus-image-space-provider.js.map +1 -0
- package/dist/facade/diffraction-provider.d.ts +45 -0
- package/dist/facade/diffraction-provider.js +120 -14
- package/dist/facade/diffraction-provider.js.map +1 -1
- package/dist/facade/display-view-gpu-session.js +4 -0
- package/dist/facade/display-view-gpu-session.js.map +1 -1
- package/dist/facade/display-view-gpu.d.ts +10 -0
- package/dist/facade/display-view-gpu.js.map +1 -1
- package/dist/facade/display-view-lens-signal.d.ts +30 -0
- package/dist/facade/display-view-lens-signal.js +427 -0
- package/dist/facade/display-view-lens-signal.js.map +1 -0
- package/dist/facade/display-view.d.ts +21 -0
- package/dist/facade/display-view.js +66 -8
- package/dist/facade/display-view.js.map +1 -1
- package/dist/facade/expected-signal-setup.d.ts +7 -0
- package/dist/facade/expected-signal-setup.js +12 -2
- package/dist/facade/expected-signal-setup.js.map +1 -1
- package/dist/facade/expected-signal.d.ts +8 -0
- package/dist/facade/expected-signal.js +150 -0
- package/dist/facade/expected-signal.js.map +1 -1
- package/dist/facade/generic-lens-capture.d.ts +6 -0
- package/dist/facade/generic-lens-capture.js +8 -0
- package/dist/facade/generic-lens-capture.js.map +1 -0
- package/dist/facade/large-defocus-lattice.d.ts +39 -0
- package/dist/facade/large-defocus-lattice.js +64 -0
- package/dist/facade/large-defocus-lattice.js.map +1 -0
- package/dist/facade/scene-radiance.d.ts +5 -0
- package/dist/facade/scene-radiance.js +5 -2
- package/dist/facade/scene-radiance.js.map +1 -1
- package/dist/facade/simulate-capture.d.ts +148 -6
- package/dist/facade/simulate-capture.js +521 -88
- package/dist/facade/simulate-capture.js.map +1 -1
- package/dist/facade/simulate-display-view.js +29 -19
- package/dist/facade/simulate-display-view.js.map +1 -1
- package/dist/gpu/display-view-quality-gpu.d.ts +2 -9
- package/dist/gpu/display-view-quality-gpu.js +63 -13
- package/dist/gpu/display-view-quality-gpu.js.map +1 -1
- package/dist/gpu/display-view-speed-gpu.d.ts +2 -0
- package/dist/gpu/display-view-speed-gpu.js +47 -16
- package/dist/gpu/display-view-speed-gpu.js.map +1 -1
- package/dist/gpu/image-kernel-accelerator.js +3 -0
- package/dist/gpu/image-kernel-accelerator.js.map +1 -1
- package/dist/gpu/wgsl-display-view-quality-kernel.d.ts +4 -0
- package/dist/gpu/wgsl-display-view-quality-kernel.js +53 -2
- package/dist/gpu/wgsl-display-view-quality-kernel.js.map +1 -1
- package/dist/gpu/wgsl-display-view-speed-kernel.d.ts +15 -0
- package/dist/gpu/wgsl-display-view-speed-kernel.js +42 -1
- package/dist/gpu/wgsl-display-view-speed-kernel.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/optics/defocus-bokeh-kernel.d.ts +207 -0
- package/dist/optics/defocus-bokeh-kernel.js +380 -0
- package/dist/optics/defocus-bokeh-kernel.js.map +1 -0
- package/dist/optics/defocus-disc-kernel.d.ts +44 -21
- package/dist/optics/defocus-disc-kernel.js +47 -25
- package/dist/optics/defocus-disc-kernel.js.map +1 -1
- package/dist/optics/generic-lens-psf.d.ts +68 -0
- package/dist/optics/generic-lens-psf.js +337 -0
- package/dist/optics/generic-lens-psf.js.map +1 -0
- package/dist/optics/illumination-vignetting.d.ts +6 -0
- package/dist/optics/illumination-vignetting.js +24 -7
- package/dist/optics/illumination-vignetting.js.map +1 -1
- package/dist/optics/sensor-environment-query.d.ts +37 -0
- package/dist/optics/sensor-environment-query.js +58 -19
- package/dist/optics/sensor-environment-query.js.map +1 -1
- package/dist/optics/site-kernel-runs.d.ts +77 -0
- package/dist/optics/site-kernel-runs.js +200 -0
- package/dist/optics/site-kernel-runs.js.map +1 -0
- package/dist/output/generic-lens-corrections.d.ts +24 -0
- package/dist/output/generic-lens-corrections.js +51 -0
- package/dist/output/generic-lens-corrections.js.map +1 -0
- package/dist/processing/development-detail.d.ts +132 -0
- package/dist/processing/development-detail.js +325 -0
- package/dist/processing/development-detail.js.map +1 -0
- package/docs/AGENT_GUIDE.md +1 -0
- package/docs/API_REFERENCE.md +54 -1
- package/docs/QUICK_START.md +444 -26
- package/docs/USAGE.md +71 -8
- package/docs/api/capture-native-raw-development.md +16 -0
- package/docs/api/core-version.md +1 -1
- package/docs/api/equipment-generic-lens-catalogue.md +281 -0
- package/docs/api/exports.json +162 -2
- package/docs/api/facade-simulate-capture.md +151 -5
- package/docs/api/optics-defocus-bokeh-kernel.md +145 -0
- package/docs/api/optics-defocus-disc-kernel.md +25 -17
- package/docs/api/optics-sensor-environment-query.md +6 -0
- package/docs/api/output-generic-lens-corrections.md +39 -0
- package/llms.txt +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"development-detail.js","sourceRoot":"","sources":["../../src/processing/development-detail.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAA4B,MAAM,4BAA4B,CAAC;AAE3F,2FAA2F;AAC3F,MAAM,CAAC,MAAM,gCAAgC,GAAG,OAAgB,CAAC;AAOjE,6GAA6G;AAC7G,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC;IACrE,0BAA0B,EAAE,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACtD,mBAAmB,EAAE,GAAG,EAAE,mBAAmB,EAAE,GAAG;IAClD,qBAAqB,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC;IACrD,WAAW,EAAE,EAAE,EAAE,yBAAyB,EAAE,EAAE;CAC/C,CAAC,CAAC;AAEH,yFAAyF;AACzF,MAAM,4BAA4B,GAAG,kBAAkB,GAAG,IAAI,CAAC,EAAE,CAAC;AAElE,SAAS,QAAQ,CAAC,KAAc,EAAE,IAAY,EAAE,OAAe,EAAE,OAAe,EAAE,gBAAgB,GAAG,KAAK;IACxG,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,KAAK,GAAG,OAAO,EAA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AAI,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAE,GAAG,OAAO,CAAC,CAAC;IAC9F,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,WAAW,EAAE,CAAC;AAC9D,CAAC","sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Development detail stages (#552), both opt-in and off by default:\n *\n * - **Diffraction correction**: a bounded, regularized (Wiener–Tikhonov) deconvolution of the developed linear RGB with the\n * diffraction OTF of an ideal circular pupil at the capture's working f-number. The OTF is zero beyond the cut-off\n * f_c = 1/(λ·N_w), so detail beyond it never reached the sensor; the filter's design gain there is 0 and it cannot, and\n * does not claim to, restore it.\n * - **Sharpening**: an unsharp mask (radius, amount, threshold) on the display-encoded values, after the tone curve and\n * gamut handling and before quantization. It raises edge contrast and creates halos; it adds no optical detail.\n *\n * Development order with these stages: (exposure gain) → demosaic → colour and white balance → diffraction correction\n * (linear) → rendering exposure and tone curve → gamut handling → sRGB transfer → unsharp mask → quantization (encode).\n *\n * Image edges are handled by clamping (edge pixels repeated). Both stages work on a whole in-memory image.\n * @see docs/DIGITAL_OPTICS_FOUNDATION.md for the equations, sources, trade-offs and limits.\n */\n\nimport { encodeSrgbComponent } from \"../color/srgb-transfer.js\";\nimport { InvalidConfigurationError } from \"../core/configuration-error.js\";\nimport { InvalidScientificResultError } from \"../core/validation.js\";\nimport { prepareSdrPixelTone, type SdrRenderingProfile } from \"../output/sdr-rendering.js\";\n\n/** Version of the `development-detail` model (diffraction correction and unsharp mask). */\nexport const DEVELOPMENT_DETAIL_MODEL_VERSION = \"0.1.0\" as const;\n\n/** Unsharp mask settings: Gaussian standard deviation in output pixels, gain on the detail signal, and threshold in encoded units [0, 1]. */\nexport interface UnsharpMaskSettings { radiusPixels: number; amount: number; threshold: number }\n/** Diffraction correction settings: design wavelength, Wiener noise-to-signal regularization, gain bound and FIR radius in pixels. */\nexport interface DiffractionCorrectionSettings { wavelengthNm: number; regularization: number; maximumGain: number; kernelRadiusPixels: number }\n\n/** Accepted ranges. Bounds are engineering limits on cost and on noise gain, not quality recommendations. */\nexport const DEVELOPMENT_DETAIL_LIMITS = /* @__PURE__ */ Object.freeze({\n maximumUnsharpRadiusPixels: 8, maximumUnsharpAmount: 5,\n minimumWavelengthNm: 380, maximumWavelengthNm: 780,\n minimumRegularization: 1e-4, maximumRegularization: 1,\n maximumGain: 10, maximumKernelRadiusPixels: 16\n});\n\n/** Third dark ring of the Airy pattern, in units of λ·N (j₁,₃/π, j₁,₃ = 10.1734681…). */\nconst AIRY_THIRD_ZERO_PER_LAMBDA_N = 10.173468135062722 / Math.PI;\n\nfunction finiteIn(value: unknown, name: string, minimum: number, maximum: number, minimumExclusive = false): number {\n if (typeof value !== \"number\" || !Number.isFinite(value) || (minimumExclusive ? value <= minimum : value < minimum) || value > maximum) {\n throw new InvalidConfigurationError(name + \" must be a finite number in \" + (minimumExclusive ? \"(\" : \"[\") + minimum + \", \" + maximum + \"].\");\n }\n return value;\n}\n\n/** Validates unsharp mask settings. */\nexport function parseUnsharpMaskSettings(value: UnsharpMaskSettings, path = \"sharpening\"): UnsharpMaskSettings {\n return { radiusPixels: finiteIn(value.radiusPixels, path + \".radiusPixels\", 0, DEVELOPMENT_DETAIL_LIMITS.maximumUnsharpRadiusPixels, true),\n amount: finiteIn(value.amount, path + \".amount\", 0, DEVELOPMENT_DETAIL_LIMITS.maximumUnsharpAmount, true),\n threshold: finiteIn(value.threshold, path + \".threshold\", 0, 1) };\n}\n/** Validates diffraction correction settings. */\nexport function parseDiffractionCorrectionSettings(value: DiffractionCorrectionSettings, path = \"diffractionCorrection\"): DiffractionCorrectionSettings {\n const radius = value.kernelRadiusPixels;\n if (typeof radius !== \"number\" || !Number.isSafeInteger(radius) || radius < 1 || radius > DEVELOPMENT_DETAIL_LIMITS.maximumKernelRadiusPixels) {\n throw new InvalidConfigurationError(path + \".kernelRadiusPixels must be an integer from 1 to \" + DEVELOPMENT_DETAIL_LIMITS.maximumKernelRadiusPixels + \".\");\n }\n return { wavelengthNm: finiteIn(value.wavelengthNm, path + \".wavelengthNm\", DEVELOPMENT_DETAIL_LIMITS.minimumWavelengthNm, DEVELOPMENT_DETAIL_LIMITS.maximumWavelengthNm),\n regularization: finiteIn(value.regularization, path + \".regularization\", DEVELOPMENT_DETAIL_LIMITS.minimumRegularization, DEVELOPMENT_DETAIL_LIMITS.maximumRegularization),\n maximumGain: finiteIn(value.maximumGain, path + \".maximumGain\", 1, DEVELOPMENT_DETAIL_LIMITS.maximumGain), kernelRadiusPixels: radius };\n}\n/** Default FIR radius: the Airy pattern's third dark ring (3.2383·λ·N_w) in pixels, rounded up, within 1..16. */\nexport function defaultDiffractionCorrectionRadiusPixels(workingFNumber: number, wavelengthNm: number, pixelPitchMicrometers: number): number {\n const sites = Math.ceil(AIRY_THIRD_ZERO_PER_LAMBDA_N * wavelengthNm / 1000 * workingFNumber / pixelPitchMicrometers);\n return Math.min(DEVELOPMENT_DETAIL_LIMITS.maximumKernelRadiusPixels, Math.max(1, sites));\n}\n\n/**\n * Incoherent OTF of an ideal, aberration-free circular pupil at normalized frequency s = f/f_c:\n * H(s) = (2/π)(acos s − s·√(1 − s²)) for s < 1, and 0 for s ≥ 1 (MIT OCW 2.71, lectures 21–22; Goodman, §7.3).\n */\nexport function circularPupilDiffractionMtf(normalizedFrequency: number): number {\n const s = Math.abs(normalizedFrequency);\n if (s >= 1) return 0;\n return 2 / Math.PI * (Math.acos(s) - s * Math.sqrt(1 - s * s));\n}\n\n/** A designed diffraction correction filter and what its response does. Frequencies are in cycles per pixel. */\nexport interface DiffractionCorrectionFilter {\n settings: DiffractionCorrectionSettings;\n workingFNumber: number;\n pixelPitchMicrometers: number;\n /** f_c · pitch = pitch/(λ·N_w): the diffraction cut-off. The sampling Nyquist frequency is 0.5. */\n cutoffCyclesPerPixel: number;\n /** Fraction of the Nyquist square |fx|, |fy| ≤ 0.5 lying beyond the cut-off, where the lens transmitted nothing. */\n nyquistAreaBeyondCutoffFraction: number;\n /** Largest gain of the designed (untruncated) response: min(maximumGain, max over s of H(1+α)/(H² + α)). */\n designPeakGain: number;\n /** Largest |response| of the windowed, truncated FIR over a 1/64-cycle grid of the Nyquist square. */\n responsePeakGain: number;\n /**\n * Largest |response| of the FIR at grid frequencies beyond the cut-off (null when the whole Nyquist square is inside it).\n * The design is 0 there; a non-zero value is truncation leakage that passes noise and aliased signal, never lost detail,\n * because the optics delivered no signal at those frequencies.\n */\n responseMaximumBeyondCutoff: number | null;\n /** Row-major (2R+1)² weights summing to 1; weights[(dy + R)(2R + 1) + dx + R]. */\n weights: Float64Array;\n}\n\n/**\n * Designs the bounded Wiener–Tikhonov correction. In frequency (normalized s = ρ/f_c, ρ the radial frequency):\n * G(s) = min(maximumGain, H(s)·(1 + α)/(H(s)² + α)), G(0) = 1, and G(s) = 0 for s ≥ 1,\n * where α is the regularization (an assumed noise-to-signal power ratio, Wiener's K). The response is sampled on an M × M\n * grid (M a power of two ≥ max(64, 4(2R + 1))), inverse transformed, truncated to the (2R + 1)² window with a radial raised\n * cosine taper and renormalized to unit sum. The achieved response is then measured, not assumed.\n */\nexport function designDiffractionCorrectionFilter(input: { workingFNumber: number; pixelPitchMicrometers: number; settings: DiffractionCorrectionSettings }): DiffractionCorrectionFilter {\n const settings = parseDiffractionCorrectionSettings(input.settings);\n const workingFNumber = finiteIn(input.workingFNumber, \"workingFNumber\", 0, 1e4, true), pitch = finiteIn(input.pixelPitchMicrometers, \"pixelPitchMicrometers\", 0, 1e4, true);\n const cutoff = pitch / (settings.wavelengthNm / 1000 * workingFNumber), alpha = settings.regularization, bound = settings.maximumGain;\n const gainAt = (rho: number): number => {\n const h = circularPupilDiffractionMtf(rho / cutoff);\n return h === 0 ? 0 : Math.min(bound, h * (1 + alpha) / (h * h + alpha));\n };\n const R = settings.kernelRadiusPixels, size = 2 * R + 1;\n let M = 64;\n while (M < 4 * size) M *= 2;\n // A(ky, x) = Σ_kx G cos(2π kx x/M); h(x, y) = (1/M²) Σ_ky cos(2π ky y/M) A(ky, x). G is even in each axis, so h is real and even.\n const cosTable = new Float64Array(M * (R + 1));\n for (let k = 0; k < M; k++) for (let x = 0; x <= R; x++) cosTable[k * (R + 1) + x] = Math.cos(2 * Math.PI * k * x / M);\n const A = new Float64Array(M * (R + 1));\n for (let ky = 0; ky < M; ky++) {\n const fy = (ky < M / 2 ? ky : ky - M) / M;\n for (let kx = 0; kx < M; kx++) {\n const fx = (kx < M / 2 ? kx : kx - M) / M, g = gainAt(Math.hypot(fx, fy));\n if (g === 0) continue;\n for (let x = 0; x <= R; x++) A[ky * (R + 1) + x]! += g * cosTable[kx * (R + 1) + x]!;\n }\n }\n const quarter = new Float64Array((R + 1) * (R + 1));\n for (let y = 0; y <= R; y++) for (let x = 0; x <= R; x++) {\n let sum = 0;\n for (let ky = 0; ky < M; ky++) sum += cosTable[ky * (R + 1) + y]! * A[ky * (R + 1) + x]!;\n const r = Math.hypot(x, y), taper = r < R + 1 ? 0.5 * (1 + Math.cos(Math.PI * r / (R + 1))) : 0;\n quarter[y * (R + 1) + x] = sum / (M * M) * taper;\n }\n const weights = new Float64Array(size * size);\n let total = 0;\n for (let dy = -R; dy <= R; dy++) for (let dx = -R; dx <= R; dx++) {\n const w = quarter[Math.abs(dy) * (R + 1) + Math.abs(dx)]!;\n weights[(dy + R) * size + dx + R] = w; total += w;\n }\n if (!(total > 0) || !Number.isFinite(total)) throw new InvalidScientificResultError(\"Diffraction correction filter has no finite DC response.\");\n for (let i = 0; i < weights.length; i++) weights[i] = weights[i]! / total;\n let designPeakGain = 0;\n for (let i = 0; i <= 4096; i++) designPeakGain = Math.max(designPeakGain, gainAt(i / 4096 * cutoff));\n let responsePeakGain = 0, beyond: number | null = null, beyondCount = 0;\n const GRID = 64;\n for (let iy = 0; iy <= GRID / 2; iy++) for (let ix = 0; ix <= GRID / 2; ix++) {\n const fx = ix / GRID, fy = iy / GRID, response = Math.abs(evaluateDiffractionCorrectionResponse(weights, R, fx, fy));\n responsePeakGain = Math.max(responsePeakGain, response);\n if (Math.hypot(fx, fy) >= cutoff) beyond = Math.max(beyond ?? 0, response);\n }\n const AREA = 256;\n for (let iy = 0; iy < AREA; iy++) for (let ix = 0; ix < AREA; ix++) if (Math.hypot((ix + 0.5) / (2 * AREA), (iy + 0.5) / (2 * AREA)) >= cutoff) beyondCount++;\n return { settings, workingFNumber, pixelPitchMicrometers: pitch, cutoffCyclesPerPixel: cutoff, nyquistAreaBeyondCutoffFraction: beyondCount / (AREA * AREA),\n designPeakGain, responsePeakGain, responseMaximumBeyondCutoff: beyond, weights };\n}\n/** Frequency response Σ w(x, y)·cos(2π(fx·x + fy·y)) of a centred (2R + 1)² FIR at (fx, fy) cycles per pixel. */\nexport function evaluateDiffractionCorrectionResponse(weights: Float64Array, radius: number, fx: number, fy: number): number {\n const size = 2 * radius + 1;\n let sum = 0;\n for (let dy = -radius; dy <= radius; dy++) for (let dx = -radius; dx <= radius; dx++) sum += weights[(dy + radius) * size + dx + radius]! * Math.cos(2 * Math.PI * (fx * dx + fy * dy));\n return sum;\n}\n\n/** What the correction did to the linear samples. */\nexport interface DiffractionCorrectionDiagnostics {\n /** Corrected samples below 0 (ringing below black). They are clipped by the later gamut handling. */\n negativeSampleCount: number;\n /** Corrected samples above 1 (above the RAW white level). */\n aboveWhiteSampleCount: number;\n}\n/**\n * Applies the FIR to interleaved linear RGB (width × height × 3), each channel separately, edges clamped. Returns new samples.\n */\nexport function applyDiffractionCorrection(rgb: Float64Array, width: number, height: number, filter: Pick<DiffractionCorrectionFilter, \"weights\" | \"settings\">):\n { samples: Float64Array; diagnostics: DiffractionCorrectionDiagnostics } {\n if (rgb.length !== width * height * 3) throw new InvalidConfigurationError(\"Diffraction correction raster size mismatch.\");\n const R = filter.settings.kernelRadiusPixels, size = 2 * R + 1, w = filter.weights, out = new Float64Array(rgb.length);\n const xs = new Int32Array(width + 2 * R);\n for (let i = 0; i < xs.length; i++) xs[i] = Math.min(width - 1, Math.max(0, i - R)) * 3;\n let negative = 0, above = 0;\n for (let y = 0; y < height; y++) {\n const o = y * width * 3;\n for (let dy = -R; dy <= R; dy++) {\n const row = Math.min(height - 1, Math.max(0, y + dy)) * width * 3, wr = (dy + R) * size;\n for (let dx = 0; dx < size; dx++) {\n const weight = w[wr + dx]!;\n if (weight === 0) continue;\n for (let x = 0; x < width; x++) {\n const s = row + xs[x + dx]!, d = o + 3 * x;\n out[d] = out[d]! + weight * rgb[s]!; out[d + 1] = out[d + 1]! + weight * rgb[s + 1]!; out[d + 2] = out[d + 2]! + weight * rgb[s + 2]!;\n }\n }\n }\n }\n for (let i = 0; i < out.length; i++) {\n const v = out[i]!;\n if (!Number.isFinite(v)) throw new InvalidScientificResultError(\"Diffraction correction produced a non-finite sample.\");\n if (v < 0) negative++; else if (v > 1) above++;\n }\n return { samples: out, diagnostics: { negativeSampleCount: negative, aboveWhiteSampleCount: above } };\n}\n\n/** Normalized Gaussian weights exp(−i²/(2σ²)), i = −r..r with r = ⌈3σ⌉. */\nexport function unsharpMaskKernel(radiusPixels: number): Float64Array {\n const r = Math.ceil(3 * radiusPixels), k = new Float64Array(2 * r + 1);\n let total = 0;\n for (let i = -r; i <= r; i++) { const v = Math.exp(-i * i / (2 * radiusPixels * radiusPixels)); k[i + r] = v; total += v; }\n for (let i = 0; i < k.length; i++) k[i] = k[i]! / total;\n return k;\n}\n/** What the unsharp mask did. Counts are samples (one per channel). */\nexport interface UnsharpMaskDiagnostics {\n /** Half-width of the separable Gaussian, ⌈3σ⌉ pixels. */\n kernelRadiusPixels: number;\n /** Samples changed by the mask (|detail| ≥ threshold and detail ≠ 0). */\n sharpenedSampleCount: number;\n /** Samples left unchanged because 0 < |detail| < threshold. */\n thresholdHeldSampleCount: number;\n /** Sharpened samples clipped at 0 or 1 (the halo did not fit in the code range). */\n clippedLowSampleCount: number;\n clippedHighSampleCount: number;\n /** Largest increase and decrease amount·detail before clipping, in encoded units: the halo strength. */\n maximumIncrease: number;\n maximumDecrease: number;\n}\n/**\n * Unsharp mask on interleaved encoded RGB in [0, 1] (each channel separately, edges clamped):\n * d = x − (G_σ ∗ x); y = x + amount·d where |d| ≥ threshold, else y = x; then y is clipped to [0, 1].\n * Returns new samples.\n */\nexport function applyUnsharpMask(encoded: Float64Array, width: number, height: number, settings: UnsharpMaskSettings):\n { samples: Float64Array; diagnostics: UnsharpMaskDiagnostics } {\n const s = parseUnsharpMaskSettings(settings);\n if (encoded.length !== width * height * 3) throw new InvalidConfigurationError(\"Unsharp mask raster size mismatch.\");\n const k = unsharpMaskKernel(s.radiusPixels), r = (k.length - 1) / 2, horizontal = new Float64Array(encoded.length), blurred = new Float64Array(encoded.length);\n for (let y = 0; y < height; y++) for (let x = 0; x < width; x++) {\n const d = (y * width + x) * 3;\n let a = 0, b = 0, c = 0;\n for (let i = -r; i <= r; i++) {\n const sx = (y * width + Math.min(width - 1, Math.max(0, x + i))) * 3, w = k[i + r]!;\n a += w * encoded[sx]!; b += w * encoded[sx + 1]!; c += w * encoded[sx + 2]!;\n }\n horizontal[d] = a; horizontal[d + 1] = b; horizontal[d + 2] = c;\n }\n for (let y = 0; y < height; y++) for (let x = 0; x < width; x++) {\n const d = (y * width + x) * 3;\n let a = 0, b = 0, c = 0;\n for (let i = -r; i <= r; i++) {\n const sy = (Math.min(height - 1, Math.max(0, y + i)) * width + x) * 3, w = k[i + r]!;\n a += w * horizontal[sy]!; b += w * horizontal[sy + 1]!; c += w * horizontal[sy + 2]!;\n }\n blurred[d] = a; blurred[d + 1] = b; blurred[d + 2] = c;\n }\n const out = new Float64Array(encoded.length);\n let sharpened = 0, held = 0, low = 0, high = 0, increase = 0, decrease = 0;\n for (let i = 0; i < encoded.length; i++) {\n const x = encoded[i]!, detail = x - blurred[i]!;\n if (detail === 0 || Math.abs(detail) < s.threshold) { if (detail !== 0) held++; out[i] = x; continue; }\n const change = s.amount * detail;\n let v = x + change;\n sharpened++;\n if (change > increase) increase = change;\n if (-change > decrease) decrease = -change;\n if (v < 0) { v = 0; low++; } else if (v > 1) { v = 1; high++; }\n out[i] = v;\n }\n return { samples: out, diagnostics: { kernelRadiusPixels: r, sharpenedSampleCount: sharpened, thresholdHeldSampleCount: held, clippedLowSampleCount: low,\n clippedHighSampleCount: high, maximumIncrease: increase, maximumDecrease: decrease } };\n}\n\n/** SDR counters in the shape of the SDR rendering diagnostics. */\nexport interface DetailSdrCounts { negative: number; above: number; changed: number; low: number; high: number }\n/**\n * SDR rendering with an unsharp mask between the sRGB transfer and quantization. Per pixel it runs the reference renderer's\n * operations in its order (−0 → +0, rendering exposure 2^EV with reference white 1, the shared tone operator, gamut\n * handling, sRGB transfer); the whole encoded image is then sharpened and rounded to nearest (ties up).\n */\nexport function renderSdrWithUnsharpMask(rgb: Float64Array, width: number, height: number, profile: SdrRenderingProfile, settings: UnsharpMaskSettings):\n { codes: Uint8Array | Uint16Array; counts: DetailSdrCounts; sharpening: UnsharpMaskDiagnostics } {\n if (rgb.length !== width * height * 3) throw new InvalidConfigurationError(\"SDR raster size mismatch.\");\n const scale = 2 ** profile.renderingExposureEv, tone = prepareSdrPixelTone(profile), scratch = new Float64Array(3), encoded = new Float64Array(rgb.length);\n if (!Number.isFinite(scale) || scale <= 0) throw new InvalidConfigurationError(\"Rendering scale is unrepresentable.\");\n const reject = profile.gamutHandling === \"reject-out-of-range\", counts: DetailSdrCounts = { negative: 0, above: 0, changed: 0, low: 0, high: 0 };\n for (let i = 0; i < rgb.length; i += 3) {\n const r = rgb[i]!, g = rgb[i + 1]!, b = rgb[i + 2]!;\n const er = (r === 0 ? 0 : r) * scale, eg = (g === 0 ? 0 : g) * scale, eb = (b === 0 ? 0 : b) * scale;\n if (!Number.isFinite(er) || !Number.isFinite(eg) || !Number.isFinite(eb)) throw new InvalidScientificResultError(\"Rendering exposure produced a non-finite sample.\");\n tone(er, eg, eb, scratch);\n for (let c = 0; c < 3; c++) {\n const exposed = c === 0 ? er : c === 1 ? eg : eb;\n if (exposed < 0) counts.negative++;\n if (exposed > 1) counts.above++;\n let mapped = scratch[c]!;\n if (mapped !== exposed) counts.changed++;\n if (mapped === 0) mapped = 0;\n if (mapped < 0 || mapped > 1) {\n if (reject) throw new InvalidConfigurationError(\"Tone output exceeds the declared SDR gamut range.\");\n if (mapped < 0) { counts.low++; mapped = 0; } else { counts.high++; mapped = 1; }\n }\n encoded[i + c] = encodeSrgbComponent(mapped);\n }\n }\n const sharpened = applyUnsharpMask(encoded, width, height, settings), maximum = 2 ** profile.bitDepth - 1;\n const codes = profile.bitDepth === 8 ? new Uint8Array(rgb.length) : new Uint16Array(rgb.length);\n for (let i = 0; i < codes.length; i++) codes[i] = Math.round(sharpened.samples[i]! * maximum);\n return { codes, counts, sharpening: sharpened.diagnostics };\n}\n"]}
|
package/docs/AGENT_GUIDE.md
CHANGED
|
@@ -27,6 +27,7 @@ one-call capture, see the [Quick Start](QUICK_START.md). For every export, see t
|
|
|
27
27
|
| Depth of field and hyperfocal distance | [`calculateDepthOfField`](api/optics-depth-of-field.md#calculatedepthoffield) | Thin-lens model. `farLimitM` is `null` when it is infinite. |
|
|
28
28
|
| Blur of an out-of-focus subject | [`calculateDefocusCircle`](api/optics-depth-of-field.md#calculatedefocuscircle) | Geometric blur-circle diameter at the sensor. |
|
|
29
29
|
| Check a defocus blur before rendering it | [`calculateDefocusDiscKernelRadius`](api/optics-defocus-disc-kernel.md#calculatedefocusdisckernelradius) | Whether `lens.defocus` renders the disc or refuses it (kernel radius at most `DEFOCUS_DISC_KERNEL_MAXIMUM_RADIUS_SITES`, 64 sites), and by how much it is over. |
|
|
30
|
+
| A generic catalogue lens and its character | [`resolveGenericLens`](api/equipment-generic-lens-catalogue.md#resolvegenericlens) | 30 Photivra primes ("PV 50 1.2 Pro", "PV 50 1.8"), every value a labelled approximation; `simulateCapture` renders one with `lens.catalogue` ([catalogue](https://github.com/Photivra/photivra/blob/main/docs/LENS_CATALOGUE.md)). |
|
|
30
31
|
| Field (angle) of view | [`calculateFieldOfView`](api/camera-field-of-view.md#calculatefieldofview) | Pass the sensor width, height or diagonal for that angle. |
|
|
31
32
|
| Crop factor and 35 mm-equivalent focal length | [`calculateEquivalentFocalLength35Mm`](api/camera-equivalent-focal-length.md#calculateequivalentfocallength35mm) | Diagonal-based, against a 36 × 24 mm frame. |
|
|
32
33
|
| Pixels left after a centred crop | [`calculateCenteredCrop`](api/output-crop.md#calculatecenteredcrop) | Keeps the aspect ratio to whole pixels. |
|
package/docs/API_REFERENCE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Public API reference
|
|
2
2
|
|
|
3
|
-
Generated from the exact root exports for **@photivra/engine 2.
|
|
3
|
+
Generated from the exact root exports for **@photivra/engine 2.17.0 / root contract 2.17.0** by `node scripts/generate-api-reference.mjs`. No module deep import is supported.
|
|
4
4
|
|
|
5
5
|
Use [the developer guide](https://github.com/Photivra/photivra/blob/main/docs/DEVELOPERS.md) for executable paths and scientific boundaries. Types are contracts, not runtime validation: parse untrusted data, preserve units/reference frames, read assessment blockers, and retain evidence/limitations. Optional properties do not imply a universal default. Model/schema IDs remain independent of the distribution.
|
|
6
6
|
|
|
@@ -223,6 +223,7 @@ Start here to find a function by task. [Using Photivra from an agent](AGENT_GUID
|
|
|
223
223
|
| Export | Kind |
|
|
224
224
|
| --- | --- |
|
|
225
225
|
| [`createNativeRawDevelopmentTask`](api/capture-native-raw-development.md#createnativerawdevelopmenttask) | Runtime |
|
|
226
|
+
| [`NATIVE_RAW_DEVELOPMENT_EXPOSURE_RANGE_STOPS`](api/capture-native-raw-development.md#native_raw_development_exposure_range_stops) | Runtime |
|
|
226
227
|
| [`NativeRawDevelopmentInput`](api/capture-native-raw-development.md#nativerawdevelopmentinput) | Type |
|
|
227
228
|
| [`NativeRawDevelopmentOutput`](api/capture-native-raw-development.md#nativerawdevelopmentoutput) | Type |
|
|
228
229
|
| [`NativeRawDevelopmentProvider`](api/capture-native-raw-development.md#nativerawdevelopmentprovider) | Type |
|
|
@@ -826,6 +827,28 @@ Start here to find a function by task. [Using Photivra from an agent](AGENT_GUID
|
|
|
826
827
|
| [`ResolveGenericEquipmentExposureCapabilitiesInput`](api/equipment-exposure-capabilities.md#resolvegenericequipmentexposurecapabilitiesinput) | Type |
|
|
827
828
|
| [`WidestAvailableFNumberCapability`](api/equipment-exposure-capabilities.md#widestavailablefnumbercapability) | Type |
|
|
828
829
|
|
|
830
|
+
## equipment/generic-lens-catalogue.ts
|
|
831
|
+
|
|
832
|
+
[Detailed contracts](api/equipment-generic-lens-catalogue.md) · [Source](https://github.com/Photivra/photivra/blob/main/src/equipment/generic-lens-catalogue.ts)
|
|
833
|
+
|
|
834
|
+
| Export | Kind |
|
|
835
|
+
| --- | --- |
|
|
836
|
+
| [`GENERIC_LENS_CATALOGUE`](api/equipment-generic-lens-catalogue.md#generic_lens_catalogue) | Runtime |
|
|
837
|
+
| [`GENERIC_LENS_IDS`](api/equipment-generic-lens-catalogue.md#generic_lens_ids) | Runtime |
|
|
838
|
+
| [`GENERIC_LENS_SET_BASELINES`](api/equipment-generic-lens-catalogue.md#generic_lens_set_baselines) | Runtime |
|
|
839
|
+
| [`GenericLensAdjustments`](api/equipment-generic-lens-catalogue.md#genericlensadjustments) | Type |
|
|
840
|
+
| [`GenericLensCatalogueEntry`](api/equipment-generic-lens-catalogue.md#genericlenscatalogueentry) | Type |
|
|
841
|
+
| [`GenericLensCharacter`](api/equipment-generic-lens-catalogue.md#genericlenscharacter) | Type |
|
|
842
|
+
| [`GenericLensCharacterValues`](api/equipment-generic-lens-catalogue.md#genericlenscharactervalues) | Type |
|
|
843
|
+
| [`GenericLensFocusError`](api/equipment-generic-lens-catalogue.md#genericlensfocuserror) | Type |
|
|
844
|
+
| [`GenericLensKind`](api/equipment-generic-lens-catalogue.md#genericlenskind) | Type |
|
|
845
|
+
| [`GenericLensSet`](api/equipment-generic-lens-catalogue.md#genericlensset) | Type |
|
|
846
|
+
| [`ResolvedGenericLens`](api/equipment-generic-lens-catalogue.md#resolvedgenericlens) | Type |
|
|
847
|
+
| [`resolveGenericLens`](api/equipment-generic-lens-catalogue.md#resolvegenericlens) | Runtime |
|
|
848
|
+
| [`ResolveGenericLensInput`](api/equipment-generic-lens-catalogue.md#resolvegenericlensinput) | Type |
|
|
849
|
+
| [`simulateGenericLensFocusError`](api/equipment-generic-lens-catalogue.md#simulategenericlensfocuserror) | Runtime |
|
|
850
|
+
| [`SimulateGenericLensFocusErrorInput`](api/equipment-generic-lens-catalogue.md#simulategenericlensfocuserrorinput) | Type |
|
|
851
|
+
|
|
829
852
|
## equipment/generic-prime-lenses.ts
|
|
830
853
|
|
|
831
854
|
[Detailed contracts](api/equipment-generic-prime-lenses.md) · [Source](https://github.com/Photivra/photivra/blob/main/src/equipment/generic-prime-lenses.ts)
|
|
@@ -1268,6 +1291,7 @@ Start here to find a function by task. [Using Photivra from an agent](AGENT_GUID
|
|
|
1268
1291
|
|
|
1269
1292
|
| Export | Kind |
|
|
1270
1293
|
| --- | --- |
|
|
1294
|
+
| [`DisplayViewHighlightDiagnostics`](api/facade-simulate-capture.md#displayviewhighlightdiagnostics) | Type |
|
|
1271
1295
|
| [`DisplayViewResult`](api/facade-simulate-capture.md#displayviewresult) | Type |
|
|
1272
1296
|
| [`IdealReferenceResult`](api/facade-simulate-capture.md#idealreferenceresult) | Type |
|
|
1273
1297
|
| [`serializeSimulatedCaptureDngFromParts`](api/facade-simulate-capture.md#serializesimulatedcapturedngfromparts) | Runtime |
|
|
@@ -1289,6 +1313,8 @@ Start here to find a function by task. [Using Photivra from an agent](AGENT_GUID
|
|
|
1289
1313
|
| [`SimulateCaptureCostOption`](api/facade-simulate-capture.md#simulatecapturecostoption) | Type |
|
|
1290
1314
|
| [`SimulateCaptureDemosaic`](api/facade-simulate-capture.md#simulatecapturedemosaic) | Type |
|
|
1291
1315
|
| [`SimulateCaptureDemosaicRecord`](api/facade-simulate-capture.md#simulatecapturedemosaicrecord) | Type |
|
|
1316
|
+
| [`SimulateCaptureDetailDiagnostics`](api/facade-simulate-capture.md#simulatecapturedetaildiagnostics) | Type |
|
|
1317
|
+
| [`SimulateCaptureDiffractionCorrection`](api/facade-simulate-capture.md#simulatecapturediffractioncorrection) | Type |
|
|
1292
1318
|
| [`SimulateCaptureDngPart`](api/facade-simulate-capture.md#simulatecapturedngpart) | Type |
|
|
1293
1319
|
| [`SimulateCaptureExposureMode`](api/facade-simulate-capture.md#simulatecaptureexposuremode) | Type |
|
|
1294
1320
|
| [`SimulateCaptureFastOption`](api/facade-simulate-capture.md#simulatecapturefastoption) | Type |
|
|
@@ -1302,6 +1328,7 @@ Start here to find a function by task. [Using Photivra from an agent](AGENT_GUID
|
|
|
1302
1328
|
| [`SimulateCaptureProgress`](api/facade-simulate-capture.md#simulatecaptureprogress) | Type |
|
|
1303
1329
|
| [`SimulateCaptureResult`](api/facade-simulate-capture.md#simulatecaptureresult) | Type |
|
|
1304
1330
|
| [`SimulateCaptureSensorAntiAliasing`](api/facade-simulate-capture.md#simulatecapturesensorantialiasing) | Type |
|
|
1331
|
+
| [`SimulateCaptureSharpening`](api/facade-simulate-capture.md#simulatecapturesharpening) | Type |
|
|
1305
1332
|
| [`SimulateCaptureWhiteBalance`](api/facade-simulate-capture.md#simulatecapturewhitebalance) | Type |
|
|
1306
1333
|
| [`SimulateDisplayViewOptions`](api/facade-simulate-capture.md#simulatedisplayviewoptions) | Type |
|
|
1307
1334
|
| [`simulateIdealReference`](api/facade-simulate-capture.md#simulateidealreference) | Runtime |
|
|
@@ -1570,6 +1597,22 @@ Start here to find a function by task. [Using Photivra from an agent](AGENT_GUID
|
|
|
1570
1597
|
| [`LensComplexPupilPsfSampling`](api/optics-complex-pupil-psf.md#lenscomplexpupilpsfsampling) | Type |
|
|
1571
1598
|
| [`parseLensComplexPupilProfile`](api/optics-complex-pupil-psf.md#parselenscomplexpupilprofile) | Runtime |
|
|
1572
1599
|
|
|
1600
|
+
## optics/defocus-bokeh-kernel.ts
|
|
1601
|
+
|
|
1602
|
+
[Detailed contracts](api/optics-defocus-bokeh-kernel.md) · [Source](https://github.com/Photivra/photivra/blob/main/src/optics/defocus-bokeh-kernel.ts)
|
|
1603
|
+
|
|
1604
|
+
| Export | Kind |
|
|
1605
|
+
| --- | --- |
|
|
1606
|
+
| [`calculateDefocusBokehKernel`](api/optics-defocus-bokeh-kernel.md#calculatedefocusbokehkernel) | Runtime |
|
|
1607
|
+
| [`CalculateDefocusBokehKernelInput`](api/optics-defocus-bokeh-kernel.md#calculatedefocusbokehkernelinput) | Type |
|
|
1608
|
+
| [`DEFOCUS_BOKEH_MAXIMUM_BLADES`](api/optics-defocus-bokeh-kernel.md#defocus_bokeh_maximum_blades) | Runtime |
|
|
1609
|
+
| [`DefocusBokehBlades`](api/optics-defocus-bokeh-kernel.md#defocusbokehblades) | Type |
|
|
1610
|
+
| [`DefocusBokehCatsEye`](api/optics-defocus-bokeh-kernel.md#defocusbokehcatseye) | Type |
|
|
1611
|
+
| [`DefocusBokehClippingAperture`](api/optics-defocus-bokeh-kernel.md#defocusbokehclippingaperture) | Type |
|
|
1612
|
+
| [`DefocusBokehKernel`](api/optics-defocus-bokeh-kernel.md#defocusbokehkernel) | Type |
|
|
1613
|
+
| [`DefocusBokehOptions`](api/optics-defocus-bokeh-kernel.md#defocusbokehoptions) | Type |
|
|
1614
|
+
| [`DefocusBokehSphericalAberration`](api/optics-defocus-bokeh-kernel.md#defocusbokehsphericalaberration) | Type |
|
|
1615
|
+
|
|
1573
1616
|
## optics/defocus-disc-kernel.ts
|
|
1574
1617
|
|
|
1575
1618
|
[Detailed contracts](api/optics-defocus-disc-kernel.md) · [Source](https://github.com/Photivra/photivra/blob/main/src/optics/defocus-disc-kernel.ts)
|
|
@@ -2024,6 +2067,16 @@ Start here to find a function by task. [Using Photivra from an agent](AGENT_GUID
|
|
|
2024
2067
|
| [`CalculateCenteredCropInput`](api/output-crop.md#calculatecenteredcropinput) | Type |
|
|
2025
2068
|
| [`CenteredCrop`](api/output-crop.md#centeredcrop) | Type |
|
|
2026
2069
|
|
|
2070
|
+
## output/generic-lens-corrections.ts
|
|
2071
|
+
|
|
2072
|
+
[Detailed contracts](api/output-generic-lens-corrections.md) · [Source](https://github.com/Photivra/photivra/blob/main/src/output/generic-lens-corrections.ts)
|
|
2073
|
+
|
|
2074
|
+
| Export | Kind |
|
|
2075
|
+
| --- | --- |
|
|
2076
|
+
| [`createGenericLensCorrectionProfile`](api/output-generic-lens-corrections.md#creategenericlenscorrectionprofile) | Runtime |
|
|
2077
|
+
| [`CreateGenericLensCorrectionProfileInput`](api/output-generic-lens-corrections.md#creategenericlenscorrectionprofileinput) | Type |
|
|
2078
|
+
| [`GENERIC_LENS_CORRECTION_CHANNEL_WAVELENGTHS_NM`](api/output-generic-lens-corrections.md#generic_lens_correction_channel_wavelengths_nm) | Runtime |
|
|
2079
|
+
|
|
2027
2080
|
## output/geometric-transforms.ts
|
|
2028
2081
|
|
|
2029
2082
|
[Detailed contracts](api/output-geometric-transforms.md) · [Source](https://github.com/Photivra/photivra/blob/main/src/output/geometric-transforms.ts)
|