@photivra/engine 2.20.0 → 2.22.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 +295 -1
- package/CITATION.cff +1 -1
- package/README.md +7 -6
- package/SECURITY.md +1 -1
- package/THIRD_PARTY.md +18 -0
- package/dist/capture/c2pa-embed.d.ts +116 -0
- package/dist/capture/c2pa-embed.js +493 -0
- package/dist/capture/c2pa-embed.js.map +1 -0
- package/dist/capture/dng-import.d.ts +73 -8
- package/dist/capture/dng-import.js +315 -80
- package/dist/capture/dng-import.js.map +1 -1
- package/dist/capture/dng-lens-correction-opcodes.d.ts +2 -2
- package/dist/capture/dng-lens-correction-opcodes.js +2 -2
- package/dist/capture/dng-lens-correction-opcodes.js.map +1 -1
- package/dist/capture/dng-opcodes.d.ts +96 -0
- package/dist/capture/dng-opcodes.js +391 -0
- package/dist/capture/dng-opcodes.js.map +1 -0
- package/dist/capture/dng-profile-maps.d.ts +99 -0
- package/dist/capture/dng-profile-maps.js +381 -0
- package/dist/capture/dng-profile-maps.js.map +1 -0
- package/dist/capture/dng-stage-image.d.ts +23 -0
- package/dist/capture/dng-stage-image.js +65 -0
- package/dist/capture/dng-stage-image.js.map +1 -0
- package/dist/capture/exposure-build-up-stage.d.ts +16 -0
- package/dist/capture/exposure-build-up-stage.js +4 -0
- package/dist/capture/exposure-build-up-stage.js.map +1 -0
- package/dist/capture/jpeg-xl-tiles.d.ts +22 -0
- package/dist/capture/jpeg-xl-tiles.js +151 -0
- package/dist/capture/jpeg-xl-tiles.js.map +1 -0
- package/dist/capture/lossy-jpeg.d.ts +17 -0
- package/dist/capture/lossy-jpeg.js +369 -0
- package/dist/capture/lossy-jpeg.js.map +1 -0
- package/dist/capture/native-environment-lean.d.ts +2 -1
- package/dist/capture/native-environment-lean.js +41 -73
- package/dist/capture/native-environment-lean.js.map +1 -1
- package/dist/capture/native-environment-tabulated.js +4 -3
- package/dist/capture/native-environment-tabulated.js.map +1 -1
- package/dist/capture/native-raw-development.d.ts +2 -1
- package/dist/capture/native-raw-development.js.map +1 -1
- package/dist/capture/native-raw.d.ts +3 -2
- package/dist/capture/native-raw.js +5 -4
- package/dist/capture/native-raw.js.map +1 -1
- package/dist/capture/sensor-raw-producer.d.ts +4 -1
- package/dist/capture/sensor-raw-producer.js +12 -3
- package/dist/capture/sensor-raw-producer.js.map +1 -1
- package/dist/color/neighbor-highlight-reconstruction.d.ts +66 -0
- package/dist/color/neighbor-highlight-reconstruction.js +234 -0
- package/dist/color/neighbor-highlight-reconstruction.js.map +1 -0
- package/dist/color/sensor-color-development.d.ts +5 -0
- package/dist/color/sensor-color-development.js +7 -1
- package/dist/color/sensor-color-development.js.map +1 -1
- package/dist/color/spectral-spikiness.d.ts +11 -0
- package/dist/color/spectral-spikiness.js +23 -0
- package/dist/color/spectral-spikiness.js.map +1 -0
- package/dist/core/execution-error.d.ts +21 -0
- package/dist/core/execution-error.js +12 -0
- package/dist/core/execution-error.js.map +1 -0
- 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 +3 -2
- package/dist/equipment/generic-lens-catalogue.js +18 -5
- package/dist/equipment/generic-lens-catalogue.js.map +1 -1
- package/dist/equipment/generic-tier-assets.d.ts +32 -0
- package/dist/equipment/generic-tier-assets.js +16 -11
- package/dist/equipment/generic-tier-assets.js.map +1 -1
- package/dist/equipment/sensor-profile-body.d.ts +78 -0
- package/dist/equipment/sensor-profile-body.js +77 -0
- package/dist/equipment/sensor-profile-body.js.map +1 -0
- package/dist/equipment/sensor-profiles.d.ts +8 -0
- package/dist/equipment/sensor-profiles.js +82 -0
- package/dist/equipment/sensor-profiles.js.map +1 -0
- package/dist/facade/catalogue-lens-signal.d.ts +28 -3
- package/dist/facade/catalogue-lens-signal.js +83 -78
- package/dist/facade/catalogue-lens-signal.js.map +1 -1
- package/dist/facade/chart-radiance-batch.js +2 -1
- package/dist/facade/chart-radiance-batch.js.map +1 -1
- package/dist/facade/defocus-image-space-provider.d.ts +7 -0
- package/dist/facade/defocus-image-space-provider.js +64 -76
- package/dist/facade/defocus-image-space-provider.js.map +1 -1
- package/dist/facade/diffraction-provider.d.ts +1 -1
- package/dist/facade/diffraction-provider.js +4 -4
- package/dist/facade/diffraction-provider.js.map +1 -1
- package/dist/facade/display-view-gpu-session.js +39 -5
- package/dist/facade/display-view-gpu-session.js.map +1 -1
- package/dist/facade/display-view-gpu.d.ts +19 -6
- package/dist/facade/display-view-gpu.js.map +1 -1
- package/dist/facade/display-view-lens-signal.js +25 -23
- package/dist/facade/display-view-lens-signal.js.map +1 -1
- package/dist/facade/display-view-normal.d.ts +15 -0
- package/dist/facade/display-view-normal.js +44 -0
- package/dist/facade/display-view-normal.js.map +1 -0
- package/dist/facade/display-view-rendering.d.ts +97 -0
- package/dist/facade/display-view-rendering.js +598 -0
- package/dist/facade/display-view-rendering.js.map +1 -0
- package/dist/facade/display-view.d.ts +37 -65
- package/dist/facade/display-view.js +152 -499
- package/dist/facade/display-view.js.map +1 -1
- package/dist/facade/expected-signal-setup.d.ts +3 -1
- package/dist/facade/expected-signal-setup.js +3 -3
- package/dist/facade/expected-signal-setup.js.map +1 -1
- package/dist/facade/expected-signal.d.ts +47 -14
- package/dist/facade/expected-signal.js +117 -112
- package/dist/facade/expected-signal.js.map +1 -1
- package/dist/facade/exposure-build-up.d.ts +70 -0
- package/dist/facade/exposure-build-up.js +164 -0
- package/dist/facade/exposure-build-up.js.map +1 -0
- package/dist/facade/fast-methods.d.ts +1 -1
- package/dist/facade/fast-methods.js +46 -9
- package/dist/facade/fast-methods.js.map +1 -1
- package/dist/facade/generic-lens-capture.d.ts +3 -3
- package/dist/facade/generic-lens-capture.js +3 -3
- package/dist/facade/generic-lens-capture.js.map +1 -1
- package/dist/facade/image-plane-enable.d.ts +7 -0
- package/dist/facade/image-plane-enable.js +17 -0
- package/dist/facade/image-plane-enable.js.map +1 -0
- package/dist/facade/image-plane-lattice-data.d.ts +6 -0
- package/dist/facade/image-plane-lattice-data.js +10 -0
- package/dist/facade/image-plane-lattice-data.js.map +1 -0
- package/dist/facade/image-plane-support.d.ts +33 -0
- package/dist/facade/image-plane-support.js +11 -0
- package/dist/facade/image-plane-support.js.map +1 -0
- package/dist/facade/image-plane.d.ts +36 -0
- package/dist/facade/image-plane.js +384 -0
- package/dist/facade/image-plane.js.map +1 -0
- package/dist/facade/mixed-illumination.d.ts +108 -0
- package/dist/facade/mixed-illumination.js +174 -0
- package/dist/facade/mixed-illumination.js.map +1 -0
- package/dist/facade/on-demand-kits.d.ts +14 -0
- package/dist/facade/on-demand-kits.js +36 -0
- package/dist/facade/on-demand-kits.js.map +1 -0
- package/dist/facade/opt-in-kit.d.ts +9 -0
- package/dist/facade/opt-in-kit.js +11 -0
- package/dist/facade/opt-in-kit.js.map +1 -0
- package/dist/facade/quality-kit.d.ts +21 -0
- package/dist/facade/quality-kit.js +23 -0
- package/dist/facade/quality-kit.js.map +1 -0
- package/dist/facade/quality-paths.d.ts +22 -0
- package/dist/facade/quality-paths.js +44 -0
- package/dist/facade/quality-paths.js.map +1 -0
- package/dist/facade/representative-light-sources.d.ts +72 -0
- package/dist/facade/representative-light-sources.js +124 -0
- package/dist/facade/representative-light-sources.js.map +1 -0
- package/dist/facade/scene-radiance.d.ts +145 -4
- package/dist/facade/scene-radiance.js +50 -13
- package/dist/facade/scene-radiance.js.map +1 -1
- package/dist/facade/simulate-capture.d.ts +68 -20
- package/dist/facade/simulate-capture.js +399 -146
- package/dist/facade/simulate-capture.js.map +1 -1
- package/dist/facade/simulate-display-view.d.ts +10 -12
- package/dist/facade/simulate-display-view.js +70 -53
- package/dist/facade/simulate-display-view.js.map +1 -1
- package/dist/gpu/chart-composite-gpu.d.ts +13 -1
- package/dist/gpu/chart-composite-gpu.js +48 -9
- package/dist/gpu/chart-composite-gpu.js.map +1 -1
- package/dist/gpu/chart-radiance-gpu.js +4 -30
- package/dist/gpu/chart-radiance-gpu.js.map +1 -1
- package/dist/gpu/display-view-composite-material-module.d.ts +10 -4
- package/dist/gpu/display-view-composite-material-module.js +39 -13
- package/dist/gpu/display-view-composite-material-module.js.map +1 -1
- package/dist/gpu/display-view-gpu-renderer.d.ts +43 -0
- package/dist/gpu/display-view-gpu-renderer.js +134 -0
- package/dist/gpu/display-view-gpu-renderer.js.map +1 -0
- package/dist/gpu/display-view-image-material-module.d.ts +87 -0
- package/dist/gpu/display-view-image-material-module.js +361 -0
- package/dist/gpu/display-view-image-material-module.js.map +1 -0
- package/dist/gpu/display-view-image-quality.d.ts +87 -0
- package/dist/gpu/display-view-image-quality.js +625 -0
- package/dist/gpu/display-view-image-quality.js.map +1 -0
- package/dist/gpu/display-view-quality-gpu.d.ts +80 -65
- package/dist/gpu/display-view-quality-gpu.js +187 -445
- package/dist/gpu/display-view-quality-gpu.js.map +1 -1
- package/dist/gpu/display-view-speed-gpu.d.ts +67 -19
- package/dist/gpu/display-view-speed-gpu.js +181 -105
- 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/image-kernel-execution.d.ts +2 -13
- package/dist/gpu/image-kernel-execution.js +2 -10
- package/dist/gpu/image-kernel-execution.js.map +1 -1
- package/dist/gpu/wgsl-display-view-coupled-stub.d.ts +8 -0
- package/dist/gpu/wgsl-display-view-coupled-stub.js +21 -0
- package/dist/gpu/wgsl-display-view-coupled-stub.js.map +1 -0
- package/dist/gpu/wgsl-display-view-coupled.d.ts +88 -0
- package/dist/gpu/wgsl-display-view-coupled.js +353 -0
- package/dist/gpu/wgsl-display-view-coupled.js.map +1 -0
- package/dist/gpu/wgsl-display-view-quality-kernel.d.ts +33 -24
- package/dist/gpu/wgsl-display-view-quality-kernel.js +166 -146
- package/dist/gpu/wgsl-display-view-quality-kernel.js.map +1 -1
- package/dist/gpu/wgsl-display-view-speed-kernel.d.ts +19 -44
- package/dist/gpu/wgsl-display-view-speed-kernel.js +116 -18
- package/dist/gpu/wgsl-display-view-speed-kernel.js.map +1 -1
- package/dist/gpu/wgsl-exact-sum.d.ts +20 -0
- package/dist/gpu/wgsl-exact-sum.js +42 -0
- package/dist/gpu/wgsl-exact-sum.js.map +1 -0
- package/dist/index.d.ts +22 -6
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/dist/motion/subject-motion.d.ts +66 -0
- package/dist/motion/subject-motion.js +52 -0
- package/dist/motion/subject-motion.js.map +1 -0
- package/dist/optics/generic-lens-lateral-color.d.ts +83 -0
- package/dist/optics/generic-lens-lateral-color.js +77 -0
- package/dist/optics/generic-lens-lateral-color.js.map +1 -0
- package/dist/optics/generic-lens-psf.js +54 -46
- package/dist/optics/generic-lens-psf.js.map +1 -1
- package/dist/optics/lens-psf-profile.d.ts +7 -0
- package/dist/optics/lens-psf-profile.js +2 -1
- package/dist/optics/lens-psf-profile.js.map +1 -1
- package/dist/output/camera-channel-response.d.ts +50 -0
- package/dist/output/camera-channel-response.js +69 -0
- package/dist/output/camera-channel-response.js.map +1 -0
- package/dist/output/developed-lens-corrections.d.ts +19 -5
- package/dist/output/developed-lens-corrections.js +28 -9
- package/dist/output/developed-lens-corrections.js.map +1 -1
- package/dist/output/generic-lens-corrections.d.ts +41 -5
- package/dist/output/generic-lens-corrections.js +52 -8
- package/dist/output/generic-lens-corrections.js.map +1 -1
- package/dist/output/native-capture-sdr.js +5 -2
- package/dist/output/native-capture-sdr.js.map +1 -1
- package/dist/output/print-plan.d.ts +41 -5
- package/dist/output/print-plan.js +59 -14
- package/dist/output/print-plan.js.map +1 -1
- package/dist/output/sdr-rendering.d.ts +18 -1
- package/dist/output/sdr-rendering.js +39 -2
- package/dist/output/sdr-rendering.js.map +1 -1
- package/dist/sensor/binomial-sample.d.ts +3 -0
- package/dist/sensor/binomial-sample.js +86 -0
- package/dist/sensor/binomial-sample.js.map +1 -0
- package/dist/sensor/native-sensor-report.d.ts +10 -0
- package/dist/sensor/native-sensor-report.js +16 -0
- package/dist/sensor/native-sensor-report.js.map +1 -0
- package/dist/sensor/sensor-characteristics.d.ts +91 -13
- package/dist/sensor/sensor-characteristics.js +30 -15
- package/dist/sensor/sensor-characteristics.js.map +1 -1
- package/docs/AGENT_GUIDE.md +1 -0
- package/docs/API_REFERENCE.md +214 -4
- package/docs/QUICK_START.md +162 -8
- package/docs/USAGE.md +195 -22
- package/docs/api/capture-c2pa-embed.md +177 -0
- package/docs/api/capture-dng-import.md +86 -10
- package/docs/api/capture-dng-opcodes.md +93 -0
- package/docs/api/capture-dng-profile-maps.md +141 -0
- package/docs/api/capture-dng-stage-image.md +43 -0
- package/docs/api/capture-jpeg-xl-tiles.md +33 -0
- package/docs/api/capture-lossy-jpeg.md +41 -0
- package/docs/api/capture-native-raw-development.md +2 -1
- package/docs/api/core-execution-error.md +43 -0
- package/docs/api/core-version.md +1 -1
- package/docs/api/equipment-generic-lens-catalogue.md +10 -5
- package/docs/api/equipment-sensor-profile-body.md +64 -0
- package/docs/api/equipment-sensor-profiles.md +86 -0
- package/docs/api/exports.json +460 -5
- package/docs/api/facade-display-view-gpu.md +5 -2
- package/docs/api/facade-display-view.md +11 -15
- package/docs/api/facade-exposure-build-up.md +105 -0
- package/docs/api/facade-fast-methods.md +47 -10
- package/docs/api/facade-image-plane-enable.md +16 -0
- package/docs/api/facade-mixed-illumination.md +67 -0
- package/docs/api/facade-quality-paths.md +24 -0
- package/docs/api/facade-representative-light-sources.md +131 -0
- package/docs/api/facade-scene-radiance.md +54 -3
- package/docs/api/facade-simulate-capture.md +48 -11
- package/docs/api/facade-simulate-display-view.md +10 -12
- package/docs/api/gpu-image-kernel-execution.md +0 -36
- package/docs/api/motion-subject-motion.md +23 -0
- package/docs/api/optics-generic-lens-lateral-color.md +79 -0
- package/docs/api/output-camera-channel-response.md +55 -0
- package/docs/api/output-developed-lens-corrections.md +10 -1
- package/docs/api/output-generic-lens-corrections.md +40 -4
- package/docs/api/output-print-plan.md +35 -1
- package/docs/api/output-sdr-rendering.md +6 -1
- package/docs/api/sensor-sensor-characteristics.md +54 -2
- package/llms.txt +3 -0
- package/package.json +6 -5
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import type { EvidenceProvenance } from "../core/evidence-provenance.js";
|
|
2
2
|
import { type GenericEquipmentTier, type GenericEquipmentTierPreset } from "../equipment/generic-tier-assets.js";
|
|
3
|
+
import type { SensorProfile } from "../equipment/sensor-profile-body.js";
|
|
3
4
|
import { type AutoIsoLimits, type ExposureResolutionConstraint } from "../exposure/exposure-mode-resolver.js";
|
|
4
5
|
import { resolveColorTemperatureWhiteBalance, type ResolvedWhiteBalanceState } from "../color/white-balance.js";
|
|
5
6
|
import { type CaptureWhiteBalanceIntent } from "../capture/simulated-capture.js";
|
|
6
7
|
import { type NativeRawOutput, type NativeRawPlan } from "../capture/native-raw.js";
|
|
7
8
|
import { type DisplayViewExpectedSignal, type DisplayViewExpectedSignalInput } from "./expected-signal.js";
|
|
8
9
|
import type { DisplayViewFastReport } from "./display-view-gpu.js";
|
|
10
|
+
import type { MixedIllumination, ResolvedMixedIllumination } from "./mixed-illumination.js";
|
|
9
11
|
import type { DisplayViewLensPsf } from "./display-view-lens-signal.js";
|
|
10
12
|
import { type NativeEnvironmentRawInput } from "../capture/native-environment-raw.js";
|
|
11
13
|
import { type NativeRawDevelopmentInput, type RawHighlightDiagnostics } from "../capture/native-raw-development.js";
|
|
12
14
|
import type { RawFrameReconstructionPhaseProfile } from "../capture/raw-frame-reconstruction.js";
|
|
13
|
-
import { type SdrToneCurve, type SdrToneCurveParameters, type SdrRenderingResult } from "../output/sdr-rendering.js";
|
|
15
|
+
import { type SdrRenderingProfile, type SdrToneCurve, type SdrToneCurveParameters, type SdrRenderingResult } from "../output/sdr-rendering.js";
|
|
14
16
|
import type { RawHighlightMode } from "../color/sensor-color-development.js";
|
|
15
17
|
import type { SimulateEnvironmentSensorRawFrameInput } from "../capture/environment-raw-producer.js";
|
|
16
18
|
import { type OutputTextMetadata } from "../output/text-metadata.js";
|
|
@@ -20,15 +22,16 @@ import type { BrownConradyDistortionProfile } from "../optics/brown-conrady-dist
|
|
|
20
22
|
import type { IlluminationVignettingProfile } from "../optics/illumination-vignetting.js";
|
|
21
23
|
import type { CalculateSensorPsfIrradianceQuadratureInput } from "../optics/sensor-psf-quadrature.js";
|
|
22
24
|
import type { CalculateEnvironmentSensorPhotoSignalInput } from "../sensor/environment-photo-signal.js";
|
|
23
|
-
import {
|
|
25
|
+
import type { DiffractionLimitedPsfProfile } from "../optics/diffraction-psf-profile.js";
|
|
24
26
|
import { type DefocusDiscSiteKernel, type ResolvedDefocusDisc } from "../optics/defocus-disc-kernel.js";
|
|
25
|
-
import {
|
|
27
|
+
import type { DefocusBokehOptions } from "../optics/defocus-bokeh-kernel.js";
|
|
26
28
|
import { type AntiAliasingPointSplitComponent } from "../sensor/optical-stack.js";
|
|
27
29
|
import { type NativeRawDng } from "../capture/native-raw-dng.js";
|
|
30
|
+
import type { SimulateCaptureSubjectMotion } from "../motion/subject-motion.js";
|
|
28
31
|
import { type SimulateCaptureSensorCharacteristics, type SimulateCaptureSensorReport } from "../sensor/sensor-characteristics.js";
|
|
29
32
|
import { type ChartScene, type ResolvedChartScene } from "./chart-scenes.js";
|
|
30
33
|
import { type ChartMaterialLayerScene, type ResolvedChartMaterialLayers } from "./chart-material-layers.js";
|
|
31
|
-
import { type ChartSizeOption, type CaptureIlluminant, type CallerMaterialScene, type CallerRadianceScene, type CallerReflectanceScene, type ResolvedCallerScene, type PlanarSceneRadianceProvider, type ResolvedCaptureIlluminant } from "./scene-radiance.js";
|
|
34
|
+
import { type ChartSizeOption, type CaptureIlluminant, type CallerMaterialScene, type CallerRadianceScene, type CallerReflectanceScene, type ImagePlaneScene, type ResolvedCallerScene, type PlanarSceneRadianceProvider, type ResolvedCaptureIlluminant } from "./scene-radiance.js";
|
|
32
35
|
/** Version of how the facade builds requests. It changes whenever the same input would build a different request. */
|
|
33
36
|
export declare const SIMULATE_CAPTURE_FACADE_VERSION: "1.0.0";
|
|
34
37
|
export type SimulateCaptureExposureMode = "manual" | "aperture-priority" | "shutter-priority" | "program";
|
|
@@ -161,8 +164,9 @@ export type SimulateCaptureDemosaic = "bilinear" | "ahd";
|
|
|
161
164
|
/**
|
|
162
165
|
* `lens.catalogue` as a record (#568): the lens id as `kind` and the `fast` override (see {@link SimulateCaptureOptions.fast}).
|
|
163
166
|
* Fast: the tabulated fast method (#568), and with `lens.defocus` the lens's bokeh without its cat's eye (#567; fast wides and
|
|
164
|
-
* normals only), whose field-varying PSF needs a finer fast grid (measured 2.2–3.4× slower)
|
|
165
|
-
*
|
|
167
|
+
* normals only), whose field-varying PSF needs a finer fast grid (measured 2.2–3.4× slower); with camera rotation under
|
|
168
|
+
* `motion.shutter: "rolling"`, the per-tap PSF points instead of the lattice reading (#588). Exact: the per-site PSF with the
|
|
169
|
+
* cat's eye, read on the lattice. Blades and spherical aberration always apply (they cost nothing).
|
|
166
170
|
*/
|
|
167
171
|
export interface SimulateCaptureLensCatalogueRecord {
|
|
168
172
|
kind: string;
|
|
@@ -313,6 +317,11 @@ export interface SimulateCaptureMotion {
|
|
|
313
317
|
shutter?: "global" | "rolling";
|
|
314
318
|
/** Rolling shutter only: time from the first to the last line over the simulated frame, in s. Default: the body's declared readout skew. */
|
|
315
319
|
rollingShutterSkewSeconds?: number;
|
|
320
|
+
/**
|
|
321
|
+
* #551: a moving subject: the whole scene, or one rectangle of it over a still background, translating on the scene plane
|
|
322
|
+
* (and optionally rotating about the optical axis) during the exposure. Off by default (a still scene).
|
|
323
|
+
*/
|
|
324
|
+
subject?: SimulateCaptureSubjectMotion;
|
|
316
325
|
}
|
|
317
326
|
export interface SimulateCaptureOptions {
|
|
318
327
|
/** Generic tier preset id or a full preset record (for example a modified copy of a catalog entry). Default "professional". */
|
|
@@ -468,9 +477,10 @@ export interface SimulateCaptureOptions {
|
|
|
468
477
|
/**
|
|
469
478
|
* Required: an engine chart (for example `{ preset: "uniform" }`, an 18 % grey card), a declared `material-layers` scene (#491:
|
|
470
479
|
* a chart under shape-mask layers, as `resolveChartMaterialLayers` takes it; the capture is that of its `callerScene`, byte for
|
|
471
|
-
* byte, and the display view can render it on the GPU),
|
|
480
|
+
* byte, and the display view can render it on the GPU), a caller reflectance, radiance or material function, or (2.21, #581) an
|
|
481
|
+
* `image-plane` scene: a photo as a flat print (docs/IMAGE_PLANE.md).
|
|
472
482
|
*/
|
|
473
|
-
scene: ChartScene | ChartMaterialLayerScene | CallerReflectanceScene | CallerRadianceScene | CallerMaterialScene;
|
|
483
|
+
scene: ChartScene | ChartMaterialLayerScene | CallerReflectanceScene | CallerRadianceScene | CallerMaterialScene | ImagePlaneScene;
|
|
474
484
|
/** Distance from the camera to the scene plane in metres. Default 5. */
|
|
475
485
|
subjectDistanceM?: number;
|
|
476
486
|
/**
|
|
@@ -485,6 +495,12 @@ export interface SimulateCaptureOptions {
|
|
|
485
495
|
illuminant?: CaptureIlluminant;
|
|
486
496
|
/** Illuminance on the scene plane, lux. Default about 21 481 lux (see `SIMULATE_CAPTURE_DEFAULT_ILLUMINANCE_LUX` and the assumptions). */
|
|
487
497
|
illuminanceLux?: number;
|
|
498
|
+
/**
|
|
499
|
+
* 2.22 (#550), opt-in mixed lighting: two or more sources blended across the chart (docs/MIXED_ILLUMINATION.md), instead of
|
|
500
|
+
* `illuminant` and `illuminanceLux`. The frame center's light sets the grey-card meter and the standard-exposure figures, and
|
|
501
|
+
* its strongest source the "scene-illuminant" white balance; both are reported in `assumptions`.
|
|
502
|
+
*/
|
|
503
|
+
illumination?: MixedIllumination;
|
|
488
504
|
output?: {
|
|
489
505
|
/** Output pixels; the native sensor raster adds a one-site demosaic border on each side. Defaults 64 × 64. */
|
|
490
506
|
width?: number;
|
|
@@ -495,8 +511,12 @@ export interface SimulateCaptureOptions {
|
|
|
495
511
|
toneCurve?: SdrToneCurve;
|
|
496
512
|
/** Required by the luminance tone curves (see `SdrToneCurveParameters`). The facade does not make one up. */
|
|
497
513
|
toneCurveParameters?: SdrToneCurveParameters;
|
|
498
|
-
/**
|
|
499
|
-
|
|
514
|
+
/**
|
|
515
|
+
* Default "clip". 2.22.0 (#602, opt-in): "reconstruct-neighbors" rebuilds clipped channels from color ratios of the unclipped
|
|
516
|
+
* pixels around each clipped region (an estimate; `src/color/neighbor-highlight-reconstruction.ts`): the ring's mean ratios
|
|
517
|
+
* (fast) or their harmonic interpolation inward (full). Whole-image, so not with `output.region`.
|
|
518
|
+
*/
|
|
519
|
+
highlightMode?: SimulateCaptureHighlightMode;
|
|
500
520
|
/**
|
|
501
521
|
* Opt-in (#556) development exposure push in stops, −2 to +5 (`NATIVE_RAW_DEVELOPMENT_EXPOSURE_RANGE_STOPS`); default 0.
|
|
502
522
|
* A linear gain 2^stops on the RAW after black subtraction and white normalization, before demosaic, white balance,
|
|
@@ -507,6 +527,14 @@ export interface SimulateCaptureOptions {
|
|
|
507
527
|
* honour it. Reported in the assumption `output.exposureCompensationStops`. 0 or omitted: byte-identical to before.
|
|
508
528
|
*/
|
|
509
529
|
exposureCompensationStops?: number;
|
|
530
|
+
/**
|
|
531
|
+
* #601 (2.22.0, opt-in): the sRGB rendering's gamut handling after the tone curve. "clip-components" (the default) clips
|
|
532
|
+
* each component to [0, 1]; "desaturate-to-luminance" moves a pixel whose largest component exceeds 1 toward the gray of its
|
|
533
|
+
* own luminance until that component is 1, keeping its luminance and hue (`desaturateToLuminance`, src/output/sdr-rendering.ts),
|
|
534
|
+
* instead of shifting bright saturated colors toward the secondaries. sRGB output only (not with a wide-gamut `colorEncoding`
|
|
535
|
+
* or `gamutMapping`). Reported in the assumption `output.gamutHandling`. Omitted: byte-identical to before.
|
|
536
|
+
*/
|
|
537
|
+
gamutHandling?: SdrRenderingProfile["gamutHandling"] & ("clip-components" | "desaturate-to-luminance");
|
|
510
538
|
/** Default "scene-illuminant". */
|
|
511
539
|
whiteBalance?: SimulateCaptureWhiteBalance;
|
|
512
540
|
/** JPEG constant quantization step 1-255 (not a manufacturer 'quality'). Default 1 (2.20.0; 2 before), the full-quality export. */
|
|
@@ -592,6 +620,13 @@ export interface SimulateCaptureOptions {
|
|
|
592
620
|
motion?: SimulateCaptureMotion;
|
|
593
621
|
/** #555: plus the sensor characteristics ({@link SimulateCaptureSensorCharacteristics}), each off by default. */
|
|
594
622
|
sensor?: SimulateCaptureSensorCharacteristics & {
|
|
623
|
+
/**
|
|
624
|
+
* #554: a sensor profile record (`SENSOR_PROFILES`, or `resolveSensorProfile(id)`), checked strictly. It replaces the body's ISO range, readout regimes
|
|
625
|
+
* (full well, read noise of each conversion gain, the dual-gain switch, high-gain storage, ADC bit depth), readout time and
|
|
626
|
+
* fixed-pattern noise, and sets the default pixel pitch and peak QE; explicit fields here still override it one at a time.
|
|
627
|
+
* Default: none (the body's own sensor). See docs/SENSOR_PROFILES.md.
|
|
628
|
+
*/
|
|
629
|
+
profile?: SensorProfile;
|
|
595
630
|
/**
|
|
596
631
|
* Pixel pitch in micrometres, 0.5–1000. Default 6. The simulated sensor is output width × pitch wide. 2.5: above 100 µm the
|
|
597
632
|
* capture is a downsized view of a whole frame (for example 36 mm / 48 pixels = 750 µm), recorded in the assumption
|
|
@@ -637,14 +672,16 @@ export interface SimulateCaptureOptions {
|
|
|
637
672
|
* Options reported in `diagnostics.options` (2.1), in this order, when they ran: the ones that change how much work
|
|
638
673
|
* a capture does. `motion.rotation` is a non-zero angular velocity; `sensor.temporalSampleCount` a count above 1.
|
|
639
674
|
*/
|
|
640
|
-
export declare const SIMULATE_CAPTURE_COST_OPTIONS: readonly ["lens.pupilSampling", "lens.projection", "lens.distortion", "lens.vignetting", "lens.psf", "lens.diffraction", "lens.defocus", "lens.catalogue", "sensor.antiAliasing", "sensor.pixelAperture.box", "sensor.temporalSampleCount", "motion.rotation", "motion.shutter.rolling", "output.borderHandling.mirror", "output.region", "output.whiteBalance.auto", "output.demosaic.ahd", "output.highlightMode.reconstruct", "output.colorEncoding.wide-gamut", "output.gamutMapping.perceptual", "output.diffractionCorrection", "output.sharpening", "output.lensCorrections", "output.format.jpeg", "output.format.png", "output.format.dng"];
|
|
675
|
+
export declare const SIMULATE_CAPTURE_COST_OPTIONS: readonly ["lens.pupilSampling", "lens.projection", "lens.distortion", "lens.vignetting", "lens.psf", "lens.diffraction", "lens.defocus", "lens.catalogue", "sensor.antiAliasing", "sensor.pixelAperture.box", "sensor.temporalSampleCount", "sensor.spectralStepNanometers", "motion.rotation", "motion.subject", "motion.shutter.rolling", "output.borderHandling.mirror", "output.region", "output.whiteBalance.auto", "output.demosaic.ahd", "output.highlightMode.reconstruct", "output.colorEncoding.wide-gamut", "output.gamutMapping.perceptual", "output.diffractionCorrection", "output.sharpening", "output.lensCorrections", "output.format.jpeg", "output.format.png", "output.format.dng"];
|
|
641
676
|
export type SimulateCaptureCostOption = typeof SIMULATE_CAPTURE_COST_OPTIONS[number];
|
|
677
|
+
/** `output.highlightMode`: the RAW development's modes plus (#602) the whole-image neighbor reconstruction. */
|
|
678
|
+
export type SimulateCaptureHighlightMode = RawHighlightMode | "reconstruct-neighbors";
|
|
642
679
|
/**
|
|
643
680
|
* The options that take the exact-or-fast flag (#395), in the path style of {@link SIMULATE_CAPTURE_COST_OPTIONS}: each accepts
|
|
644
681
|
* the record form with `fast` and is reported in `diagnostics.fast.applied` when it runs. Every one of them takes the flag,
|
|
645
682
|
* whether or not it has a fast method yet; one without runs exact and reports `false`.
|
|
646
683
|
*/
|
|
647
|
-
export declare const SIMULATE_CAPTURE_FAST_OPTIONS: readonly ["lens.diffraction", "lens.catalogue", "sensor.antiAliasing", "sensor.pixelAperture.box", "output.demosaic.ahd"];
|
|
684
|
+
export declare const SIMULATE_CAPTURE_FAST_OPTIONS: readonly ["lens.diffraction", "lens.catalogue", "sensor.antiAliasing", "sensor.pixelAperture.box", "output.demosaic.ahd", "motion.subject", "sensor.spectralStepNanometers"];
|
|
648
685
|
export type SimulateCaptureFastOption = typeof SIMULATE_CAPTURE_FAST_OPTIONS[number];
|
|
649
686
|
/** `diagnostics.fast` of a capture or display view (#395): what was asked for and what ran. */
|
|
650
687
|
export interface SimulateCaptureFastReport {
|
|
@@ -1092,8 +1129,7 @@ export interface DisplayViewResult {
|
|
|
1092
1129
|
sensor: SimulateCaptureSensorReport;
|
|
1093
1130
|
/**
|
|
1094
1131
|
* Work done: real pixels sampled, real-site expectations evaluated, scene queries, display pixels sampled in full (detail) or with
|
|
1095
|
-
* a quarter of the samples per axis (uniform),
|
|
1096
|
-
* milliseconds (diagnostic only; never affects the samples).
|
|
1132
|
+
* a quarter of the samples per axis (uniform), and wall-clock milliseconds (diagnostic only; never affects the samples).
|
|
1097
1133
|
*/
|
|
1098
1134
|
diagnostics: {
|
|
1099
1135
|
sampleCount: number;
|
|
@@ -1101,6 +1137,10 @@ export interface DisplayViewResult {
|
|
|
1101
1137
|
sceneLookups: number;
|
|
1102
1138
|
detailPixelCount: number;
|
|
1103
1139
|
uniformPixelCount: number;
|
|
1140
|
+
/**
|
|
1141
|
+
* Display pixels whose value included the AHD low-signal correction (2.10–2.21).
|
|
1142
|
+
* @deprecated Since 2.22.0 the view has no such correction, and this is always 0. Removed in 3.0.0.
|
|
1143
|
+
*/
|
|
1104
1144
|
ahdCorrectedPixelCount: number;
|
|
1105
1145
|
timingsMs: {
|
|
1106
1146
|
view: number;
|
|
@@ -1163,7 +1203,7 @@ export interface DisplayViewRunContext {
|
|
|
1163
1203
|
relativePerElectron: Record<Channel, number>;
|
|
1164
1204
|
};
|
|
1165
1205
|
boxSamples: number;
|
|
1166
|
-
buildProvider: (sceneIlluminant: ResolvedCaptureIlluminant, scale: number) => PlanarSceneRadianceProvider;
|
|
1206
|
+
buildProvider: (sceneIlluminant: ResolvedCaptureIlluminant, scale: number, light?: ResolvedMixedIllumination) => PlanarSceneRadianceProvider;
|
|
1167
1207
|
callerScene: ResolvedCallerScene | undefined;
|
|
1168
1208
|
chart: ResolvedChartScene | undefined;
|
|
1169
1209
|
/** #491: the declared material-layers scene behind `callerScene`, when the request gave one. */
|
|
@@ -1196,6 +1236,8 @@ export interface DisplayViewRunContext {
|
|
|
1196
1236
|
* through the lens (display-view-lens-signal.ts, loaded on demand); undefined without them (the rectilinear expected signal).
|
|
1197
1237
|
*/
|
|
1198
1238
|
lens?: ((input: DisplayViewExpectedSignalInput, spanColumns?: number) => DisplayViewExpectedSignal) | undefined;
|
|
1239
|
+
/** #551: with motion.subject, the moving scene of a provider (its irradiance scale and illuminant shape, or #550's mixed lighting, light the revealed background). */
|
|
1240
|
+
movingScene?: ((base: PlanarSceneRadianceProvider, scale: number, shape: (nm: number) => number, light?: ResolvedMixedIllumination) => PlanarSceneRadianceProvider) | undefined;
|
|
1199
1241
|
/** #569: with `lens.catalogue`, the field-dependent PSF the lens signal reads (createDisplayViewLensPsf, display-view-lens-signal.ts); its axis kernels set the expected signal's lattice. */
|
|
1200
1242
|
lensPsf?: DisplayViewLensPsf | undefined;
|
|
1201
1243
|
diffractionPsf: {
|
|
@@ -1206,7 +1248,7 @@ export interface DisplayViewRunContext {
|
|
|
1206
1248
|
focalLengthMm: number;
|
|
1207
1249
|
focusDistanceM: number;
|
|
1208
1250
|
height: number;
|
|
1209
|
-
highlightMode:
|
|
1251
|
+
highlightMode: SimulateCaptureHighlightMode;
|
|
1210
1252
|
/** #556: the development exposure gain 2^output.exposureCompensationStops (1 without a push). */
|
|
1211
1253
|
exposureGain: number;
|
|
1212
1254
|
illuminanceLux: number;
|
|
@@ -1229,11 +1271,13 @@ export interface DisplayViewRunContext {
|
|
|
1229
1271
|
regimeId: string;
|
|
1230
1272
|
}>;
|
|
1231
1273
|
sensor: SimulateCaptureSensorReport;
|
|
1232
|
-
/** 2.20.0: the view's own fast methods, resolved: the
|
|
1274
|
+
/** 2.20.0: the view's own fast methods, resolved: the quarter sampling of uniform pixels (top-level `fast`); 2.22.0: the coupled rendering steps' rules (#593, #601). */
|
|
1233
1275
|
viewFast: {
|
|
1234
|
-
ahd: boolean;
|
|
1235
1276
|
uniformSampling: boolean;
|
|
1277
|
+
rendering: boolean;
|
|
1236
1278
|
};
|
|
1279
|
+
/** #601: the sRGB rendering's gamut handling. */
|
|
1280
|
+
gamutHandling: "clip-components" | "desaturate-to-luminance";
|
|
1237
1281
|
resolvedIso: number;
|
|
1238
1282
|
/** #516: how the ISO was chosen, reported in the view's `exposure`. */
|
|
1239
1283
|
isoReport: {
|
|
@@ -1249,7 +1293,7 @@ export interface DisplayViewRunContext {
|
|
|
1249
1293
|
/** 2.14: the capture's `exposure.metering`. */
|
|
1250
1294
|
metering: SimulateCaptureMetering;
|
|
1251
1295
|
sceneOption: unknown;
|
|
1252
|
-
scenePreset: "composite" | "uniform" | "patches" | "slanted-edge" | "siemens-star" | "step-wedge" | "grey-ramp" | "checkerboard" | "point-grid" | "dead-leaves" | "bar-groups" | "hyperbolic-wedge" | "zone-plate" | "slanted-squares" | "line-grid" | "fiducial" | "color-patches" | "reflectance-function" | "radiance-function" | "material-function";
|
|
1296
|
+
scenePreset: "composite" | "uniform" | "patches" | "slanted-edge" | "siemens-star" | "step-wedge" | "grey-ramp" | "checkerboard" | "point-grid" | "dead-leaves" | "bar-groups" | "hyperbolic-wedge" | "zone-plate" | "slanted-squares" | "line-grid" | "fiducial" | "color-patches" | "reflectance-function" | "radiance-function" | "material-function" | "image-plane";
|
|
1253
1297
|
shutterSeconds: number;
|
|
1254
1298
|
started: number;
|
|
1255
1299
|
subjectDistanceM: number;
|
|
@@ -1266,6 +1310,8 @@ export interface DisplayViewRunContext {
|
|
|
1266
1310
|
yieldControl: () => Promise<void>;
|
|
1267
1311
|
/** The Kelvin white balance request, which the view resolves with the portable functions. */
|
|
1268
1312
|
kelvinWhiteBalanceInput: Parameters<typeof resolveColorTemperatureWhiteBalance>[0] | undefined;
|
|
1313
|
+
/** #550: with `illumination`, resolves it again with the given illuminant formulas (the view's portable ones). */
|
|
1314
|
+
mixedIllumination?: ((resolve: (value: CaptureIlluminant) => ResolvedCaptureIlluminant) => ResolvedMixedIllumination) | undefined;
|
|
1269
1315
|
}
|
|
1270
1316
|
export interface ParsedDisplayView {
|
|
1271
1317
|
width: number;
|
|
@@ -1290,7 +1336,9 @@ type CaptureRun = "capture" | "ideal-reference" | "display-view" | "dng-from-par
|
|
|
1290
1336
|
* Internal: the request path shared by {@link simulateCapture}, {@link simulateIdealReference} and the display view, whose renderer is
|
|
1291
1337
|
* passed in; for a display view the renderer's value is returned (a result, or a prepared view with DISPLAY_VIEW_WITHOUT_VIEW).
|
|
1292
1338
|
*/
|
|
1293
|
-
export declare function runCapture(options: SimulateCaptureOptions, run: CaptureRun,
|
|
1339
|
+
export declare function runCapture(options: SimulateCaptureOptions, run: CaptureRun,
|
|
1340
|
+
/** The display view option, the parts, or (#534) for a capture an exposure build-up's callback, which sees each native RAW input. */
|
|
1341
|
+
viewOption?: unknown, renderView?: (context: DisplayViewRunContext) => Promise<unknown>): Promise<unknown>;
|
|
1294
1342
|
/** Chart preset ids accepted by `simulateCapture({ scene: { preset } })`. */
|
|
1295
1343
|
export declare const SIMULATE_CAPTURE_CHART_PRESETS: readonly ("composite" | "uniform" | "patches" | "slanted-edge" | "siemens-star" | "step-wedge" | "grey-ramp" | "checkerboard" | "point-grid" | "color-patches" | "dead-leaves" | "bar-groups" | "hyperbolic-wedge" | "zone-plate" | "slanted-squares" | "line-grid" | "fiducial")[];
|
|
1296
1344
|
export {};
|