@photivra/engine 0.6.0 → 1.0.1
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/AGENTS.md +674 -0
- package/CHANGELOG.md +191 -0
- package/CITATION.cff +1 -1
- package/CONTRIBUTING.md +76 -0
- package/DCO +33 -0
- package/NODE_SUPPORT.md +37 -0
- package/NOTICE +2 -0
- package/README.md +139 -72
- package/SECURITY.md +55 -0
- package/THIRD_PARTY.md +63 -0
- package/dist/camera/equivalent-focal-length.d.ts +9 -0
- package/dist/camera/equivalent-focal-length.d.ts.map +1 -1
- package/dist/camera/equivalent-focal-length.js +9 -0
- package/dist/camera/equivalent-focal-length.js.map +1 -1
- package/dist/camera/field-of-view.d.ts +13 -0
- package/dist/camera/field-of-view.d.ts.map +1 -1
- package/dist/camera/field-of-view.js +13 -0
- package/dist/camera/field-of-view.js.map +1 -1
- package/dist/camera/projected-object-size.d.ts +8 -0
- package/dist/camera/projected-object-size.d.ts.map +1 -1
- package/dist/camera/projected-object-size.js +8 -0
- package/dist/camera/projected-object-size.js.map +1 -1
- package/dist/capture/capture-export-metadata.d.ts +60 -0
- package/dist/capture/capture-export-metadata.d.ts.map +1 -0
- package/dist/capture/capture-export-metadata.js +62 -0
- package/dist/capture/capture-export-metadata.js.map +1 -0
- package/dist/capture/environment-raw-producer.d.ts +55 -0
- package/dist/capture/environment-raw-producer.d.ts.map +1 -0
- package/dist/capture/environment-raw-producer.js +88 -0
- package/dist/capture/environment-raw-producer.js.map +1 -0
- package/dist/capture/export-jpeg.d.ts +12 -0
- package/dist/capture/export-jpeg.d.ts.map +1 -0
- package/dist/capture/export-jpeg.js +126 -0
- package/dist/capture/export-jpeg.js.map +1 -0
- package/dist/capture/export-tiff.d.ts +45 -0
- package/dist/capture/export-tiff.d.ts.map +1 -0
- package/dist/capture/export-tiff.js +129 -0
- package/dist/capture/export-tiff.js.map +1 -0
- package/dist/capture/focus-control.d.ts +210 -0
- package/dist/capture/focus-control.d.ts.map +1 -0
- package/dist/capture/focus-control.js +664 -0
- package/dist/capture/focus-control.js.map +1 -0
- package/dist/capture/linear-encoding.d.ts +59 -0
- package/dist/capture/linear-encoding.d.ts.map +1 -0
- package/dist/capture/linear-encoding.js +98 -0
- package/dist/capture/linear-encoding.js.map +1 -0
- package/dist/capture/photographic-export.d.ts +135 -0
- package/dist/capture/photographic-export.d.ts.map +1 -0
- package/dist/capture/photographic-export.js +273 -0
- package/dist/capture/photographic-export.js.map +1 -0
- package/dist/capture/raw-frame-limits.d.ts +12 -0
- package/dist/capture/raw-frame-limits.d.ts.map +1 -0
- package/dist/capture/raw-frame-limits.js +13 -0
- package/dist/capture/raw-frame-limits.js.map +1 -0
- package/dist/capture/raw-frame-reconstruction.d.ts +48 -0
- package/dist/capture/raw-frame-reconstruction.d.ts.map +1 -0
- package/dist/capture/raw-frame-reconstruction.js +146 -0
- package/dist/capture/raw-frame-reconstruction.js.map +1 -0
- package/dist/capture/release-sequence.d.ts +120 -0
- package/dist/capture/release-sequence.d.ts.map +1 -0
- package/dist/capture/release-sequence.js +446 -0
- package/dist/capture/release-sequence.js.map +1 -0
- package/dist/capture/sensor-raw-frame.d.ts +34 -0
- package/dist/capture/sensor-raw-frame.d.ts.map +1 -0
- package/dist/capture/sensor-raw-frame.js +106 -0
- package/dist/capture/sensor-raw-frame.js.map +1 -0
- package/dist/capture/sensor-raw-producer.d.ts +51 -0
- package/dist/capture/sensor-raw-producer.d.ts.map +1 -0
- package/dist/capture/sensor-raw-producer.js +235 -0
- package/dist/capture/sensor-raw-producer.js.map +1 -0
- package/dist/capture/simulated-capture.d.ts +125 -0
- package/dist/capture/simulated-capture.d.ts.map +1 -0
- package/dist/capture/simulated-capture.js +248 -0
- package/dist/capture/simulated-capture.js.map +1 -0
- package/dist/color/capture-color.d.ts +73 -0
- package/dist/color/capture-color.d.ts.map +1 -0
- package/dist/color/capture-color.js +145 -0
- package/dist/color/capture-color.js.map +1 -0
- package/dist/color/sensor-color-development.d.ts +23 -0
- package/dist/color/sensor-color-development.d.ts.map +1 -0
- package/dist/color/sensor-color-development.js +56 -0
- package/dist/color/sensor-color-development.js.map +1 -0
- package/dist/color/white-balance.d.ts +175 -0
- package/dist/color/white-balance.d.ts.map +1 -0
- package/dist/color/white-balance.js +606 -0
- package/dist/color/white-balance.js.map +1 -0
- package/dist/composition/image-formation-plan.d.ts +481 -0
- package/dist/composition/image-formation-plan.d.ts.map +1 -0
- package/dist/composition/image-formation-plan.js +2499 -0
- package/dist/composition/image-formation-plan.js.map +1 -0
- package/dist/composition/plan-consumer.d.ts +53 -0
- package/dist/composition/plan-consumer.d.ts.map +1 -0
- package/dist/composition/plan-consumer.js +119 -0
- package/dist/composition/plan-consumer.js.map +1 -0
- package/dist/core/calculation-result.d.ts.map +1 -1
- package/dist/core/calculation-result.js +6 -0
- package/dist/core/calculation-result.js.map +1 -1
- package/dist/core/canonical-json.d.ts +18 -0
- package/dist/core/canonical-json.d.ts.map +1 -0
- package/dist/core/canonical-json.js +44 -0
- package/dist/core/canonical-json.js.map +1 -0
- package/dist/core/configuration-error.d.ts +6 -0
- package/dist/core/configuration-error.d.ts.map +1 -1
- package/dist/core/configuration-error.js +6 -0
- package/dist/core/configuration-error.js.map +1 -1
- package/dist/core/evidence-provenance.d.ts +6 -0
- package/dist/core/evidence-provenance.d.ts.map +1 -1
- package/dist/core/evidence-provenance.js +7 -0
- package/dist/core/evidence-provenance.js.map +1 -1
- package/dist/core/image-formation.d.ts +9 -3
- package/dist/core/image-formation.d.ts.map +1 -1
- package/dist/core/image-formation.js +29 -5
- package/dist/core/image-formation.js.map +1 -1
- package/dist/core/owned-data.d.ts +25 -0
- package/dist/core/owned-data.d.ts.map +1 -0
- package/dist/core/owned-data.js +34 -0
- package/dist/core/owned-data.js.map +1 -0
- package/dist/core/record-validation.d.ts +17 -0
- package/dist/core/record-validation.d.ts.map +1 -0
- package/dist/core/record-validation.js +44 -0
- package/dist/core/record-validation.js.map +1 -0
- package/dist/core/scientific-assurance.d.ts +101 -0
- package/dist/core/scientific-assurance.d.ts.map +1 -0
- package/dist/core/scientific-assurance.js +301 -0
- package/dist/core/scientific-assurance.js.map +1 -0
- package/dist/core/spectral-composition.d.ts +106 -0
- package/dist/core/spectral-composition.d.ts.map +1 -0
- package/dist/core/spectral-composition.js +334 -0
- package/dist/core/spectral-composition.js.map +1 -0
- package/dist/core/spectral.d.ts +34 -0
- package/dist/core/spectral.d.ts.map +1 -0
- package/dist/core/spectral.js +57 -0
- package/dist/core/spectral.js.map +1 -0
- package/dist/core/validation.d.ts +6 -0
- package/dist/core/validation.d.ts.map +1 -1
- package/dist/core/validation.js +6 -0
- package/dist/core/validation.js.map +1 -1
- package/dist/core/version.d.ts +9 -0
- package/dist/core/version.d.ts.map +1 -0
- package/dist/core/version.js +10 -0
- package/dist/core/version.js.map +1 -0
- package/dist/equipment/exposure-capabilities.d.ts +125 -0
- package/dist/equipment/exposure-capabilities.d.ts.map +1 -0
- package/dist/equipment/exposure-capabilities.js +391 -0
- package/dist/equipment/exposure-capabilities.js.map +1 -0
- package/dist/equipment/generic-tier-assets.d.ts +82 -0
- package/dist/equipment/generic-tier-assets.d.ts.map +1 -0
- package/dist/equipment/generic-tier-assets.js +119 -0
- package/dist/equipment/generic-tier-assets.js.map +1 -0
- package/dist/equipment/generic-tier-presets.d.ts +57 -0
- package/dist/equipment/generic-tier-presets.d.ts.map +1 -0
- package/dist/equipment/generic-tier-presets.js +122 -0
- package/dist/equipment/generic-tier-presets.js.map +1 -0
- package/dist/equipment/iso-capabilities.d.ts +143 -0
- package/dist/equipment/iso-capabilities.d.ts.map +1 -0
- package/dist/equipment/iso-capabilities.js +578 -0
- package/dist/equipment/iso-capabilities.js.map +1 -0
- package/dist/equipment/metering-capabilities.d.ts +58 -0
- package/dist/equipment/metering-capabilities.d.ts.map +1 -0
- package/dist/equipment/metering-capabilities.js +151 -0
- package/dist/equipment/metering-capabilities.js.map +1 -0
- package/dist/equipment/release-capabilities.d.ts +33 -0
- package/dist/equipment/release-capabilities.d.ts.map +1 -0
- package/dist/equipment/release-capabilities.js +176 -0
- package/dist/equipment/release-capabilities.js.map +1 -0
- package/dist/exposure/exposure-duration-control.d.ts +72 -0
- package/dist/exposure/exposure-duration-control.d.ts.map +1 -0
- package/dist/exposure/exposure-duration-control.js +161 -0
- package/dist/exposure/exposure-duration-control.js.map +1 -0
- package/dist/exposure/exposure-mode-resolver.d.ts +637 -0
- package/dist/exposure/exposure-mode-resolver.d.ts.map +1 -0
- package/dist/exposure/exposure-mode-resolver.js +1905 -0
- package/dist/exposure/exposure-mode-resolver.js.map +1 -0
- package/dist/exposure/exposure.d.ts +8 -0
- package/dist/exposure/exposure.d.ts.map +1 -1
- package/dist/exposure/exposure.js +8 -0
- package/dist/exposure/exposure.js.map +1 -1
- package/dist/exposure/flash.d.ts +179 -0
- package/dist/exposure/flash.d.ts.map +1 -0
- package/dist/exposure/flash.js +644 -0
- package/dist/exposure/flash.js.map +1 -0
- package/dist/exposure/metering-scene-radiance.d.ts +72 -0
- package/dist/exposure/metering-scene-radiance.d.ts.map +1 -0
- package/dist/exposure/metering-scene-radiance.js +222 -0
- package/dist/exposure/metering-scene-radiance.js.map +1 -0
- package/dist/exposure/metering-target.d.ts +67 -0
- package/dist/exposure/metering-target.d.ts.map +1 -0
- package/dist/exposure/metering-target.js +265 -0
- package/dist/exposure/metering-target.js.map +1 -0
- package/dist/exposure/metering-temporal.d.ts +76 -0
- package/dist/exposure/metering-temporal.d.ts.map +1 -0
- package/dist/exposure/metering-temporal.js +210 -0
- package/dist/exposure/metering-temporal.js.map +1 -0
- package/dist/exposure/metering.d.ts +124 -0
- package/dist/exposure/metering.d.ts.map +1 -0
- package/dist/exposure/metering.js +422 -0
- package/dist/exposure/metering.js.map +1 -0
- package/dist/exposure/program-line.d.ts +29 -0
- package/dist/exposure/program-line.d.ts.map +1 -0
- package/dist/exposure/program-line.js +126 -0
- package/dist/exposure/program-line.js.map +1 -0
- package/dist/index.d.ts +87 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +85 -6
- package/dist/index.js.map +1 -1
- package/dist/motion/camera-rotation.d.ts +16 -0
- package/dist/motion/camera-rotation.d.ts.map +1 -1
- package/dist/motion/camera-rotation.js +16 -0
- package/dist/motion/camera-rotation.js.map +1 -1
- package/dist/motion/capture-rotation-inverse-mapping.d.ts +13 -0
- package/dist/motion/capture-rotation-inverse-mapping.d.ts.map +1 -1
- package/dist/motion/capture-rotation-inverse-mapping.js +13 -0
- package/dist/motion/capture-rotation-inverse-mapping.js.map +1 -1
- package/dist/motion/capture-rotation-temporal-quadrature.d.ts +15 -0
- package/dist/motion/capture-rotation-temporal-quadrature.d.ts.map +1 -1
- package/dist/motion/capture-rotation-temporal-quadrature.js +15 -0
- package/dist/motion/capture-rotation-temporal-quadrature.js.map +1 -1
- package/dist/motion/capture-rotation-trajectory.d.ts +15 -0
- package/dist/motion/capture-rotation-trajectory.d.ts.map +1 -1
- package/dist/motion/capture-rotation-trajectory.js +15 -0
- package/dist/motion/capture-rotation-trajectory.js.map +1 -1
- package/dist/motion/capture-translation-parallax-temporal-quadrature.d.ts +119 -0
- package/dist/motion/capture-translation-parallax-temporal-quadrature.d.ts.map +1 -0
- package/dist/motion/capture-translation-parallax-temporal-quadrature.js +263 -0
- package/dist/motion/capture-translation-parallax-temporal-quadrature.js.map +1 -0
- package/dist/motion/extended-object-projection.d.ts +175 -0
- package/dist/motion/extended-object-projection.d.ts.map +1 -0
- package/dist/motion/extended-object-projection.js +402 -0
- package/dist/motion/extended-object-projection.js.map +1 -0
- package/dist/motion/projected-motion.d.ts +11 -0
- package/dist/motion/projected-motion.d.ts.map +1 -1
- package/dist/motion/projected-motion.js +11 -0
- package/dist/motion/projected-motion.js.map +1 -1
- package/dist/optics/aperture.d.ts +9 -0
- package/dist/optics/aperture.d.ts.map +1 -1
- package/dist/optics/aperture.js +9 -0
- package/dist/optics/aperture.js.map +1 -1
- package/dist/optics/circle-of-confusion.d.ts +8 -0
- package/dist/optics/circle-of-confusion.d.ts.map +1 -1
- package/dist/optics/circle-of-confusion.js +8 -0
- package/dist/optics/circle-of-confusion.js.map +1 -1
- package/dist/optics/complex-pupil-psf.d.ts +128 -0
- package/dist/optics/complex-pupil-psf.d.ts.map +1 -0
- package/dist/optics/complex-pupil-psf.js +462 -0
- package/dist/optics/complex-pupil-psf.js.map +1 -0
- package/dist/optics/depth-of-field.d.ts +18 -0
- package/dist/optics/depth-of-field.d.ts.map +1 -1
- package/dist/optics/depth-of-field.js +29 -4
- package/dist/optics/depth-of-field.js.map +1 -1
- package/dist/optics/diffraction.d.ts +8 -0
- package/dist/optics/diffraction.d.ts.map +1 -1
- package/dist/optics/diffraction.js +8 -0
- package/dist/optics/diffraction.js.map +1 -1
- package/dist/optics/focus-breathing.d.ts +13 -0
- package/dist/optics/focus-breathing.d.ts.map +1 -1
- package/dist/optics/focus-breathing.js +13 -0
- package/dist/optics/focus-breathing.js.map +1 -1
- package/dist/optics/focus-state.d.ts +47 -0
- package/dist/optics/focus-state.d.ts.map +1 -0
- package/dist/optics/focus-state.js +78 -0
- package/dist/optics/focus-state.js.map +1 -0
- package/dist/optics/front-of-lens-filter.d.ts +114 -0
- package/dist/optics/front-of-lens-filter.d.ts.map +1 -0
- package/dist/optics/front-of-lens-filter.js +468 -0
- package/dist/optics/front-of-lens-filter.js.map +1 -0
- package/dist/optics/illumination-vignetting.d.ts +9 -0
- package/dist/optics/illumination-vignetting.d.ts.map +1 -1
- package/dist/optics/illumination-vignetting.js +9 -0
- package/dist/optics/illumination-vignetting.js.map +1 -1
- package/dist/optics/lateral-chromatic-aberration.d.ts +11 -0
- package/dist/optics/lateral-chromatic-aberration.d.ts.map +1 -1
- package/dist/optics/lateral-chromatic-aberration.js +11 -0
- package/dist/optics/lateral-chromatic-aberration.js.map +1 -1
- package/dist/optics/lens-psf-profile.d.ts +217 -0
- package/dist/optics/lens-psf-profile.d.ts.map +1 -0
- package/dist/optics/lens-psf-profile.js +823 -0
- package/dist/optics/lens-psf-profile.js.map +1 -0
- package/dist/optics/polygon-diffraction.d.ts +67 -0
- package/dist/optics/polygon-diffraction.d.ts.map +1 -0
- package/dist/optics/polygon-diffraction.js +145 -0
- package/dist/optics/polygon-diffraction.js.map +1 -0
- package/dist/optics/profile-contract.d.ts +42 -0
- package/dist/optics/profile-contract.d.ts.map +1 -0
- package/dist/optics/profile-contract.js +92 -0
- package/dist/optics/profile-contract.js.map +1 -0
- package/dist/optics/psf-foundation.d.ts +16 -3
- package/dist/optics/psf-foundation.d.ts.map +1 -1
- package/dist/optics/psf-foundation.js +28 -15
- package/dist/optics/psf-foundation.js.map +1 -1
- package/dist/optics/radial-distortion.d.ts +18 -0
- package/dist/optics/radial-distortion.d.ts.map +1 -1
- package/dist/optics/radial-distortion.js +18 -0
- package/dist/optics/radial-distortion.js.map +1 -1
- package/dist/optics/scene-to-sensor-irradiance.d.ts +213 -0
- package/dist/optics/scene-to-sensor-irradiance.d.ts.map +1 -0
- package/dist/optics/scene-to-sensor-irradiance.js +662 -0
- package/dist/optics/scene-to-sensor-irradiance.js.map +1 -0
- package/dist/optics/scene-to-sensor-quadrature.d.ts +63 -0
- package/dist/optics/scene-to-sensor-quadrature.d.ts.map +1 -0
- package/dist/optics/scene-to-sensor-quadrature.js +82 -0
- package/dist/optics/scene-to-sensor-quadrature.js.map +1 -0
- package/dist/optics/sensor-environment-query.d.ts +60 -0
- package/dist/optics/sensor-environment-query.d.ts.map +1 -0
- package/dist/optics/sensor-environment-query.js +50 -0
- package/dist/optics/sensor-environment-query.js.map +1 -0
- package/dist/optics/sensor-psf-quadrature.d.ts +70 -0
- package/dist/optics/sensor-psf-quadrature.d.ts.map +1 -0
- package/dist/optics/sensor-psf-quadrature.js +101 -0
- package/dist/optics/sensor-psf-quadrature.js.map +1 -0
- package/dist/optics/sensor-psf-support.d.ts +20 -0
- package/dist/optics/sensor-psf-support.d.ts.map +1 -0
- package/dist/optics/sensor-psf-support.js +13 -0
- package/dist/optics/sensor-psf-support.js.map +1 -0
- package/dist/optics/stray-light.d.ts +91 -0
- package/dist/optics/stray-light.d.ts.map +1 -0
- package/dist/optics/stray-light.js +110 -0
- package/dist/optics/stray-light.js.map +1 -0
- package/dist/optics/thin-lens.d.ts +8 -0
- package/dist/optics/thin-lens.d.ts.map +1 -1
- package/dist/optics/thin-lens.js +8 -0
- package/dist/optics/thin-lens.js.map +1 -1
- package/dist/output/capture-corrected-sdr.d.ts +49 -0
- package/dist/output/capture-corrected-sdr.d.ts.map +1 -0
- package/dist/output/capture-corrected-sdr.js +149 -0
- package/dist/output/capture-corrected-sdr.js.map +1 -0
- package/dist/output/capture-geometry.d.ts.map +1 -1
- package/dist/output/capture-geometry.js +8 -0
- package/dist/output/capture-geometry.js.map +1 -1
- package/dist/output/capture-sdr.d.ts +49 -0
- package/dist/output/capture-sdr.d.ts.map +1 -0
- package/dist/output/capture-sdr.js +90 -0
- package/dist/output/capture-sdr.js.map +1 -0
- package/dist/output/crop.d.ts +6 -0
- package/dist/output/crop.d.ts.map +1 -1
- package/dist/output/crop.js +6 -0
- package/dist/output/crop.js.map +1 -1
- package/dist/output/geometric-transforms.d.ts +137 -0
- package/dist/output/geometric-transforms.d.ts.map +1 -0
- package/dist/output/geometric-transforms.js +225 -0
- package/dist/output/geometric-transforms.js.map +1 -0
- package/dist/output/lens-corrections.d.ts +121 -0
- package/dist/output/lens-corrections.d.ts.map +1 -0
- package/dist/output/lens-corrections.js +210 -0
- package/dist/output/lens-corrections.js.map +1 -0
- package/dist/output/sdr-rendering.d.ts +81 -0
- package/dist/output/sdr-rendering.d.ts.map +1 -0
- package/dist/output/sdr-rendering.js +106 -0
- package/dist/output/sdr-rendering.js.map +1 -0
- package/dist/output/subject-framing-crop.d.ts +8 -0
- package/dist/output/subject-framing-crop.d.ts.map +1 -1
- package/dist/output/subject-framing-crop.js +8 -0
- package/dist/output/subject-framing-crop.js.map +1 -1
- package/dist/schema/camera.d.ts +6 -0
- package/dist/schema/camera.d.ts.map +1 -1
- package/dist/schema/illumination-spectral.d.ts +51 -0
- package/dist/schema/illumination-spectral.d.ts.map +1 -0
- package/dist/schema/illumination-spectral.js +132 -0
- package/dist/schema/illumination-spectral.js.map +1 -0
- package/dist/schema/illumination-temporal.d.ts +156 -0
- package/dist/schema/illumination-temporal.d.ts.map +1 -0
- package/dist/schema/illumination-temporal.js +554 -0
- package/dist/schema/illumination-temporal.js.map +1 -0
- package/dist/schema/illumination.d.ts +138 -0
- package/dist/schema/illumination.d.ts.map +1 -0
- package/dist/schema/illumination.js +483 -0
- package/dist/schema/illumination.js.map +1 -0
- package/dist/schema/scene-radiance-temporal.d.ts +107 -0
- package/dist/schema/scene-radiance-temporal.d.ts.map +1 -0
- package/dist/schema/scene-radiance-temporal.js +259 -0
- package/dist/schema/scene-radiance-temporal.js.map +1 -0
- package/dist/schema/scene-radiance.d.ts +185 -0
- package/dist/schema/scene-radiance.d.ts.map +1 -0
- package/dist/schema/scene-radiance.js +535 -0
- package/dist/schema/scene-radiance.js.map +1 -0
- package/dist/schema/scene.d.ts +7 -0
- package/dist/schema/scene.d.ts.map +1 -1
- package/dist/schema/validation.d.ts.map +1 -1
- package/dist/schema/validation.js +7 -0
- package/dist/schema/validation.js.map +1 -1
- package/dist/sensor/accumulated-charge.d.ts +199 -0
- package/dist/sensor/accumulated-charge.d.ts.map +1 -0
- package/dist/sensor/accumulated-charge.js +450 -0
- package/dist/sensor/accumulated-charge.js.map +1 -0
- package/dist/sensor/architecture.d.ts +48 -13
- package/dist/sensor/architecture.d.ts.map +1 -1
- package/dist/sensor/architecture.js +58 -16
- package/dist/sensor/architecture.js.map +1 -1
- package/dist/sensor/camera-saturation-capacity.d.ts +138 -0
- package/dist/sensor/camera-saturation-capacity.d.ts.map +1 -0
- package/dist/sensor/camera-saturation-capacity.js +356 -0
- package/dist/sensor/camera-saturation-capacity.js.map +1 -0
- package/dist/sensor/capture-color-sampling-binding.d.ts +1 -0
- package/dist/sensor/capture-color-sampling-binding.d.ts.map +1 -1
- package/dist/sensor/capture-color-sampling-binding.js +14 -0
- package/dist/sensor/capture-color-sampling-binding.js.map +1 -1
- package/dist/sensor/capture-mode-timing.d.ts +63 -0
- package/dist/sensor/capture-mode-timing.d.ts.map +1 -0
- package/dist/sensor/capture-mode-timing.js +270 -0
- package/dist/sensor/capture-mode-timing.js.map +1 -0
- package/dist/sensor/capture-mode.d.ts.map +1 -1
- package/dist/sensor/capture-mode.js +13 -0
- package/dist/sensor/capture-mode.js.map +1 -1
- package/dist/sensor/color-sampling.d.ts.map +1 -1
- package/dist/sensor/color-sampling.js +19 -0
- package/dist/sensor/color-sampling.js.map +1 -1
- package/dist/sensor/constant-rate-temporal-integration.d.ts +126 -0
- package/dist/sensor/constant-rate-temporal-integration.d.ts.map +1 -0
- package/dist/sensor/constant-rate-temporal-integration.js +382 -0
- package/dist/sensor/constant-rate-temporal-integration.js.map +1 -0
- package/dist/sensor/dark-current.d.ts +169 -0
- package/dist/sensor/dark-current.d.ts.map +1 -0
- package/dist/sensor/dark-current.js +427 -0
- package/dist/sensor/dark-current.js.map +1 -0
- package/dist/sensor/environment-photo-signal.d.ts +123 -0
- package/dist/sensor/environment-photo-signal.d.ts.map +1 -0
- package/dist/sensor/environment-photo-signal.js +186 -0
- package/dist/sensor/environment-photo-signal.js.map +1 -0
- package/dist/sensor/eqe-electron-rate.d.ts +107 -0
- package/dist/sensor/eqe-electron-rate.d.ts.map +1 -0
- package/dist/sensor/eqe-electron-rate.js +561 -0
- package/dist/sensor/eqe-electron-rate.js.map +1 -0
- package/dist/sensor/eqe-local-exposure.d.ts +65 -0
- package/dist/sensor/eqe-local-exposure.d.ts.map +1 -0
- package/dist/sensor/eqe-local-exposure.js +84 -0
- package/dist/sensor/eqe-local-exposure.js.map +1 -0
- package/dist/sensor/eqe-temporal-exposure.d.ts +55 -0
- package/dist/sensor/eqe-temporal-exposure.d.ts.map +1 -0
- package/dist/sensor/eqe-temporal-exposure.js +62 -0
- package/dist/sensor/eqe-temporal-exposure.js.map +1 -0
- package/dist/sensor/exposure-window.d.ts +14 -0
- package/dist/sensor/exposure-window.d.ts.map +1 -1
- package/dist/sensor/exposure-window.js +14 -0
- package/dist/sensor/exposure-window.js.map +1 -1
- package/dist/sensor/iso-signal-chain.d.ts +148 -0
- package/dist/sensor/iso-signal-chain.d.ts.map +1 -0
- package/dist/sensor/iso-signal-chain.js +411 -0
- package/dist/sensor/iso-signal-chain.js.map +1 -0
- package/dist/sensor/local-exposure-binding.d.ts +87 -0
- package/dist/sensor/local-exposure-binding.d.ts.map +1 -0
- package/dist/sensor/local-exposure-binding.js +214 -0
- package/dist/sensor/local-exposure-binding.js.map +1 -0
- package/dist/sensor/optical-stack.d.ts.map +1 -1
- package/dist/sensor/optical-stack.js +17 -0
- package/dist/sensor/optical-stack.js.map +1 -1
- package/dist/sensor/photon-energy.d.ts +97 -0
- package/dist/sensor/photon-energy.d.ts.map +1 -0
- package/dist/sensor/photon-energy.js +390 -0
- package/dist/sensor/photon-energy.js.map +1 -0
- package/dist/sensor/physical-charge-capacity.d.ts +130 -0
- package/dist/sensor/physical-charge-capacity.d.ts.map +1 -0
- package/dist/sensor/physical-charge-capacity.js +345 -0
- package/dist/sensor/physical-charge-capacity.js.map +1 -0
- package/dist/sensor/pixel-pitch.d.ts +6 -0
- package/dist/sensor/pixel-pitch.d.ts.map +1 -1
- package/dist/sensor/pixel-pitch.js +6 -0
- package/dist/sensor/pixel-pitch.js.map +1 -1
- package/dist/sensor/radiometry-readiness.d.ts +10 -0
- package/dist/sensor/radiometry-readiness.d.ts.map +1 -1
- package/dist/sensor/radiometry-readiness.js +10 -0
- package/dist/sensor/radiometry-readiness.js.map +1 -1
- package/dist/sensor/raw-readout.d.ts +314 -0
- package/dist/sensor/raw-readout.d.ts.map +1 -0
- package/dist/sensor/raw-readout.js +914 -0
- package/dist/sensor/raw-readout.js.map +1 -0
- package/dist/sensor/raw-reconstruction.d.ts +170 -0
- package/dist/sensor/raw-reconstruction.d.ts.map +1 -0
- package/dist/sensor/raw-reconstruction.js +424 -0
- package/dist/sensor/raw-reconstruction.js.map +1 -0
- package/dist/sensor/readout-exposure-linkage.d.ts +12 -0
- package/dist/sensor/readout-exposure-linkage.d.ts.map +1 -1
- package/dist/sensor/readout-exposure-linkage.js +12 -0
- package/dist/sensor/readout-exposure-linkage.js.map +1 -1
- package/dist/sensor/readout-timing.d.ts +13 -0
- package/dist/sensor/readout-timing.d.ts.map +1 -1
- package/dist/sensor/readout-timing.js +13 -0
- package/dist/sensor/readout-timing.js.map +1 -1
- package/dist/sensor/response-application-compatibility.d.ts +136 -0
- package/dist/sensor/response-application-compatibility.d.ts.map +1 -0
- package/dist/sensor/response-application-compatibility.js +408 -0
- package/dist/sensor/response-application-compatibility.js.map +1 -0
- package/dist/sensor/response-operating-range.d.ts +173 -0
- package/dist/sensor/response-operating-range.d.ts.map +1 -0
- package/dist/sensor/response-operating-range.js +672 -0
- package/dist/sensor/response-operating-range.js.map +1 -0
- package/dist/sensor/responsivity-photocurrent.d.ts +158 -0
- package/dist/sensor/responsivity-photocurrent.d.ts.map +1 -0
- package/dist/sensor/responsivity-photocurrent.js +644 -0
- package/dist/sensor/responsivity-photocurrent.js.map +1 -0
- package/dist/sensor/sampling-aperture.d.ts.map +1 -1
- package/dist/sensor/sampling-aperture.js +14 -0
- package/dist/sensor/sampling-aperture.js.map +1 -1
- package/dist/sensor/scene-eqe-temporal-exposure.d.ts +45 -0
- package/dist/sensor/scene-eqe-temporal-exposure.d.ts.map +1 -0
- package/dist/sensor/scene-eqe-temporal-exposure.js +64 -0
- package/dist/sensor/scene-eqe-temporal-exposure.js.map +1 -0
- package/dist/sensor/sensor-geometry.d.ts +12 -0
- package/dist/sensor/sensor-geometry.d.ts.map +1 -1
- package/dist/sensor/sensor-geometry.js +12 -0
- package/dist/sensor/sensor-geometry.js.map +1 -1
- package/dist/sensor/signal-noise.d.ts +10 -0
- package/dist/sensor/signal-noise.d.ts.map +1 -1
- package/dist/sensor/signal-noise.js +10 -0
- package/dist/sensor/signal-noise.js.map +1 -1
- package/dist/sensor/spatial-sample-reduction.d.ts +44 -1
- package/dist/sensor/spatial-sample-reduction.d.ts.map +1 -1
- package/dist/sensor/spatial-sample-reduction.js +51 -5
- package/dist/sensor/spatial-sample-reduction.js.map +1 -1
- package/dist/sensor/spatial-sampling-quadrature.d.ts +24 -0
- package/dist/sensor/spatial-sampling-quadrature.d.ts.map +1 -1
- package/dist/sensor/spatial-sampling-quadrature.js +27 -0
- package/dist/sensor/spatial-sampling-quadrature.js.map +1 -1
- package/dist/sensor/spatio-spectral-reduction.d.ts +187 -0
- package/dist/sensor/spatio-spectral-reduction.d.ts.map +1 -0
- package/dist/sensor/spatio-spectral-reduction.js +373 -0
- package/dist/sensor/spatio-spectral-reduction.js.map +1 -0
- package/dist/sensor/spectral-coverage.d.ts +24 -0
- package/dist/sensor/spectral-coverage.d.ts.map +1 -0
- package/dist/sensor/spectral-coverage.js +86 -0
- package/dist/sensor/spectral-coverage.js.map +1 -0
- package/dist/sensor/spectral-quadrature.d.ts +169 -0
- package/dist/sensor/spectral-quadrature.d.ts.map +1 -0
- package/dist/sensor/spectral-quadrature.js +542 -0
- package/dist/sensor/spectral-quadrature.js.map +1 -0
- package/dist/sensor/spectral-response.d.ts +192 -0
- package/dist/sensor/spectral-response.d.ts.map +1 -0
- package/dist/sensor/spectral-response.js +664 -0
- package/dist/sensor/spectral-response.js.map +1 -0
- package/dist/sensor/temporal-eqe-sum.d.ts +15 -0
- package/dist/sensor/temporal-eqe-sum.d.ts.map +1 -0
- package/dist/sensor/temporal-eqe-sum.js +30 -0
- package/dist/sensor/temporal-eqe-sum.js.map +1 -0
- package/dist/sensor/temporal-photo-signal.d.ts +38 -0
- package/dist/sensor/temporal-photo-signal.d.ts.map +1 -0
- package/dist/sensor/temporal-photo-signal.js +110 -0
- package/dist/sensor/temporal-photo-signal.js.map +1 -0
- package/dist/sensor/temporal-sample-binding.d.ts +6 -0
- package/dist/sensor/temporal-sample-binding.d.ts.map +1 -0
- package/dist/sensor/temporal-sample-binding.js +32 -0
- package/dist/sensor/temporal-sample-binding.js.map +1 -0
- package/dist/simulation/poc-simulation.d.ts.map +1 -1
- package/dist/simulation/poc-simulation.js +34 -11
- package/dist/simulation/poc-simulation.js.map +1 -1
- package/dist/stabilization/camera-shake.d.ts +11 -0
- package/dist/stabilization/camera-shake.d.ts.map +1 -1
- package/dist/stabilization/camera-shake.js +11 -0
- package/dist/stabilization/camera-shake.js.map +1 -1
- package/dist/stabilization/system.d.ts +218 -0
- package/dist/stabilization/system.d.ts.map +1 -0
- package/dist/stabilization/system.js +695 -0
- package/dist/stabilization/system.js.map +1 -0
- package/docs/API_REFERENCE.md +2017 -0
- package/docs/API_STYLE.md +139 -3
- package/docs/ARCHITECTURE.md +134 -24
- package/docs/AUTOMATION_COORDINATION.md +2 -0
- package/docs/CAPTURE_COLOR.md +25 -0
- package/docs/CAPTURE_CORRECTED_SDR.md +25 -0
- package/docs/CAPTURE_EXPORT_METADATA.md +27 -0
- package/docs/CAPTURE_SDR.md +20 -0
- package/docs/DEVELOPERS.md +60 -0
- package/docs/DIGITAL_OPTICS_FOUNDATION.md +69 -0
- package/docs/ENVIRONMENT_RAW_CAPTURE.md +187 -0
- package/docs/EXPORT_ACCEPTANCE.md +133 -0
- package/docs/GENERIC_TIER_PRESETS.md +269 -0
- package/docs/GEOMETRIC_PREPARATION_REUSE.md +141 -0
- package/docs/IMAGE_FORMATION.md +80 -10
- package/docs/LINEAR_CAPTURE_ENCODING.md +25 -0
- package/docs/MOTION_AND_SIGNAL.md +5 -3
- package/docs/NUMERICAL_CORRECTNESS.md +191 -0
- package/docs/PERFORMANCE_BASELINE.md +56 -0
- package/docs/PHOTOGRAPHIC_EXPORT.md +206 -0
- package/docs/PHYSICS_FOUNDATION.md +152 -5
- package/docs/POC_API.md +2 -0
- package/docs/POC_PROJECTION_REUSE.md +124 -0
- package/docs/PROCESSED_OUTPUT.md +157 -0
- package/docs/PRODUCTION_COMPOSITION.md +373 -0
- package/docs/PRODUCTION_ENVIRONMENT_CAPTURE.md +131 -0
- package/docs/PROVENANCE.md +4 -0
- package/docs/PSF_FOUNDATION.md +110 -88
- package/docs/RAW_FRAME_ENVELOPE.md +56 -0
- package/docs/RAW_FRAME_RECONSTRUCTION.md +30 -0
- package/docs/RELEASE_1_0.md +66 -0
- package/docs/RELEASE_1_0_1.md +61 -0
- package/docs/RELEASE_AUDIT.md +39 -0
- package/docs/SCENE_RADIANCE_AND_ILLUMINATION.md +298 -0
- package/docs/SCENE_SENSOR_QUADRATURE.md +98 -0
- package/docs/SCENE_SENSOR_TEMPORAL_EXPOSURE.md +86 -0
- package/docs/SCIENTIFIC_ASSURANCE.md +280 -0
- package/docs/SCIENTIFIC_CONFORMANCE.md +83 -0
- package/docs/SDR_RENDERING.md +33 -0
- package/docs/SENSOR_ENVIRONMENT_QUERY.md +86 -0
- package/docs/SENSOR_EQE_LOCAL_EXPOSURE.md +104 -0
- package/docs/SENSOR_EQE_TEMPORAL_EXPOSURE.md +74 -0
- package/docs/SENSOR_PSF_QUADRATURE.md +90 -0
- package/docs/SENSOR_RAW_FRAME.md +20 -0
- package/docs/SENSOR_RAW_PRODUCER.md +77 -0
- package/docs/SIGNAL_CONFORMANCE.md +23 -0
- package/docs/SIMULATED_CAPTURE.md +65 -0
- package/docs/STABILIZATION.md +160 -17
- package/docs/TEMPORAL_PHOTO_RAW.md +83 -0
- package/docs/TIER_ACCEPTANCE.md +129 -0
- package/docs/TIER_PRESET_ACCEPTANCE.md +59 -0
- package/docs/USAGE.md +5050 -1047
- package/docs/V1_COMPOSITION_MAP.md +123 -0
- package/docs/V1_HELPER_REUSE_REVIEW.md +60 -0
- package/docs/V1_PERFORMANCE_DISPOSITION.md +88 -0
- package/docs/api/camera-equivalent-focal-length.md +53 -0
- package/docs/api/camera-field-of-view.md +119 -0
- package/docs/api/camera-projected-object-size.md +54 -0
- package/docs/api/capture-capture-export-metadata.md +107 -0
- package/docs/api/capture-environment-raw-producer.md +56 -0
- package/docs/api/capture-focus-control.md +419 -0
- package/docs/api/capture-linear-encoding.md +99 -0
- package/docs/api/capture-photographic-export.md +172 -0
- package/docs/api/capture-raw-frame-reconstruction.md +87 -0
- package/docs/api/capture-release-sequence.md +252 -0
- package/docs/api/capture-sensor-raw-frame.md +66 -0
- package/docs/api/capture-sensor-raw-producer.md +98 -0
- package/docs/api/capture-simulated-capture.md +179 -0
- package/docs/api/color-capture-color.md +122 -0
- package/docs/api/color-white-balance.md +386 -0
- package/docs/api/composition-image-formation-plan.md +825 -0
- package/docs/api/composition-plan-consumer.md +98 -0
- package/docs/api/core-calculation-result.md +220 -0
- package/docs/api/core-configuration-error.md +19 -0
- package/docs/api/core-image-formation.md +204 -0
- package/docs/api/core-scientific-assurance.md +214 -0
- package/docs/api/core-spectral-composition.md +268 -0
- package/docs/api/core-spectral.md +78 -0
- package/docs/api/core-validation.md +34 -0
- package/docs/api/core-version.md +14 -0
- package/docs/api/equipment-exposure-capabilities.md +270 -0
- package/docs/api/equipment-generic-tier-assets.md +82 -0
- package/docs/api/equipment-generic-tier-presets.md +103 -0
- package/docs/api/equipment-iso-capabilities.md +295 -0
- package/docs/api/equipment-metering-capabilities.md +126 -0
- package/docs/api/equipment-release-capabilities.md +91 -0
- package/docs/api/exports.json +5656 -0
- package/docs/api/exposure-exposure-duration-control.md +115 -0
- package/docs/api/exposure-exposure-mode-resolver.md +966 -0
- package/docs/api/exposure-exposure.md +150 -0
- package/docs/api/exposure-flash.md +327 -0
- package/docs/api/exposure-metering-scene-radiance.md +154 -0
- package/docs/api/exposure-metering-target.md +134 -0
- package/docs/api/exposure-metering-temporal.md +77 -0
- package/docs/api/exposure-metering.md +172 -0
- package/docs/api/exposure-program-line.md +64 -0
- package/docs/api/motion-camera-rotation.md +215 -0
- package/docs/api/motion-capture-rotation-inverse-mapping.md +128 -0
- package/docs/api/motion-capture-rotation-temporal-quadrature.md +127 -0
- package/docs/api/motion-capture-rotation-trajectory.md +132 -0
- package/docs/api/motion-capture-translation-parallax-temporal-quadrature.md +171 -0
- package/docs/api/motion-extended-object-projection.md +312 -0
- package/docs/api/motion-projected-motion.md +60 -0
- package/docs/api/optics-aperture.md +69 -0
- package/docs/api/optics-circle-of-confusion.md +46 -0
- package/docs/api/optics-complex-pupil-psf.md +193 -0
- package/docs/api/optics-depth-of-field.md +92 -0
- package/docs/api/optics-diffraction.md +46 -0
- package/docs/api/optics-focus-breathing.md +119 -0
- package/docs/api/optics-focus-state.md +64 -0
- package/docs/api/optics-front-of-lens-filter.md +263 -0
- package/docs/api/optics-illumination-vignetting.md +95 -0
- package/docs/api/optics-lateral-chromatic-aberration.md +225 -0
- package/docs/api/optics-lens-psf-profile.md +380 -0
- package/docs/api/optics-polygon-diffraction.md +68 -0
- package/docs/api/optics-profile-contract.md +47 -0
- package/docs/api/optics-psf-foundation.md +181 -0
- package/docs/api/optics-radial-distortion.md +194 -0
- package/docs/api/optics-scene-to-sensor-irradiance.md +371 -0
- package/docs/api/optics-scene-to-sensor-quadrature.md +78 -0
- package/docs/api/optics-sensor-environment-query.md +58 -0
- package/docs/api/optics-sensor-psf-quadrature.md +81 -0
- package/docs/api/optics-stray-light.md +109 -0
- package/docs/api/optics-thin-lens.md +53 -0
- package/docs/api/output-capture-corrected-sdr.md +71 -0
- package/docs/api/output-capture-geometry.md +500 -0
- package/docs/api/output-capture-sdr.md +69 -0
- package/docs/api/output-crop.md +47 -0
- package/docs/api/output-geometric-transforms.md +199 -0
- package/docs/api/output-lens-corrections.md +162 -0
- package/docs/api/output-sdr-rendering.md +122 -0
- package/docs/api/output-subject-framing-crop.md +59 -0
- package/docs/api/schema-camera.md +84 -0
- package/docs/api/schema-illumination-spectral.md +77 -0
- package/docs/api/schema-illumination-temporal.md +289 -0
- package/docs/api/schema-illumination.md +246 -0
- package/docs/api/schema-scene-radiance-temporal.md +215 -0
- package/docs/api/schema-scene-radiance.md +415 -0
- package/docs/api/schema-scene.md +105 -0
- package/docs/api/schema-validation.md +25 -0
- package/docs/api/sensor-accumulated-charge.md +273 -0
- package/docs/api/sensor-architecture.md +155 -0
- package/docs/api/sensor-camera-saturation-capacity.md +215 -0
- package/docs/api/sensor-capture-color-sampling-binding.md +323 -0
- package/docs/api/sensor-capture-mode-timing.md +123 -0
- package/docs/api/sensor-capture-mode.md +321 -0
- package/docs/api/sensor-color-sampling.md +228 -0
- package/docs/api/sensor-constant-rate-temporal-integration.md +152 -0
- package/docs/api/sensor-dark-current.md +227 -0
- package/docs/api/sensor-environment-photo-signal.md +77 -0
- package/docs/api/sensor-eqe-electron-rate.md +166 -0
- package/docs/api/sensor-eqe-local-exposure.md +68 -0
- package/docs/api/sensor-eqe-temporal-exposure.md +73 -0
- package/docs/api/sensor-exposure-window.md +183 -0
- package/docs/api/sensor-iso-signal-chain.md +264 -0
- package/docs/api/sensor-local-exposure-binding.md +126 -0
- package/docs/api/sensor-optical-stack.md +211 -0
- package/docs/api/sensor-photon-energy.md +149 -0
- package/docs/api/sensor-physical-charge-capacity.md +196 -0
- package/docs/api/sensor-pixel-pitch.md +41 -0
- package/docs/api/sensor-radiometry-readiness.md +240 -0
- package/docs/api/sensor-raw-readout.md +499 -0
- package/docs/api/sensor-raw-reconstruction.md +260 -0
- package/docs/api/sensor-readout-exposure-linkage.md +172 -0
- package/docs/api/sensor-readout-timing.md +209 -0
- package/docs/api/sensor-response-application-compatibility.md +256 -0
- package/docs/api/sensor-response-operating-range.md +293 -0
- package/docs/api/sensor-responsivity-photocurrent.md +245 -0
- package/docs/api/sensor-sampling-aperture.md +221 -0
- package/docs/api/sensor-scene-eqe-temporal-exposure.md +56 -0
- package/docs/api/sensor-sensor-geometry.md +143 -0
- package/docs/api/sensor-signal-noise.md +75 -0
- package/docs/api/sensor-spatial-sample-reduction.md +186 -0
- package/docs/api/sensor-spatial-sampling-quadrature.md +188 -0
- package/docs/api/sensor-spatio-spectral-reduction.md +217 -0
- package/docs/api/sensor-spectral-coverage.md +33 -0
- package/docs/api/sensor-spectral-quadrature.md +183 -0
- package/docs/api/sensor-spectral-response.md +291 -0
- package/docs/api/sensor-temporal-photo-signal.md +62 -0
- package/docs/api/simulation-poc-simulation.md +364 -0
- package/docs/api/stabilization-camera-shake.md +71 -0
- package/docs/api/stabilization-system.md +442 -0
- package/docs/benchmarks/2026-10-01-main-baseline.json +694 -0
- package/docs/benchmarks/2026-10-02-geometric-preparation-reuse.json +2190 -0
- package/docs/benchmarks/2026-10-02-poc-projection-reuse.json +2423 -0
- package/docs/benchmarks/2026-10-02-v1-environment-gc-profile.json +210 -0
- package/docs/benchmarks/2026-10-02-v1-environment-ordinary.json +187 -0
- package/docs/benchmarks/2026-10-02-v1-geometry-gc-profile.json +756 -0
- package/docs/benchmarks/2026-10-02-v1-geometry-ordinary-1.json +711 -0
- package/docs/benchmarks/2026-10-02-v1-geometry-ordinary-2.json +711 -0
- package/docs/benchmarks/2026-10-02-v1-poc-gc-profile.json +885 -0
- package/docs/benchmarks/2026-10-02-v1-poc-ordinary-1.json +868 -0
- package/docs/benchmarks/2026-10-02-v1-poc-ordinary-2.json +868 -0
- package/docs/examples/production-capture.mjs +34 -0
- package/docs/examples/production-request.json +4613 -0
- package/docs/examples/quick-start.mjs +12 -0
- package/docs/validation/documentation-fragments.json +212 -0
- package/docs/validation/release-audit-inventory.json +1306 -0
- package/docs/validation/tier-acceptance-report-v1.json +2538 -0
- package/package.json +15 -3
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Module boundary and integration notes.
|
|
4
|
+
* Validates independently supplied numeric profile evidence and binds the approximation to the exact
|
|
5
|
+
* CFA profile.
|
|
6
|
+
* Cheap geometry/topology preflight after RAW revalidation, before pixel execution.
|
|
7
|
+
* @see docs/PHOTOGRAPHIC_EXPORT.md for equations, coordinate/unit conventions, blockers and support
|
|
8
|
+
* limits.
|
|
9
|
+
*/
|
|
10
|
+
// This product includes DNG technology under license by Adobe.
|
|
11
|
+
import { requireAllowlistedRecord, requirePublicOpaqueId } from "../core/record-validation.js";
|
|
12
|
+
import { stringifyCanonicalJson } from "../core/canonical-json.js";
|
|
13
|
+
import { InvalidConfigurationError } from "../core/configuration-error.js";
|
|
14
|
+
import { parseEvidenceList } from "../core/evidence-provenance.js";
|
|
15
|
+
import { LINEAR_CAPTURE_RGB_PROFILE } from "../color/capture-color.js";
|
|
16
|
+
import { invertSensorColorMatrix, prepareSensorColorDevelopment, sensorColorReferenceWhite } from "../color/sensor-color-development.js";
|
|
17
|
+
import { calculateSdrRendering, parseSdrRenderingProfile } from "../output/sdr-rendering.js";
|
|
18
|
+
import { transformOrientedRasterPointToNative, transformOrientedRasterRectToNative } from "../output/capture-geometry.js";
|
|
19
|
+
import { resolveRawFrameReconstruction, parseRawFrameReconstructionInput } from "./raw-frame-reconstruction.js";
|
|
20
|
+
import { createCaptureExportMetadataPair } from "./capture-export-metadata.js";
|
|
21
|
+
import { encodeExportJpeg } from "./export-jpeg.js";
|
|
22
|
+
import { packExportTiff, exportTiffAscii as ascii, exportTiffNumbers as numbers, exportTiffRationals as rationals, exportTiffBytes as rawBytes } from "./export-tiff.js";
|
|
23
|
+
import { calculateCaptureCorrectedSdr, parseCaptureCorrectionChoice } from "../output/capture-corrected-sdr.js";
|
|
24
|
+
import { resolveLensCorrectionPlan } from "../output/lens-corrections.js";
|
|
25
|
+
import { parseSimulatedCapture } from "./simulated-capture.js";
|
|
26
|
+
import { approximationResult } from "../core/calculation-result.js";
|
|
27
|
+
export const PHOTOGRAPHIC_EXPORT_SCHEMA_VERSION = "0.1.0";
|
|
28
|
+
function object(value, keys) {
|
|
29
|
+
return requireAllowlistedRecord(value, keys, "Invalid photographic export fields.");
|
|
30
|
+
}
|
|
31
|
+
function id(value) {
|
|
32
|
+
return requirePublicOpaqueId(value, "Invalid public export profile identity.");
|
|
33
|
+
}
|
|
34
|
+
/** Validates independently supplied numeric profile evidence and binds the approximation to the exact CFA profile. */
|
|
35
|
+
export function parseExportSensorColorProfile(value) {
|
|
36
|
+
const r = object(value, ["schemaVersion", "profileId", "profileVersion", "colorSamplingProfileId", "channelIds", "scientificStatus", "referenceIlluminant", "normalizedCameraChannelsToXyz", "evidence", "limitations"]);
|
|
37
|
+
const m = r.normalizedCameraChannelsToXyz;
|
|
38
|
+
if (r.schemaVersion !== "0.1.0" || r.scientificStatus !== "approximation" || r.referenceIlluminant !== "D65" || JSON.stringify(r.channelIds) !== '["red","green","blue"]' ||
|
|
39
|
+
!Array.isArray(m) || m.length !== 3 || m.some((row) => !Array.isArray(row) || row.length !== 3 || Array.from(row).some((v) => typeof v !== "number" || !Number.isFinite(v) || Math.abs(v) > 100)) ||
|
|
40
|
+
!Array.isArray(r.limitations) || r.limitations.length === 0 || r.limitations.length > 16 || Array.from(r.limitations).some((s) => typeof s !== "string" || s.length === 0 || s.length > 512))
|
|
41
|
+
throw new InvalidConfigurationError("Unsupported sensor color interpretation.");
|
|
42
|
+
const matrix = m.map((row) => [...row]);
|
|
43
|
+
invertSensorColorMatrix(matrix);
|
|
44
|
+
const evidence = parseEvidenceList(r.evidence, "exportColor.evidence");
|
|
45
|
+
if (evidence.some((e) => e.reuseStatus === "factual-reference-only"))
|
|
46
|
+
throw new InvalidConfigurationError("Embedded numeric color profiles require reusable or owned evidence.");
|
|
47
|
+
return { schemaVersion: "0.1.0", profileId: id(r.profileId), profileVersion: id(r.profileVersion), colorSamplingProfileId: id(r.colorSamplingProfileId),
|
|
48
|
+
channelIds: ["red", "green", "blue"], scientificStatus: "approximation", referenceIlluminant: "D65", normalizedCameraChannelsToXyz: matrix, evidence, limitations: [...r.limitations] };
|
|
49
|
+
}
|
|
50
|
+
/** Cheap geometry/topology preflight after RAW revalidation, before pixel execution. */
|
|
51
|
+
export function validateProcessedSensorRawEnvelope(reconstruction, corrected) {
|
|
52
|
+
const frame = reconstruction.rawFrame, capture = frame.capture, g = capture.resolvedGeometry, active = g.activeCapture.nativeRect, crop = g.output.cropRect, raster = g.output.raster, region = reconstruction.region;
|
|
53
|
+
if (raster.pixelWidth !== crop.width || raster.pixelHeight !== crop.height)
|
|
54
|
+
throw new InvalidConfigurationError("Initial paired export requires 1:1 output crop sampling; resampling is unsupported.");
|
|
55
|
+
const local = transformOrientedRasterRectToNative({ rect: crop, nativeRaster: g.activeCapture.raster, orientation: capture.geometry.orientation });
|
|
56
|
+
const nativeDefaultCrop = { ...local, x: local.x + active.x, y: local.y + active.y };
|
|
57
|
+
if (nativeDefaultCrop.x < region.x || nativeDefaultCrop.y < region.y || nativeDefaultCrop.x + nativeDefaultCrop.width > region.x + region.width ||
|
|
58
|
+
nativeDefaultCrop.y + nativeDefaultCrop.height > region.y + region.height)
|
|
59
|
+
throw new InvalidConfigurationError("Reconstruction does not cover the exact declared final native crop.");
|
|
60
|
+
if (corrected && (active.x < region.x || active.y < region.y || active.x + active.width > region.x + region.width ||
|
|
61
|
+
active.y + active.height > region.y + region.height))
|
|
62
|
+
throw new InvalidConfigurationError("Corrected export requires reconstruction of the full active native RAW area.");
|
|
63
|
+
return { local, nativeDefaultCrop };
|
|
64
|
+
}
|
|
65
|
+
function requireDngTopology(frame) {
|
|
66
|
+
const layout = frame.colorSamplingProfile.layout;
|
|
67
|
+
if (layout.kind !== "periodic-mosaic" || layout.repeatWidthSites !== 2 || layout.repeatHeightSites !== 2 || !["red", "green", "green", "blue"].every((ch) => layout.siteChannelIds.includes(ch)) ||
|
|
68
|
+
layout.siteChannelIds.filter((ch) => ch === "red").length !== 1 || layout.siteChannelIds.filter((ch) => ch === "blue").length !== 1 ||
|
|
69
|
+
layout.siteChannelIds.filter((ch) => ch === "green").length !== 2)
|
|
70
|
+
throw new InvalidConfigurationError("Initial DNG profile supports explicitly registered 2x2 RGB Bayer topology only.");
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Revalidates one attached RAW snapshot and explicit processing policy.
|
|
74
|
+
* Crop sampling and reconstruction coverage fail here before
|
|
75
|
+
* per-pixel execution. Successful parsing does not establish kernel edge support,
|
|
76
|
+
* correction support or container encoding readiness; those retain execution
|
|
77
|
+
* checks. Input is copied; no file or display backend runs.
|
|
78
|
+
*/
|
|
79
|
+
export function parseProcessedSensorRawInput(value) {
|
|
80
|
+
const r = object(value, ["reconstruction", "colorProfile", "whiteBalance", "rendering", "correction"]);
|
|
81
|
+
const reconstruction = parseRawFrameReconstructionInput(r.reconstruction), colorProfile = parseExportSensorColorProfile(r.colorProfile), rendering = parseSdrRenderingProfile(r.rendering);
|
|
82
|
+
const intent = reconstruction.rawFrame.capture.whiteBalanceIntent;
|
|
83
|
+
if (colorProfile.colorSamplingProfileId !== reconstruction.rawFrame.colorSamplingProfile.profileId ||
|
|
84
|
+
reconstruction.phaseProfiles.some((p) => JSON.stringify(p.profile.kernels.map((k) => k.outputChannelId)) !== JSON.stringify(colorProfile.channelIds)) ||
|
|
85
|
+
(r.whiteBalance !== "not-required" && r.whiteBalance !== "apply-resolved-sensor-gains") ||
|
|
86
|
+
((r.whiteBalance === "not-required") !== (intent === null)))
|
|
87
|
+
throw new InvalidConfigurationError("Processed RAW color/WB/rendering identities are inconsistent.");
|
|
88
|
+
const correction = r.correction === undefined ? undefined : parseCaptureCorrectionChoice(r.correction, reconstruction.rawFrame.capture, ["photivra-export-developed"]);
|
|
89
|
+
if (correction?.resampler.antialias !== undefined && correction.resampler.antialias !== "none") {
|
|
90
|
+
throw new InvalidConfigurationError("RAW-derived processing has no source prefilter; prefiltered declarations are unsupported.");
|
|
91
|
+
}
|
|
92
|
+
validateProcessedSensorRawEnvelope(reconstruction, correction !== undefined);
|
|
93
|
+
return { reconstruction, colorProfile, whiteBalance: r.whiteBalance, rendering, ...(correction === undefined ? {} : { correction }) };
|
|
94
|
+
}
|
|
95
|
+
/** Adds file metadata/encoding validation to the shared processed RAW policy. */
|
|
96
|
+
export function parsePhotographicExportInput(value) {
|
|
97
|
+
const r = object(value, ["reconstruction", "colorProfile", "whiteBalance", "rendering", "metadata", "sceneProfile", "jpegQuantizationStep", "correction"]);
|
|
98
|
+
const processed = parseProcessedSensorRawInput({ reconstruction: r.reconstruction, colorProfile: r.colorProfile, whiteBalance: r.whiteBalance, rendering: r.rendering,
|
|
99
|
+
...(r.correction === undefined ? {} : { correction: r.correction }) });
|
|
100
|
+
requireDngTopology(processed.reconstruction.rawFrame);
|
|
101
|
+
if (processed.rendering.bitDepth !== 8)
|
|
102
|
+
throw new InvalidConfigurationError("Initial JPEG export requires 8-bit SDR.");
|
|
103
|
+
const meta = object(r.metadata, ["workflow", "capturedAtUtc", "raw", "jpeg"]);
|
|
104
|
+
const metadata = createCaptureExportMetadataPair({ ...meta, capture: processed.reconstruction.rawFrame.capture });
|
|
105
|
+
const scene = object(r.sceneProfile, ["id", "version", "sceneStateId"]), sceneProfile = { id: id(scene.id), version: id(scene.version), sceneStateId: id(scene.sceneStateId) };
|
|
106
|
+
if (sceneProfile.sceneStateId !== processed.reconstruction.rawFrame.capture.sceneStateId || !Number.isInteger(r.jpegQuantizationStep) ||
|
|
107
|
+
r.jpegQuantizationStep < 1 || r.jpegQuantizationStep > 255)
|
|
108
|
+
throw new InvalidConfigurationError("Export scene identity or encoder settings are inconsistent.");
|
|
109
|
+
return { ...processed, sceneProfile, metadata: { workflow: metadata.shared.workflow, capturedAtUtc: metadata.shared.capturedAtUtc,
|
|
110
|
+
raw: { documentId: metadata.raw.documentId, instanceId: metadata.raw.instanceId }, jpeg: { documentId: metadata.jpeg.documentId, instanceId: metadata.jpeg.instanceId } },
|
|
111
|
+
jpegQuantizationStep: r.jpegQuantizationStep };
|
|
112
|
+
}
|
|
113
|
+
function canonical(value) {
|
|
114
|
+
return stringifyCanonicalJson(value, {
|
|
115
|
+
undefinedObjectProperties: "reject",
|
|
116
|
+
nonFiniteNumberMessage: "Export hash requires finite canonical JSON.",
|
|
117
|
+
unsupportedValueMessage: "Export hash requires finite canonical JSON."
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
async function hash(value) {
|
|
121
|
+
if (!globalThis.crypto?.subtle)
|
|
122
|
+
throw new InvalidConfigurationError("Paired export requires Web Crypto SHA-256 in this execution context.");
|
|
123
|
+
const data = typeof value === "string" ? new TextEncoder().encode(value) : new Uint8Array(value);
|
|
124
|
+
const result = await globalThis.crypto.subtle.digest("SHA-256", data);
|
|
125
|
+
return Array.from(new Uint8Array(result), (v) => v.toString(16).padStart(2, "0")).join("");
|
|
126
|
+
}
|
|
127
|
+
function xmp(pair, role, simulationHash, color, mode, scene, corrected) {
|
|
128
|
+
const s = pair.shared, artifact = pair[role];
|
|
129
|
+
const values = { "xmp:CreatorTool": s.creatorTool, "xmpMM:DocumentID": "uuid:" + artifact.documentId, "xmpMM:InstanceID": "uuid:" + artifact.instanceId,
|
|
130
|
+
"Iptc4xmpExt:DigitalImageGUID": "urn:uuid:" + artifact.documentId, "Iptc4xmpExt:DigitalSourceType": s.digitalSourceTypeUri,
|
|
131
|
+
"photivra:SchemaVersion": "1.0", "photivra:SimulatedCapture": "True", "photivra:CaptureID": s.captureId, "photivra:OutputRole": role,
|
|
132
|
+
"photivra:EngineVersion": s.engineApiVersion, "photivra:CaptureContractVersion": s.captureContractVersion, "photivra:RawPipelineVersion": "0.1.0",
|
|
133
|
+
"photivra:SceneID": scene.id, "photivra:SceneVersion": scene.version, "photivra:SensorProfileID": color.profileId, "photivra:CaptureMode": mode, "photivra:RawSampleModel": "post_adc_pre_demosaic",
|
|
134
|
+
"photivra:DeterministicSeed": String(s.noise.seedUint32), "photivra:SimulationHashAlgorithm": "sha-256", "photivra:SimulationHash": simulationHash,
|
|
135
|
+
"photivra:SceneTime": String(s.sceneTimeSeconds) };
|
|
136
|
+
if (corrected) {
|
|
137
|
+
values["photivra:CorrectionProfileID"] = corrected.choice.profile.id;
|
|
138
|
+
values["photivra:CorrectionProfileVersion"] = corrected.choice.profile.version;
|
|
139
|
+
values["photivra:CorrectionSelectionKind"] = corrected.choice.selectionKind;
|
|
140
|
+
values["photivra:CorrectionSelections"] = canonical(corrected.choice.selections);
|
|
141
|
+
values["photivra:CorrectionDisposition"] = role === "raw" ? "informational-intent-only" : "processed-view";
|
|
142
|
+
values["photivra:ProcessedOutputRect"] = canonical(corrected.rect);
|
|
143
|
+
values["photivra:ProcessedIlluminationClippingEvents"] = String(corrected.clippingEvents);
|
|
144
|
+
}
|
|
145
|
+
if (role === "jpeg")
|
|
146
|
+
values["photivra:ProcessedPipelineVersion"] = PHOTOGRAPHIC_EXPORT_SCHEMA_VERSION;
|
|
147
|
+
if (s.focus.kind === "finite")
|
|
148
|
+
values["photivra:FocusDistanceMeters"] = String(s.focus.distanceM);
|
|
149
|
+
const escape = (v) => v.replaceAll("&", "&").replaceAll('"', """).replaceAll("<", "<").replaceAll(">", ">");
|
|
150
|
+
const attributes = Object.entries(values).map(([k, v]) => k + '="' + escape(v) + '"').join(" ");
|
|
151
|
+
return new TextEncoder().encode('<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" xmlns:photivra="https://photivra.com/ns/simulation/1.0/" ' + attributes + '/></rdf:RDF></x:xmpmeta>');
|
|
152
|
+
}
|
|
153
|
+
function commonExif(pair, role, width, height) {
|
|
154
|
+
const s = pair.shared, e = s.exposure;
|
|
155
|
+
if (!Number.isInteger(e.iso) || e.iso > 65535)
|
|
156
|
+
throw new InvalidConfigurationError("Initial export records only integer virtual REI values up to 65535.");
|
|
157
|
+
const date = s.capturedAtUtc.slice(0, 19).replaceAll("-", ":").replace("T", " ");
|
|
158
|
+
return [rawBytes(36864, 7, new TextEncoder().encode("0232")), rationals(33434, false, [e.shutterSeconds]), rationals(33437, false, [e.aperture]),
|
|
159
|
+
numbers(34855, 3, [e.iso]), numbers(34864, 3, [2]), numbers(34866, 4, [e.iso]), ascii(36867, date), ascii(36881, "+00:00"), ascii(37521, s.capturedAtUtc.slice(20, 23)),
|
|
160
|
+
rationals(37386, false, [e.focalLengthMm]), numbers(40962, 4, [width]), numbers(40963, 4, [height]), numbers(40961, 3, [role === "jpeg" ? 1 : 65535]),
|
|
161
|
+
ascii(42016, pair[role].documentId.replaceAll("-", "")),
|
|
162
|
+
...(Math.round(s.equivalentFocalLength35Mm) <= 65535 ? [numbers(41989, 3, [Math.round(s.equivalentFocalLength35Mm)])] : [])];
|
|
163
|
+
}
|
|
164
|
+
function identity(pair, orientation) {
|
|
165
|
+
return [ascii(271, pair.shared.make), ascii(272, pair.shared.model), ascii(305, pair.shared.software), numbers(274, 3, [orientation])];
|
|
166
|
+
}
|
|
167
|
+
/** Reconstruct exact attached RAW, develop color/WB once, correct, orient/crop and encode SDR; no file/display IO. */
|
|
168
|
+
export function calculateProcessedSensorRaw(input) {
|
|
169
|
+
const v = structuredClone(parseProcessedSensorRawInput(input));
|
|
170
|
+
const source = resolveRawFrameReconstruction(v.reconstruction), frame = source.value.rawFrame, capture = frame.capture, g = capture.resolvedGeometry, active = g.activeCapture.nativeRect, crop = g.output.cropRect, raster = g.output.raster, region = source.value.region;
|
|
171
|
+
const { nativeDefaultCrop } = validateProcessedSensorRawEnvelope(v.reconstruction, v.correction !== undefined);
|
|
172
|
+
const colorMatrix = invertSensorColorMatrix(v.colorProfile.normalizedCameraChannelsToXyz), cameraWhite = sensorColorReferenceWhite(colorMatrix), intent = capture.whiteBalanceIntent, gains = intent ? [intent.channelGains.red, intent.channelGains.green, intent.channelGains.blue] : [1, 1, 1];
|
|
173
|
+
const development = prepareSensorColorDevelopment(v.colorProfile.normalizedCameraChannelsToXyz, gains), white = development.referenceWhiteXyz;
|
|
174
|
+
if (cameraWhite.some((x) => x <= 0 || !Number.isFinite(x)))
|
|
175
|
+
throw new InvalidConfigurationError("DNG reference white must map to positive camera-neutral coordinates.");
|
|
176
|
+
const developedRaster = v.correction ? g.orientedCapture.raster : raster, developedRect = v.correction ? { x: 0, y: 0, width: developedRaster.pixelWidth, height: developedRaster.pixelHeight } : crop;
|
|
177
|
+
const rgb = [];
|
|
178
|
+
for (let y = 0; y < developedRaster.pixelHeight; y++)
|
|
179
|
+
for (let x = 0; x < developedRaster.pixelWidth; x++) {
|
|
180
|
+
const p = transformOrientedRasterPointToNative({ point: { x: developedRect.x + x + .5, y: developedRect.y + y + .5 }, nativeRaster: g.activeCapture.raster, orientation: capture.geometry.orientation });
|
|
181
|
+
const index = ((Math.floor(p.y) + active.y - region.y) * region.width + Math.floor(p.x) + active.x - region.x) * 3;
|
|
182
|
+
const values = source.value.linearPlane.samples.slice(index, index + 3);
|
|
183
|
+
rgb.push(...development.develop(values));
|
|
184
|
+
}
|
|
185
|
+
// Only exact attached RAW reconstruction supplies this private processing plane. Original float planes are discarded.
|
|
186
|
+
const correction = v.correction ? calculateCaptureCorrectedSdr({ capture: parseSimulatedCapture({ ...capture, planes: [{
|
|
187
|
+
id: "photivra-export-linear", imageStateId: "photivra-export-developed", imageState: "color-transformed-linear-rgb",
|
|
188
|
+
rasterBinding: "oriented-active-capture", pixelWidth: developedRaster.pixelWidth, pixelHeight: developedRaster.pixelHeight,
|
|
189
|
+
channelIds: ["red", "green", "blue"], colorProfile: LINEAR_CAPTURE_RGB_PROFILE, encodingReferenceWhiteXyz: white, referenceWhiteValue: 1,
|
|
190
|
+
whiteBalanceApplication: intent ? "applied-rgb-gains" : "not-applicable", captureSaturation: { kind: "not-modeled" },
|
|
191
|
+
appliedTransforms: [{ kind: "linear-color", profile: { id: v.colorProfile.profileId, version: v.colorProfile.profileVersion } }],
|
|
192
|
+
storage: { kind: "inline-float64", samples: rgb }
|
|
193
|
+
}] }), sourcePlaneId: "photivra-export-linear", color: { kind: "already-transformed" }, profile: v.rendering, correction: v.correction }) : null;
|
|
194
|
+
const rawCorrectionIntent = v.correction ? resolveLensCorrectionPlan({ profile: v.correction.profile, state: v.correction.state,
|
|
195
|
+
selections: v.correction.selections, selectionKind: v.correction.selectionKind, outputKind: "raw-like" }) : null;
|
|
196
|
+
const processedOutputView = correction ? { rect: correction.value.outputView.rect, pixelWidth: correction.value.outputView.pixelWidth,
|
|
197
|
+
pixelHeight: correction.value.outputView.pixelHeight } : { rect: { x: 0, y: 0, width: raster.pixelWidth, height: raster.pixelHeight },
|
|
198
|
+
pixelWidth: raster.pixelWidth, pixelHeight: raster.pixelHeight };
|
|
199
|
+
const rendering = correction?.value.rendering ?? calculateSdrRendering({ sourceImageStateId: frame.frameId + ":developed", inputImageState: "color-transformed-linear-rgb", inputColorSpace: "linear-srgb-d65",
|
|
200
|
+
whiteBalanceHandling: intent ? "already-applied-upstream" : "not-required", pixelWidth: raster.pixelWidth, pixelHeight: raster.pixelHeight, referenceWhiteValue: 1, samples: rgb, profile: v.rendering });
|
|
201
|
+
return approximationResult({ inputDomain: "post-adc-native-sensor-raw", colorProfile: v.colorProfile, whiteBalancePolicy: v.whiteBalance, outputDomain: "output-referred-srgb-d65-sdr", physicalCaptureModified: false,
|
|
202
|
+
displayAdaptationApplied: false, whiteBalance: intent ? "applied-here" : "not-required", source, rendering, nativeDefaultCrop, processedOutputView, correction, rawCorrectionIntent }, "processed-sensor-raw-sdr", "0.1.0", [
|
|
203
|
+
"Exact attached RAW feeds explicit approximate sensor color development; WB is applied once before correction and SDR.",
|
|
204
|
+
"Output is encoded sRGB/D65 SDR; platform viewing adaptation and HDR encoding are not applied.",
|
|
205
|
+
"Bounded reference reconstruction, correction support and 1:1 output crop remain explicit; physical capture is unchanged."
|
|
206
|
+
]);
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Serialize one authoritative RAW capture to a lossless uncompressed CFA DNG and an independently
|
|
210
|
+
* packed baseline JPEG. Shared metadata comes from the committed capture; orientation/WB/rendering
|
|
211
|
+
* never rewrite native RAW codes.
|
|
212
|
+
*
|
|
213
|
+
* Paired export preserves one revalidated native post-ADC RAW frame for DNG and develops that same
|
|
214
|
+
* frame through explicit reconstruction, approximate sensor-channel color/WB and SDR policy for JPEG.
|
|
215
|
+
* File identity and RAW data identity are distinct. Hashing is asynchronous; input data is copied
|
|
216
|
+
* before the first await. Full-native execution is limited to 4096 sites.
|
|
217
|
+
* @param input - PhotographicExportInput. See the linked contract for coordinate, unit and profile binding semantics.
|
|
218
|
+
* @returns Promise<PhotographicExportPair>. Return shape and scientific status are explicit; no calibration is inferred from successful execution.
|
|
219
|
+
*
|
|
220
|
+
* @see docs/API_REFERENCE.md for the root export and exact type graph.
|
|
221
|
+
*/
|
|
222
|
+
export async function createPhotographicExportPair(input) {
|
|
223
|
+
// Copy validated inputs into private owned values before the first async boundary to prevent hash/encoding races.
|
|
224
|
+
const v = JSON.parse(JSON.stringify(parsePhotographicExportInput(input)));
|
|
225
|
+
const processed = calculateProcessedSensorRaw({ reconstruction: v.reconstruction, colorProfile: v.colorProfile, whiteBalance: v.whiteBalance, rendering: v.rendering,
|
|
226
|
+
...(v.correction === undefined ? {} : { correction: v.correction }) }).value;
|
|
227
|
+
const { source, rendering, nativeDefaultCrop, processedOutputView, correction, rawCorrectionIntent } = processed;
|
|
228
|
+
const frame = source.value.rawFrame, capture = frame.capture, g = capture.resolvedGeometry, active = g.activeCapture.nativeRect, region = source.value.region;
|
|
229
|
+
const metadata = createCaptureExportMetadataPair({ ...v.metadata, capture });
|
|
230
|
+
const { local } = validateProcessedSensorRawEnvelope(v.reconstruction, v.correction !== undefined);
|
|
231
|
+
const colorMatrix = invertSensorColorMatrix(v.colorProfile.normalizedCameraChannelsToXyz), cameraWhite = sensorColorReferenceWhite(colorMatrix), intent = capture.whiteBalanceIntent;
|
|
232
|
+
const gains = intent ? [intent.channelGains.red, intent.channelGains.green, intent.channelGains.blue] : [1, 1, 1];
|
|
233
|
+
const neutral = cameraWhite.map((x, i) => x / gains[i]), scale = neutral[1];
|
|
234
|
+
const correctedMetadata = v.correction && correction ? { choice: v.correction, rect: processedOutputView.rect,
|
|
235
|
+
clippingEvents: correction.value.correction.value.illuminationClippingEventCount } : undefined;
|
|
236
|
+
const layout = frame.colorSamplingProfile.layout;
|
|
237
|
+
if (layout.kind !== "periodic-mosaic")
|
|
238
|
+
throw new InvalidConfigurationError("Initial DNG profile supports explicitly registered 2x2 RGB Bayer topology only.");
|
|
239
|
+
const whiteLevel = frame.samples[0].digitalSaturationCode, black = [];
|
|
240
|
+
for (let py = 0; py < 2; py++)
|
|
241
|
+
for (let px = 0; px < 2; px++) {
|
|
242
|
+
const found = frame.samples.filter((s) => s.colorSamplingSite.x % 2 === px && s.colorSamplingSite.y % 2 === py), first = found[0];
|
|
243
|
+
if (!first || found.some((s) => s.blackLevelCode !== first.blackLevelCode || s.digitalSaturationCode !== whiteLevel))
|
|
244
|
+
throw new InvalidConfigurationError("DNG requires a fixed repeating black tile and one common WhiteLevel.");
|
|
245
|
+
black.push(first.blackLevelCode);
|
|
246
|
+
}
|
|
247
|
+
const simulationHash = await hash(canonical({ schema: PHOTOGRAPHIC_EXPORT_SCHEMA_VERSION, rawFrame: frame, phaseProfiles: source.value.phaseProfiles, region,
|
|
248
|
+
colorProfile: v.colorProfile, sceneProfile: v.sceneProfile, whiteBalance: v.whiteBalance, rendering: v.rendering, jpegQuantizationStep: v.jpegQuantizationStep,
|
|
249
|
+
...(v.correction ? { correction: v.correction } : {}) }));
|
|
250
|
+
const rawHash = await hash(canonical({ schema: "photivra-raw-data-id-0.1", width: frame.nativePixelWidth, height: frame.nativePixelHeight,
|
|
251
|
+
cfa: layout, containerBitDepth: 16, codes: frame.samples.map((s) => s.rawCode) })), rawDataUniqueId = rawHash.slice(0, 32);
|
|
252
|
+
const colorHash = await hash(canonical(v.colorProfile)), uniqueCameraModel = "Photivra Virtual Camera " + v.colorProfile.profileId + " " + v.colorProfile.profileVersion + " " + colorHash;
|
|
253
|
+
const orientation = { landscape: 1, "portrait-clockwise": 6, "landscape-inverted": 3, "portrait-counter-clockwise": 8 }[capture.geometry.orientation];
|
|
254
|
+
const pixels = new Uint8Array(frame.samples.length * 2), view = new DataView(pixels.buffer);
|
|
255
|
+
frame.samples.forEach((s, i) => view.setUint16(i * 2, s.rawCode, true));
|
|
256
|
+
const strip = { ...numbers(273, 4, [0]), pointer: "pixels" };
|
|
257
|
+
const dngBytes = packExportTiff([...identity(metadata, orientation), numbers(254, 4, [0]), numbers(256, 4, [frame.nativePixelWidth]), numbers(257, 4, [frame.nativePixelHeight]),
|
|
258
|
+
numbers(258, 3, [16]), numbers(259, 3, [1]), numbers(262, 3, [32803]), strip, numbers(277, 3, [1]), numbers(278, 4, [frame.nativePixelHeight]), numbers(279, 4, [pixels.length]),
|
|
259
|
+
numbers(284, 3, [1]), numbers(339, 3, [1]), numbers(33421, 3, [2, 2]), numbers(33422, 1, layout.siteChannelIds.map((ch) => ["red", "green", "blue"].indexOf(ch))),
|
|
260
|
+
numbers(50706, 1, [1, 1, 0, 0]), numbers(50707, 1, [1, 1, 0, 0]), ascii(50708, uniqueCameraModel), numbers(50710, 1, [0, 1, 2]), numbers(50711, 3, [1]), numbers(50713, 3, [2, 2]),
|
|
261
|
+
rationals(50714, false, black), numbers(50717, 4, [whiteLevel]), numbers(50719, 4, [local.x, local.y]), numbers(50720, 4, [local.width, local.height]),
|
|
262
|
+
rationals(50721, true, colorMatrix.flat()), rationals(50728, false, neutral.map((n) => n / scale)), numbers(50778, 3, [21]),
|
|
263
|
+
rawBytes(50781, 1, Uint8Array.from(rawDataUniqueId.match(/../g).map((s) => parseInt(s, 16)))), numbers(50829, 4, [active.y, active.x, active.y + active.height, active.x + active.width]),
|
|
264
|
+
rawBytes(700, 1, xmp(metadata, "raw", simulationHash, v.colorProfile, frame.modeId, v.sceneProfile, correctedMetadata))], commonExif(metadata, "raw", local.width, local.height), pixels);
|
|
265
|
+
const jpegExif = packExportTiff(identity(metadata, 1), commonExif(metadata, "jpeg", processedOutputView.pixelWidth, processedOutputView.pixelHeight));
|
|
266
|
+
const jpegBytes = encodeExportJpeg({ width: processedOutputView.pixelWidth, height: processedOutputView.pixelHeight, samples: rendering.value.integerSamples,
|
|
267
|
+
quantizationStep: v.jpegQuantizationStep, exif: jpegExif, xmp: xmp(metadata, "jpeg", simulationHash, v.colorProfile, frame.modeId, v.sceneProfile, correctedMetadata) });
|
|
268
|
+
return { schemaVersion: PHOTOGRAPHIC_EXPORT_SCHEMA_VERSION, metadata, simulationHashAlgorithm: "sha-256", simulationHash, rawDataUniqueId, uniqueCameraModel, source, rendering, nativeDefaultCrop, processedOutputView, correction, rawCorrectionIntent,
|
|
269
|
+
imageDataPairing: "jpeg-generated-from-exact-attached-raw",
|
|
270
|
+
dng: { mediaType: "image/dng", bytes: dngBytes, sha256: await hash(dngBytes) }, jpeg: { mediaType: "image/jpeg", bytes: jpegBytes, sha256: await hash(jpegBytes) },
|
|
271
|
+
interoperability: "independent-decode-required-editor-validation-pending" };
|
|
272
|
+
}
|
|
273
|
+
//# sourceMappingURL=photographic-export.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"photographic-export.js","sourceRoot":"","sources":["../../src/capture/photographic-export.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;;;GAOG;AACH,+DAA+D;AAE/D,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAE/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAA2B,MAAM,gCAAgC,CAAC;AAC5F,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACzI,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAqD,MAAM,4BAA4B,CAAC;AAChJ,OAAO,EAAE,oCAAoC,EAAE,mCAAmC,EAAmB,MAAM,+BAA+B,CAAC;AAC3I,OAAO,EAAE,6BAA6B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AC,KAAK,EAAC,mBAAmB,CAAC,UAAU,EAAC,MAAM,EAAC,mBAAmB,CAAC,WAAW,EAAC,OAAO,EAAC,SAAS,CAAC,KAAK,CAAC,cAAc;QAClJ,gBAAgB,EAAC,CAAC,CAAC,oBAAoB,EAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAC,GAAG,CAAC,QAAQ,EAAC,MAAM,EAAC,cAAc,EAAC,CAAC,CAAC,YAAY,EAAC,KAAK,CAAC,MAAM,EAAC,CAAC,CAAC,YAAY,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC;IAC/J,OAAO,EAAE,aAAa,EAAC,kCAAkC,EAAC,QAAQ,EAAC,uBAAuB,EAAC,SAAS,EAAC,cAAc,EAAC,eAAe,EAAC,iBAAiB,EAAC,MAAM,EAAC,SAAS,EAAC,iBAAiB,EAAC,mBAAmB,EAAC,UAAU,EAAC,mBAAmB;QACzO,gBAAgB,EAAC,wCAAwC;QACzD,GAAG,EAAC,EAAC,SAAS,EAAC,WAAW,EAAC,KAAK,EAAC,QAAQ,EAAC,MAAM,EAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAC,EAAC,IAAI,EAAC,EAAC,SAAS,EAAC,YAAY,EAAC,KAAK,EAAC,SAAS,EAAC,MAAM,EAAC,MAAM,IAAI,CAAC,SAAS,CAAC,EAAC;QACjJ,gBAAgB,EAAC,uDAAuD,EAAE,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Count the full native raster before active/output cropping. Structural attachment can preserve
|
|
3
|
+
* up to 65,536 sites, while the bounded reference producer/reconstruction/execution envelope
|
|
4
|
+
* permits 4,096. Equal numeric budgets in other stages do not make their scientific domains
|
|
5
|
+
* interchangeable.
|
|
6
|
+
* @see docs/RELEASE_1_0.md and the corresponding domain guide.
|
|
7
|
+
*/
|
|
8
|
+
/** Structural attachment budget; it does not authorize reconstruction/export. */
|
|
9
|
+
export declare const RAW_ATTACHMENT_MAX_NATIVE_SITES = 65536;
|
|
10
|
+
/** Shared full-native budget of the reference producer and reconstruction path. */
|
|
11
|
+
export declare const RAW_REFERENCE_MAX_NATIVE_SITES = 4096;
|
|
12
|
+
//# sourceMappingURL=raw-frame-limits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raw-frame-limits.d.ts","sourceRoot":"","sources":["../../src/capture/raw-frame-limits.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,iFAAiF;AACjF,eAAO,MAAM,+BAA+B,QAAS,CAAC;AACtD,mFAAmF;AACnF,eAAO,MAAM,8BAA8B,OAAQ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Count the full native raster before active/output cropping. Structural attachment can preserve
|
|
4
|
+
* up to 65,536 sites, while the bounded reference producer/reconstruction/execution envelope
|
|
5
|
+
* permits 4,096. Equal numeric budgets in other stages do not make their scientific domains
|
|
6
|
+
* interchangeable.
|
|
7
|
+
* @see docs/RELEASE_1_0.md and the corresponding domain guide.
|
|
8
|
+
*/
|
|
9
|
+
/** Structural attachment budget; it does not authorize reconstruction/export. */
|
|
10
|
+
export const RAW_ATTACHMENT_MAX_NATIVE_SITES = 65_536;
|
|
11
|
+
/** Shared full-native budget of the reference producer and reconstruction path. */
|
|
12
|
+
export const RAW_REFERENCE_MAX_NATIVE_SITES = 4_096;
|
|
13
|
+
//# sourceMappingURL=raw-frame-limits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raw-frame-limits.js","sourceRoot":"","sources":["../../src/capture/raw-frame-limits.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;;GAMG;AAEH,iFAAiF;AACjF,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC;AACtD,mFAAmF;AACnF,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type CalculationResult } from "../core/calculation-result.js";
|
|
2
|
+
import type { RasterRect } from "../output/capture-geometry.js";
|
|
3
|
+
import { type SensorRawReconstructionProfile, type SensorRawReconstructedPixel } from "../sensor/raw-reconstruction.js";
|
|
4
|
+
import { type SensorRawFrame } from "./sensor-raw-frame.js";
|
|
5
|
+
export declare const RAW_FRAME_RECONSTRUCTION_SCHEMA_VERSION: "0.1.0";
|
|
6
|
+
/** Kernel selection is explicit per absolute native CFA repeat phase, not guessed from channel names. */
|
|
7
|
+
export interface RawFrameReconstructionPhaseProfile {
|
|
8
|
+
phaseX: number;
|
|
9
|
+
phaseY: number;
|
|
10
|
+
profile: SensorRawReconstructionProfile;
|
|
11
|
+
}
|
|
12
|
+
/** Bounded reference handoff; region coordinates stay in the full native sensor frame. */
|
|
13
|
+
export interface RawFrameReconstructionInput {
|
|
14
|
+
rawFrame: SensorRawFrame;
|
|
15
|
+
region: RasterRect;
|
|
16
|
+
phaseProfiles: readonly RawFrameReconstructionPhaseProfile[];
|
|
17
|
+
}
|
|
18
|
+
/** Traceable virtual sensor-channel values, not colorimetric RGB or a rendered photograph. */
|
|
19
|
+
export interface RawFrameReconstruction {
|
|
20
|
+
schemaVersion: typeof RAW_FRAME_RECONSTRUCTION_SCHEMA_VERSION;
|
|
21
|
+
rawFrame: SensorRawFrame;
|
|
22
|
+
phaseProfiles: readonly RawFrameReconstructionPhaseProfile[];
|
|
23
|
+
region: RasterRect;
|
|
24
|
+
linearPlane: {
|
|
25
|
+
imageState: "virtual-sensor-channels";
|
|
26
|
+
rasterBinding: "native-reconstruction-region";
|
|
27
|
+
pixelWidth: number;
|
|
28
|
+
pixelHeight: number;
|
|
29
|
+
channelIds: readonly string[];
|
|
30
|
+
/** Interleaved native-region row-major values; black-subtracted normalization, signed. */
|
|
31
|
+
samples: readonly number[];
|
|
32
|
+
};
|
|
33
|
+
/** Child envelopes and exact weighted RAW contributions, in matching native-region row-major order. */
|
|
34
|
+
pixels: readonly CalculationResult<SensorRawReconstructedPixel>[];
|
|
35
|
+
lineage: "engine-reconstructed-from-attached-raw";
|
|
36
|
+
producerOriginVerified: false;
|
|
37
|
+
whiteBalanceApplied: false;
|
|
38
|
+
colorTransformApplied: false;
|
|
39
|
+
physicalOrientationApplied: false;
|
|
40
|
+
outputCropApplied: false;
|
|
41
|
+
sharpeningApplied: false;
|
|
42
|
+
denoisingApplied: false;
|
|
43
|
+
}
|
|
44
|
+
/** Revalidates committed RAW codes/geometry and complete phase dispatch; no external plane may supply output values. */
|
|
45
|
+
export declare function parseRawFrameReconstructionInput(value: unknown): RawFrameReconstructionInput;
|
|
46
|
+
/** Delegates each pixel to #14's explicit linear reconstruction using only the attached native RAW samples. */
|
|
47
|
+
export declare function resolveRawFrameReconstruction(input: RawFrameReconstructionInput): CalculationResult<RawFrameReconstruction>;
|
|
48
|
+
//# sourceMappingURL=raw-frame-reconstruction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raw-frame-reconstruction.d.ts","sourceRoot":"","sources":["../../src/capture/raw-frame-reconstruction.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAE5F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EACL,KAAK,8BAA8B,EAAE,KAAK,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AACjH,OAAO,EAAwB,KAAK,cAAc,EAA4B,MAAM,uBAAuB,CAAC;AAE5G,eAAO,MAAM,uCAAuC,EAAG,OAAgB,CAAC;AACxE,yGAAyG;AACzG,MAAM,WAAW,kCAAkC;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,8BAA8B,CAAC;CACzC;AACD,0FAA0F;AAC1F,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,UAAU,CAAC;IACnB,aAAa,EAAE,SAAS,kCAAkC,EAAE,CAAC;CAC9D;AACD,8FAA8F;AAC9F,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,OAAO,uCAAuC,CAAC;IAC9D,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,EAAE,SAAS,kCAAkC,EAAE,CAAC;IAC7D,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,EAAE;QACX,UAAU,EAAE,yBAAyB,CAAC;QACtC,aAAa,EAAE,8BAA8B,CAAC;QAC9C,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;QAC9B,0FAA0F;QAC1F,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;KAC5B,CAAC;IACF,uGAAuG;IACvG,MAAM,EAAE,SAAS,iBAAiB,CAAC,2BAA2B,CAAC,EAAE,CAAC;IAClE,OAAO,EAAE,wCAAwC,CAAC;IAClD,sBAAsB,EAAE,KAAK,CAAC;IAC9B,mBAAmB,EAAE,KAAK,CAAC;IAC3B,qBAAqB,EAAE,KAAK,CAAC;IAC7B,0BAA0B,EAAE,KAAK,CAAC;IAClC,iBAAiB,EAAE,KAAK,CAAC;IACzB,iBAAiB,EAAE,KAAK,CAAC;IACzB,gBAAgB,EAAE,KAAK,CAAC;CACzB;AA6CD,wHAAwH;AACxH,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,OAAO,GAAG,2BAA2B,CA4B5F;AACD,+GAA+G;AAC/G,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,2BAA2B,GAAG,iBAAiB,CAAC,sBAAsB,CAAC,CAwC3H"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Module boundary and integration notes.
|
|
4
|
+
* Revalidates committed RAW codes/geometry and complete phase dispatch; no external plane may supply
|
|
5
|
+
* output values.
|
|
6
|
+
* Delegates each pixel to #14's explicit linear reconstruction using only the attached native RAW
|
|
7
|
+
* samples.
|
|
8
|
+
* @see docs/SIMULATED_CAPTURE.md for equations, coordinate/unit conventions, blockers and support
|
|
9
|
+
* limits.
|
|
10
|
+
*/
|
|
11
|
+
import { requireAllowlistedRecord } from "../core/record-validation.js";
|
|
12
|
+
import { RAW_REFERENCE_MAX_NATIVE_SITES } from "./raw-frame-limits.js";
|
|
13
|
+
import { freezeOwnedData } from "../core/owned-data.js";
|
|
14
|
+
import { approximationResult } from "../core/calculation-result.js";
|
|
15
|
+
import { InvalidConfigurationError } from "../core/configuration-error.js";
|
|
16
|
+
import { parseSensorRawReconstructionProfile, resolveSensorRawReconstruction } from "../sensor/raw-reconstruction.js";
|
|
17
|
+
import { createSensorRawFrame } from "./sensor-raw-frame.js";
|
|
18
|
+
export const RAW_FRAME_RECONSTRUCTION_SCHEMA_VERSION = "0.1.0";
|
|
19
|
+
function object(value, keys) {
|
|
20
|
+
return requireAllowlistedRecord(value, keys, "Invalid or non-allowlisted RAW reconstruction fields.");
|
|
21
|
+
}
|
|
22
|
+
function integer(value, positive = false) {
|
|
23
|
+
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < (positive ? 1 : 0)) {
|
|
24
|
+
throw new InvalidConfigurationError("RAW reconstruction coordinates require safe integers with valid sign.");
|
|
25
|
+
}
|
|
26
|
+
return Object.is(value, -0) ? 0 : value;
|
|
27
|
+
}
|
|
28
|
+
function frame(value) {
|
|
29
|
+
const r = object(value, ["frameId", "capture", "modeId", "captureModeProfile", "colorSamplingProfile", "bindingProfile",
|
|
30
|
+
"containerBitDepth", "samples", "schemaVersion", "sampleDomain", "sampleOrder", "producerBinding", "reconstructionApplied",
|
|
31
|
+
"renderingApplied", "nativePixelWidth", "nativePixelHeight"]);
|
|
32
|
+
if (r.schemaVersion !== "0.1.0" || r.sampleDomain !== "native-cfa-raw-code" || r.sampleOrder !== "native-row-major" ||
|
|
33
|
+
r.producerBinding !== "caller-declared-capture-attachment" || r.reconstructionApplied !== false || r.renderingApplied !== false ||
|
|
34
|
+
!Array.isArray(r.samples) || r.samples.length > RAW_REFERENCE_MAX_NATIVE_SITES) {
|
|
35
|
+
throw new InvalidConfigurationError("Reconstruction requires a committed native RAW frame of at most 4,096 samples.");
|
|
36
|
+
}
|
|
37
|
+
const { schemaVersion, sampleDomain, sampleOrder, producerBinding, reconstructionApplied, renderingApplied, nativePixelWidth, nativePixelHeight, ...input } = r;
|
|
38
|
+
void schemaVersion;
|
|
39
|
+
void sampleDomain;
|
|
40
|
+
void sampleOrder;
|
|
41
|
+
void producerBinding;
|
|
42
|
+
void reconstructionApplied;
|
|
43
|
+
void renderingApplied;
|
|
44
|
+
// The frame input parser checks full native coverage, site/code/seed identities and flags.
|
|
45
|
+
const result = createSensorRawFrame(input);
|
|
46
|
+
if (nativePixelWidth !== result.nativePixelWidth || nativePixelHeight !== result.nativePixelHeight) {
|
|
47
|
+
throw new InvalidConfigurationError("Committed RAW dimensions disagree with capture geometry.");
|
|
48
|
+
}
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
function profile(value) {
|
|
52
|
+
const r = object(value, ["schemaVersion", "profileId", "profileVersion", "captureModeId", "colorSamplingProfileId", "scientificStatus",
|
|
53
|
+
"method", "normalization", "negativeBlackSubtractedValuesAllowed", "kernels", "evidence", "limitations"]);
|
|
54
|
+
if (!Array.isArray(r.kernels) || r.kernels.length === 0 || r.kernels.length > 16) {
|
|
55
|
+
throw new InvalidConfigurationError("Reconstruction requires one to sixteen output channels.");
|
|
56
|
+
}
|
|
57
|
+
let count = 0;
|
|
58
|
+
for (const kernel of r.kernels) {
|
|
59
|
+
const k = object(kernel, ["outputChannelId", "contributions"]);
|
|
60
|
+
if (!Array.isArray(k.contributions) || k.contributions.length === 0)
|
|
61
|
+
throw new InvalidConfigurationError("Missing RAW contributions.");
|
|
62
|
+
count += k.contributions.length;
|
|
63
|
+
if (count > 256)
|
|
64
|
+
throw new InvalidConfigurationError("Reconstruction profile exceeds 256 contributions.");
|
|
65
|
+
for (const c of k.contributions)
|
|
66
|
+
object(c, ["offsetX", "offsetY", "sourceChannelId", "weight"]);
|
|
67
|
+
}
|
|
68
|
+
return parseSensorRawReconstructionProfile(r);
|
|
69
|
+
}
|
|
70
|
+
/** Revalidates committed RAW codes/geometry and complete phase dispatch; no external plane may supply output values. */
|
|
71
|
+
export function parseRawFrameReconstructionInput(value) {
|
|
72
|
+
const r = object(value, ["rawFrame", "region", "phaseProfiles"]), rawFrame = frame(r.rawFrame);
|
|
73
|
+
const rect = object(r.region, ["x", "y", "width", "height"]);
|
|
74
|
+
const region = { x: integer(rect.x), y: integer(rect.y), width: integer(rect.width, true), height: integer(rect.height, true) };
|
|
75
|
+
if (region.x + region.width > rawFrame.nativePixelWidth || region.y + region.height > rawFrame.nativePixelHeight) {
|
|
76
|
+
throw new InvalidConfigurationError("Reconstruction region must lie within the full native RAW frame.");
|
|
77
|
+
}
|
|
78
|
+
const layout = rawFrame.colorSamplingProfile.layout;
|
|
79
|
+
if (layout.kind !== "periodic-mosaic")
|
|
80
|
+
throw new InvalidConfigurationError("Reconstruction requires periodic native CFA.");
|
|
81
|
+
const phaseCount = layout.repeatWidthSites * layout.repeatHeightSites;
|
|
82
|
+
if (phaseCount > 64 || !Array.isArray(r.phaseProfiles) || r.phaseProfiles.length !== phaseCount) {
|
|
83
|
+
throw new InvalidConfigurationError("Every CFA phase requires one profile, with a maximum of 64 phases.");
|
|
84
|
+
}
|
|
85
|
+
const phaseProfiles = [];
|
|
86
|
+
const phases = new Set();
|
|
87
|
+
let channels;
|
|
88
|
+
for (const value of r.phaseProfiles) {
|
|
89
|
+
const p = object(value, ["phaseX", "phaseY", "profile"]), phaseX = integer(p.phaseX), phaseY = integer(p.phaseY), parsed = profile(p.profile);
|
|
90
|
+
const key = phaseX + ":" + phaseY, ids = parsed.kernels.map((k) => k.outputChannelId);
|
|
91
|
+
if (phaseX >= layout.repeatWidthSites || phaseY >= layout.repeatHeightSites || phases.has(key) ||
|
|
92
|
+
parsed.captureModeId !== rawFrame.modeId || parsed.colorSamplingProfileId !== rawFrame.colorSamplingProfile.profileId ||
|
|
93
|
+
(channels && JSON.stringify(ids) !== JSON.stringify(channels))) {
|
|
94
|
+
throw new InvalidConfigurationError("CFA phase/profile identity or output-channel order is inconsistent.");
|
|
95
|
+
}
|
|
96
|
+
channels = ids;
|
|
97
|
+
phases.add(key);
|
|
98
|
+
phaseProfiles.push({ phaseX, phaseY, profile: parsed });
|
|
99
|
+
}
|
|
100
|
+
phaseProfiles.sort((a, b) => a.phaseY - b.phaseY || a.phaseX - b.phaseX);
|
|
101
|
+
return { rawFrame, region, phaseProfiles };
|
|
102
|
+
}
|
|
103
|
+
/** Delegates each pixel to #14's explicit linear reconstruction using only the attached native RAW samples. */
|
|
104
|
+
export function resolveRawFrameReconstruction(input) {
|
|
105
|
+
const v = parseRawFrameReconstructionInput(input), f = v.rawFrame, layout = f.colorSamplingProfile.layout;
|
|
106
|
+
if (layout.kind !== "periodic-mosaic")
|
|
107
|
+
throw new InvalidConfigurationError("Reconstruction requires periodic native CFA.");
|
|
108
|
+
const pixels = [], samples = [];
|
|
109
|
+
for (let y = v.region.y; y < v.region.y + v.region.height; y++) {
|
|
110
|
+
for (let x = v.region.x; x < v.region.x + v.region.width; x++) {
|
|
111
|
+
const phaseIndex = (y % layout.repeatHeightSites) * layout.repeatWidthSites + x % layout.repeatWidthSites;
|
|
112
|
+
const selected = v.phaseProfiles[phaseIndex].profile, indices = new Set();
|
|
113
|
+
for (const kernel of selected.kernels) {
|
|
114
|
+
for (const c of kernel.contributions) {
|
|
115
|
+
const sx = x + c.offsetX, sy = y + c.offsetY;
|
|
116
|
+
if (!Number.isSafeInteger(sx) || !Number.isSafeInteger(sy) || sx < 0 || sy < 0 || sx >= f.nativePixelWidth || sy >= f.nativePixelHeight) {
|
|
117
|
+
throw new InvalidConfigurationError("Reconstruction kernel leaves the native RAW frame; no padding or renormalization is allowed.");
|
|
118
|
+
}
|
|
119
|
+
const i = sy * f.nativePixelWidth + sx;
|
|
120
|
+
if (f.samples[i].channelId !== c.sourceChannelId)
|
|
121
|
+
throw new InvalidConfigurationError("Reconstruction source channel disagrees with absolute CFA phase.");
|
|
122
|
+
indices.add(i);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
const pixel = resolveSensorRawReconstruction({ profile: selected, colorSamplingProfile: f.colorSamplingProfile,
|
|
126
|
+
centerSite: { x, y }, samples: [...indices].map((i) => f.samples[i]) });
|
|
127
|
+
pixels.push(pixel);
|
|
128
|
+
samples.push(...pixel.value.outputChannels.map((c) => c.linearBlackSubtractedNormalizedValue));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
const value = { schemaVersion: RAW_FRAME_RECONSTRUCTION_SCHEMA_VERSION,
|
|
132
|
+
rawFrame: f, phaseProfiles: v.phaseProfiles, region: v.region,
|
|
133
|
+
linearPlane: { imageState: "virtual-sensor-channels", rasterBinding: "native-reconstruction-region",
|
|
134
|
+
pixelWidth: v.region.width, pixelHeight: v.region.height,
|
|
135
|
+
channelIds: v.phaseProfiles[0].profile.kernels.map((k) => k.outputChannelId), samples }, pixels,
|
|
136
|
+
lineage: "engine-reconstructed-from-attached-raw", producerOriginVerified: false, whiteBalanceApplied: false,
|
|
137
|
+
colorTransformApplied: false, physicalOrientationApplied: false, outputCropApplied: false, sharpeningApplied: false, denoisingApplied: false };
|
|
138
|
+
return freezeOwnedData(approximationResult(JSON.parse(JSON.stringify(value)), "attached-raw-native-region-linear-reconstruction", "0.1.0", [
|
|
139
|
+
"Pixel values come exclusively from exact attached RAW samples through the existing explicit linear-neighborhood resolver.",
|
|
140
|
+
"The RAW producer/capture attachment remains caller-declared; this does not verify producer origin or calibrate sensor color.",
|
|
141
|
+
"Phase-specific kernels are explicit approximation policy; negative values and child provenance are retained.",
|
|
142
|
+
"No edge extension, CFA rephasing, WB, color conversion, orientation, output crop, sharpening, denoising or JPEG processing is applied.",
|
|
143
|
+
"Attached capture float planes are metadata/source history only and are not used to reconstruct these values."
|
|
144
|
+
]));
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=raw-frame-reconstruction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raw-frame-reconstruction.js","sourceRoot":"","sources":["../../src/capture/raw-frame-reconstruction.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;;;;GAQG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAA0B,MAAM,+BAA+B,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,OAAO,EAAE,mCAAmC,EAAE,8BAA8B,EACH,MAAM,iCAAiC,CAAC;AACjH,OAAO,EAAE,oBAAoB,EAAiD,MAAM,uBAAuB,CAAC;AAE5G,MAAM,CAAC,MAAM,uCAAuC,GAAG,OAAgB,CAAC;AAuCxE,SAAS,MAAM,CAAC,KAAc,EAAE,IAAuB;IACrD,OAAO,wBAAwB,CAAC,KAAK,EAAE,IAAI,EAAE,uDAAuD,CAAC,CAAC;AACxG,CAAC;AACD,SAAS,OAAO,CAAC,KAAc,EAAE,QAAQ,GAAG,KAAK;IAC/C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5F,MAAM,IAAI,yBAAyB,CAAC,uEAAuE,CAAC,CAAC;IAC/G,CAAC;IACD,OAAO,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,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