@photivra/engine 1.4.0 → 2.0.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.
Files changed (1074) hide show
  1. package/CHANGELOG.md +401 -6
  2. package/CITATION.cff +1 -1
  3. package/NODE_SUPPORT.md +64 -12
  4. package/README.md +301 -182
  5. package/SECURITY.md +37 -28
  6. package/THIRD_PARTY.md +148 -4
  7. package/dist/camera/equivalent-focal-length.d.ts +13 -14
  8. package/dist/camera/equivalent-focal-length.js +15 -13
  9. package/dist/camera/equivalent-focal-length.js.map +1 -1
  10. package/dist/camera/field-of-view.d.ts +30 -19
  11. package/dist/camera/field-of-view.js +67 -18
  12. package/dist/camera/field-of-view.js.map +1 -1
  13. package/dist/camera/lens-projection.d.ts +170 -0
  14. package/dist/camera/lens-projection.js +444 -0
  15. package/dist/camera/lens-projection.js.map +1 -0
  16. package/dist/camera/projected-object-size.d.ts +10 -11
  17. package/dist/camera/projected-object-size.js +12 -10
  18. package/dist/camera/projected-object-size.js.map +1 -1
  19. package/dist/capture/capture-export-metadata.d.ts +9 -10
  20. package/dist/capture/capture-export-metadata.js +8 -5
  21. package/dist/capture/capture-export-metadata.js.map +1 -1
  22. package/dist/capture/dng-import.d.ts +91 -0
  23. package/dist/capture/dng-import.js +343 -0
  24. package/dist/capture/dng-import.js.map +1 -0
  25. package/dist/capture/environment-raw-producer.d.ts +37 -17
  26. package/dist/capture/environment-raw-producer.js +43 -19
  27. package/dist/capture/environment-raw-producer.js.map +1 -1
  28. package/dist/capture/export-jpeg.d.ts +35 -4
  29. package/dist/capture/export-jpeg.js +133 -47
  30. package/dist/capture/export-jpeg.js.map +1 -1
  31. package/dist/capture/export-tiff.d.ts +48 -24
  32. package/dist/capture/export-tiff.js +91 -31
  33. package/dist/capture/export-tiff.js.map +1 -1
  34. package/dist/capture/focus-control.d.ts +42 -65
  35. package/dist/capture/focus-control.js +56 -75
  36. package/dist/capture/focus-control.js.map +1 -1
  37. package/dist/capture/host-yield-cadence.d.ts +25 -0
  38. package/dist/capture/host-yield-cadence.js +25 -0
  39. package/dist/capture/host-yield-cadence.js.map +1 -0
  40. package/dist/capture/linear-encoding.d.ts +14 -12
  41. package/dist/capture/linear-encoding.js +14 -13
  42. package/dist/capture/linear-encoding.js.map +1 -1
  43. package/dist/capture/lossless-jpeg.d.ts +27 -0
  44. package/dist/capture/lossless-jpeg.js +237 -0
  45. package/dist/capture/lossless-jpeg.js.map +1 -0
  46. package/dist/capture/native-environment-lean.d.ts +227 -0
  47. package/dist/capture/native-environment-lean.js +974 -0
  48. package/dist/capture/native-environment-lean.js.map +1 -0
  49. package/dist/capture/native-environment-optical-stage.d.ts +97 -0
  50. package/dist/capture/native-environment-optical-stage.js +340 -0
  51. package/dist/capture/native-environment-optical-stage.js.map +1 -0
  52. package/dist/capture/native-environment-raw.d.ts +140 -6
  53. package/dist/capture/native-environment-raw.js +435 -34
  54. package/dist/capture/native-environment-raw.js.map +1 -1
  55. package/dist/capture/native-raw-development.d.ts +118 -5
  56. package/dist/capture/native-raw-development.js +224 -59
  57. package/dist/capture/native-raw-development.js.map +1 -1
  58. package/dist/capture/native-raw-dng.d.ts +60 -0
  59. package/dist/capture/native-raw-dng.js +167 -0
  60. package/dist/capture/native-raw-dng.js.map +1 -0
  61. package/dist/capture/native-raw.d.ts +67 -10
  62. package/dist/capture/native-raw.js +90 -24
  63. package/dist/capture/native-raw.js.map +1 -1
  64. package/dist/capture/packed-sensor-raw.d.ts +160 -0
  65. package/dist/capture/packed-sensor-raw.js +221 -0
  66. package/dist/capture/packed-sensor-raw.js.map +1 -0
  67. package/dist/capture/photographic-export.d.ts +58 -35
  68. package/dist/capture/photographic-export.js +177 -70
  69. package/dist/capture/photographic-export.js.map +1 -1
  70. package/dist/capture/raw-development-kernel.d.ts +52 -0
  71. package/dist/capture/raw-development-kernel.js +88 -0
  72. package/dist/capture/raw-development-kernel.js.map +1 -0
  73. package/dist/capture/raw-frame-limits.d.ts +7 -7
  74. package/dist/capture/raw-frame-limits.js +7 -6
  75. package/dist/capture/raw-frame-limits.js.map +1 -1
  76. package/dist/capture/raw-frame-reconstruction.d.ts +8 -9
  77. package/dist/capture/raw-frame-reconstruction.js +9 -8
  78. package/dist/capture/raw-frame-reconstruction.js.map +1 -1
  79. package/dist/capture/raw-white-level.d.ts +55 -0
  80. package/dist/capture/raw-white-level.js +165 -0
  81. package/dist/capture/raw-white-level.js.map +1 -0
  82. package/dist/capture/release-sequence.d.ts +5 -7
  83. package/dist/capture/release-sequence.js +15 -13
  84. package/dist/capture/release-sequence.js.map +1 -1
  85. package/dist/capture/sensor-raw-frame.d.ts +5 -6
  86. package/dist/capture/sensor-raw-frame.js +26 -9
  87. package/dist/capture/sensor-raw-frame.js.map +1 -1
  88. package/dist/capture/sensor-raw-producer.d.ts +21 -13
  89. package/dist/capture/sensor-raw-producer.js +86 -25
  90. package/dist/capture/sensor-raw-producer.js.map +1 -1
  91. package/dist/capture/simulated-capture.d.ts +15 -16
  92. package/dist/capture/simulated-capture.js +22 -12
  93. package/dist/capture/simulated-capture.js.map +1 -1
  94. package/dist/color/camera-color-matrix.d.ts +69 -0
  95. package/dist/color/camera-color-matrix.js +132 -0
  96. package/dist/color/camera-color-matrix.js.map +1 -0
  97. package/dist/color/capture-color.d.ts +17 -10
  98. package/dist/color/capture-color.js +50 -17
  99. package/dist/color/capture-color.js.map +1 -1
  100. package/dist/color/chromatic-adaptation.d.ts +63 -0
  101. package/dist/color/chromatic-adaptation.js +91 -0
  102. package/dist/color/chromatic-adaptation.js.map +1 -0
  103. package/dist/color/color-difference.d.ts +104 -0
  104. package/dist/color/color-difference.js +205 -0
  105. package/dist/color/color-difference.js.map +1 -0
  106. package/dist/color/color-matching-functions.d.ts +168 -0
  107. package/dist/color/color-matching-functions.js +309 -0
  108. package/dist/color/color-matching-functions.js.map +1 -0
  109. package/dist/color/colorimetry-math.d.ts +52 -0
  110. package/dist/color/colorimetry-math.js +144 -0
  111. package/dist/color/colorimetry-math.js.map +1 -0
  112. package/dist/color/gamut-mapping.d.ts +54 -0
  113. package/dist/color/gamut-mapping.js +107 -0
  114. package/dist/color/gamut-mapping.js.map +1 -0
  115. package/dist/color/illuminants.d.ts +182 -0
  116. package/dist/color/illuminants.js +434 -0
  117. package/dist/color/illuminants.js.map +1 -0
  118. package/dist/color/rgb-color-spaces.d.ts +79 -0
  119. package/dist/color/rgb-color-spaces.js +115 -0
  120. package/dist/color/rgb-color-spaces.js.map +1 -0
  121. package/dist/color/sensor-color-development.d.ts +33 -11
  122. package/dist/color/sensor-color-development.js +104 -30
  123. package/dist/color/sensor-color-development.js.map +1 -1
  124. package/dist/color/srgb-icc.d.ts +9 -2
  125. package/dist/color/srgb-icc.js +16 -5
  126. package/dist/color/srgb-icc.js.map +1 -1
  127. package/dist/color/srgb-transfer.d.ts +1 -2
  128. package/dist/color/srgb-transfer.js +1 -1
  129. package/dist/color/srgb-transfer.js.map +1 -1
  130. package/dist/color/white-balance.d.ts +68 -19
  131. package/dist/color/white-balance.js +168 -35
  132. package/dist/color/white-balance.js.map +1 -1
  133. package/dist/composition/image-formation-plan.d.ts +152 -128
  134. package/dist/composition/image-formation-plan.js +292 -138
  135. package/dist/composition/image-formation-plan.js.map +1 -1
  136. package/dist/composition/plan-consumer.d.ts +6 -7
  137. package/dist/composition/plan-consumer.js +14 -11
  138. package/dist/composition/plan-consumer.js.map +1 -1
  139. package/dist/core/calculation-result.d.ts +21 -14
  140. package/dist/core/calculation-result.js +209 -11
  141. package/dist/core/calculation-result.js.map +1 -1
  142. package/dist/core/canonical-json.d.ts +13 -8
  143. package/dist/core/canonical-json.js +34 -15
  144. package/dist/core/canonical-json.js.map +1 -1
  145. package/dist/core/configuration-error.d.ts +5 -4
  146. package/dist/core/configuration-error.js +5 -3
  147. package/dist/core/configuration-error.js.map +1 -1
  148. package/dist/core/evidence-provenance.d.ts +12 -12
  149. package/dist/core/evidence-provenance.js +10 -9
  150. package/dist/core/evidence-provenance.js.map +1 -1
  151. package/dist/core/image-formation.d.ts +11 -10
  152. package/dist/core/image-formation.js +11 -9
  153. package/dist/core/image-formation.js.map +1 -1
  154. package/dist/core/owned-data.d.ts +9 -17
  155. package/dist/core/owned-data.js +9 -16
  156. package/dist/core/owned-data.js.map +1 -1
  157. package/dist/core/portable-math.d.ts +15 -0
  158. package/dist/core/portable-math.js +56 -0
  159. package/dist/core/portable-math.js.map +1 -0
  160. package/dist/core/record-validation.d.ts +48 -9
  161. package/dist/core/record-validation.js +93 -19
  162. package/dist/core/record-validation.js.map +1 -1
  163. package/dist/core/scientific-assurance.d.ts +16 -14
  164. package/dist/core/scientific-assurance.js +22 -18
  165. package/dist/core/scientific-assurance.js.map +1 -1
  166. package/dist/core/spectral-composition.d.ts +13 -14
  167. package/dist/core/spectral-composition.js +30 -27
  168. package/dist/core/spectral-composition.js.map +1 -1
  169. package/dist/core/spectral.d.ts +5 -6
  170. package/dist/core/spectral.js +9 -7
  171. package/dist/core/spectral.js.map +1 -1
  172. package/dist/core/validation.d.ts +3 -6
  173. package/dist/core/validation.js +3 -5
  174. package/dist/core/validation.js.map +1 -1
  175. package/dist/core/version.d.ts +6 -6
  176. package/dist/core/version.js +6 -5
  177. package/dist/core/version.js.map +1 -1
  178. package/dist/equipment/exposure-capabilities.d.ts +10 -10
  179. package/dist/equipment/exposure-capabilities.js +40 -30
  180. package/dist/equipment/exposure-capabilities.js.map +1 -1
  181. package/dist/equipment/generic-tier-assets.d.ts +13 -6
  182. package/dist/equipment/generic-tier-assets.js +34 -15
  183. package/dist/equipment/generic-tier-assets.js.map +1 -1
  184. package/dist/equipment/generic-tier-presets.d.ts +5 -6
  185. package/dist/equipment/generic-tier-presets.js +15 -13
  186. package/dist/equipment/generic-tier-presets.js.map +1 -1
  187. package/dist/equipment/iso-capabilities.d.ts +21 -22
  188. package/dist/equipment/iso-capabilities.js +49 -44
  189. package/dist/equipment/iso-capabilities.js.map +1 -1
  190. package/dist/equipment/metering-capabilities.d.ts +5 -6
  191. package/dist/equipment/metering-capabilities.js +22 -19
  192. package/dist/equipment/metering-capabilities.js.map +1 -1
  193. package/dist/equipment/release-capabilities.d.ts +3 -4
  194. package/dist/equipment/release-capabilities.js +18 -14
  195. package/dist/equipment/release-capabilities.js.map +1 -1
  196. package/dist/exposure/exposure-duration-control.d.ts +19 -17
  197. package/dist/exposure/exposure-duration-control.js +27 -23
  198. package/dist/exposure/exposure-duration-control.js.map +1 -1
  199. package/dist/exposure/exposure-mode-resolver.d.ts +42 -39
  200. package/dist/exposure/exposure-mode-resolver.js +127 -82
  201. package/dist/exposure/exposure-mode-resolver.js.map +1 -1
  202. package/dist/exposure/exposure.d.ts +17 -16
  203. package/dist/exposure/exposure.js +22 -15
  204. package/dist/exposure/exposure.js.map +1 -1
  205. package/dist/exposure/flash-ttl.d.ts +135 -0
  206. package/dist/exposure/flash-ttl.js +193 -0
  207. package/dist/exposure/flash-ttl.js.map +1 -0
  208. package/dist/exposure/flash.d.ts +144 -36
  209. package/dist/exposure/flash.js +259 -59
  210. package/dist/exposure/flash.js.map +1 -1
  211. package/dist/exposure/metering-scene-radiance.d.ts +10 -10
  212. package/dist/exposure/metering-scene-radiance.js +42 -23
  213. package/dist/exposure/metering-scene-radiance.js.map +1 -1
  214. package/dist/exposure/metering-target.d.ts +8 -8
  215. package/dist/exposure/metering-target.js +30 -20
  216. package/dist/exposure/metering-target.js.map +1 -1
  217. package/dist/exposure/metering-temporal.d.ts +16 -15
  218. package/dist/exposure/metering-temporal.js +41 -19
  219. package/dist/exposure/metering-temporal.js.map +1 -1
  220. package/dist/exposure/metering.d.ts +64 -17
  221. package/dist/exposure/metering.js +159 -30
  222. package/dist/exposure/metering.js.map +1 -1
  223. package/dist/exposure/program-line.d.ts +5 -5
  224. package/dist/exposure/program-line.js +20 -13
  225. package/dist/exposure/program-line.js.map +1 -1
  226. package/dist/facade/camera-preset.d.ts +8 -0
  227. package/dist/facade/camera-preset.js +102 -0
  228. package/dist/facade/camera-preset.js.map +1 -0
  229. package/dist/facade/chart-radiance-batch.d.ts +57 -0
  230. package/dist/facade/chart-radiance-batch.js +121 -0
  231. package/dist/facade/chart-radiance-batch.js.map +1 -0
  232. package/dist/facade/chart-scenes.d.ts +177 -0
  233. package/dist/facade/chart-scenes.js +232 -0
  234. package/dist/facade/chart-scenes.js.map +1 -0
  235. package/dist/facade/host-yield.d.ts +7 -0
  236. package/dist/facade/host-yield.js +23 -0
  237. package/dist/facade/host-yield.js.map +1 -0
  238. package/dist/facade/scene-radiance.d.ts +117 -0
  239. package/dist/facade/scene-radiance.js +205 -0
  240. package/dist/facade/scene-radiance.js.map +1 -0
  241. package/dist/facade/simulate-capture.d.ts +284 -0
  242. package/dist/facade/simulate-capture.js +1026 -0
  243. package/dist/facade/simulate-capture.js.map +1 -0
  244. package/dist/gpu/chart-radiance-gpu.d.ts +17 -0
  245. package/dist/gpu/chart-radiance-gpu.js +176 -0
  246. package/dist/gpu/chart-radiance-gpu.js.map +1 -0
  247. package/dist/gpu/image-kernel-accelerator.d.ts +132 -0
  248. package/dist/gpu/image-kernel-accelerator.js +720 -0
  249. package/dist/gpu/image-kernel-accelerator.js.map +1 -0
  250. package/dist/gpu/image-kernel-execution.d.ts +92 -0
  251. package/dist/gpu/image-kernel-execution.js +84 -0
  252. package/dist/gpu/image-kernel-execution.js.map +1 -0
  253. package/dist/gpu/sensor-stage-gpu.d.ts +44 -0
  254. package/dist/gpu/sensor-stage-gpu.js +317 -0
  255. package/dist/gpu/sensor-stage-gpu.js.map +1 -0
  256. package/dist/gpu/temporal-sum-gpu.d.ts +23 -0
  257. package/dist/gpu/temporal-sum-gpu.js +150 -0
  258. package/dist/gpu/temporal-sum-gpu.js.map +1 -0
  259. package/dist/gpu/webgpu-runtime.d.ts +63 -0
  260. package/dist/gpu/webgpu-runtime.js +215 -0
  261. package/dist/gpu/webgpu-runtime.js.map +1 -0
  262. package/dist/gpu/wgsl-chart-kernel.d.ts +30 -0
  263. package/dist/gpu/wgsl-chart-kernel.js +165 -0
  264. package/dist/gpu/wgsl-chart-kernel.js.map +1 -0
  265. package/dist/gpu/wgsl-kernels.d.ts +53 -0
  266. package/dist/gpu/wgsl-kernels.js +365 -0
  267. package/dist/gpu/wgsl-kernels.js.map +1 -0
  268. package/dist/gpu/wgsl-sensor-kernel.d.ts +64 -0
  269. package/dist/gpu/wgsl-sensor-kernel.js +409 -0
  270. package/dist/gpu/wgsl-sensor-kernel.js.map +1 -0
  271. package/dist/index.d.ts +89 -25
  272. package/dist/index.js +59 -15
  273. package/dist/index.js.map +1 -1
  274. package/dist/motion/camera-rotation.d.ts +92 -40
  275. package/dist/motion/camera-rotation.js +84 -47
  276. package/dist/motion/camera-rotation.js.map +1 -1
  277. package/dist/motion/capture-rotation-inverse-mapping.d.ts +37 -34
  278. package/dist/motion/capture-rotation-inverse-mapping.js +32 -24
  279. package/dist/motion/capture-rotation-inverse-mapping.js.map +1 -1
  280. package/dist/motion/capture-rotation-temporal-quadrature.d.ts +39 -35
  281. package/dist/motion/capture-rotation-temporal-quadrature.js +37 -28
  282. package/dist/motion/capture-rotation-temporal-quadrature.js.map +1 -1
  283. package/dist/motion/capture-rotation-trajectory.d.ts +32 -28
  284. package/dist/motion/capture-rotation-trajectory.js +36 -26
  285. package/dist/motion/capture-rotation-trajectory.js.map +1 -1
  286. package/dist/motion/capture-translation-parallax-temporal-quadrature.d.ts +23 -21
  287. package/dist/motion/capture-translation-parallax-temporal-quadrature.js +33 -14
  288. package/dist/motion/capture-translation-parallax-temporal-quadrature.js.map +1 -1
  289. package/dist/motion/extended-object-projection.d.ts +19 -16
  290. package/dist/motion/extended-object-projection.js +38 -18
  291. package/dist/motion/extended-object-projection.js.map +1 -1
  292. package/dist/motion/projected-motion.d.ts +18 -17
  293. package/dist/motion/projected-motion.js +25 -17
  294. package/dist/motion/projected-motion.js.map +1 -1
  295. package/dist/motion/temporal-exposure-sum.d.ts +55 -0
  296. package/dist/motion/temporal-exposure-sum.js +141 -0
  297. package/dist/motion/temporal-exposure-sum.js.map +1 -0
  298. package/dist/motion/video-sequence.d.ts +111 -0
  299. package/dist/motion/video-sequence.js +179 -0
  300. package/dist/motion/video-sequence.js.map +1 -0
  301. package/dist/optics/aperture.d.ts +14 -15
  302. package/dist/optics/aperture.js +13 -11
  303. package/dist/optics/aperture.js.map +1 -1
  304. package/dist/optics/atmospheric-haze.d.ts +83 -0
  305. package/dist/optics/atmospheric-haze.js +113 -0
  306. package/dist/optics/atmospheric-haze.js.map +1 -0
  307. package/dist/optics/brown-conrady-distortion.d.ts +116 -0
  308. package/dist/optics/brown-conrady-distortion.js +291 -0
  309. package/dist/optics/brown-conrady-distortion.js.map +1 -0
  310. package/dist/optics/circle-of-confusion.d.ts +10 -10
  311. package/dist/optics/circle-of-confusion.js +15 -11
  312. package/dist/optics/circle-of-confusion.js.map +1 -1
  313. package/dist/optics/complex-pupil-psf.d.ts +64 -33
  314. package/dist/optics/complex-pupil-psf.js +190 -98
  315. package/dist/optics/complex-pupil-psf.js.map +1 -1
  316. package/dist/optics/depth-of-field.d.ts +25 -15
  317. package/dist/optics/depth-of-field.js +67 -27
  318. package/dist/optics/depth-of-field.js.map +1 -1
  319. package/dist/optics/diffraction.d.ts +14 -13
  320. package/dist/optics/diffraction.js +14 -10
  321. package/dist/optics/diffraction.js.map +1 -1
  322. package/dist/optics/focus-breathing.d.ts +88 -27
  323. package/dist/optics/focus-breathing.js +114 -23
  324. package/dist/optics/focus-breathing.js.map +1 -1
  325. package/dist/optics/focus-state.d.ts +18 -18
  326. package/dist/optics/focus-state.js +21 -15
  327. package/dist/optics/focus-state.js.map +1 -1
  328. package/dist/optics/front-of-lens-filter.d.ts +45 -14
  329. package/dist/optics/front-of-lens-filter.js +259 -88
  330. package/dist/optics/front-of-lens-filter.js.map +1 -1
  331. package/dist/optics/illumination-vignetting.d.ts +16 -17
  332. package/dist/optics/illumination-vignetting.js +40 -17
  333. package/dist/optics/illumination-vignetting.js.map +1 -1
  334. package/dist/optics/irradiance-convolution.d.ts +59 -0
  335. package/dist/optics/irradiance-convolution.js +138 -0
  336. package/dist/optics/irradiance-convolution.js.map +1 -0
  337. package/dist/optics/lateral-chromatic-aberration.d.ts +33 -30
  338. package/dist/optics/lateral-chromatic-aberration.js +33 -23
  339. package/dist/optics/lateral-chromatic-aberration.js.map +1 -1
  340. package/dist/optics/lens-psf-kernels.d.ts +89 -0
  341. package/dist/optics/lens-psf-kernels.js +175 -0
  342. package/dist/optics/lens-psf-kernels.js.map +1 -0
  343. package/dist/optics/lens-psf-profile.d.ts +78 -46
  344. package/dist/optics/lens-psf-profile.js +335 -124
  345. package/dist/optics/lens-psf-profile.js.map +1 -1
  346. package/dist/optics/longitudinal-chromatic-aberration.d.ts +102 -0
  347. package/dist/optics/longitudinal-chromatic-aberration.js +210 -0
  348. package/dist/optics/longitudinal-chromatic-aberration.js.map +1 -0
  349. package/dist/optics/polygon-diffraction.d.ts +80 -23
  350. package/dist/optics/polygon-diffraction.js +130 -25
  351. package/dist/optics/polygon-diffraction.js.map +1 -1
  352. package/dist/optics/profile-contract.d.ts +5 -6
  353. package/dist/optics/profile-contract.js +14 -11
  354. package/dist/optics/profile-contract.js.map +1 -1
  355. package/dist/optics/psf-foundation.d.ts +23 -23
  356. package/dist/optics/psf-foundation.js +24 -21
  357. package/dist/optics/psf-foundation.js.map +1 -1
  358. package/dist/optics/pupil-vignetting.d.ts +118 -0
  359. package/dist/optics/pupil-vignetting.js +264 -0
  360. package/dist/optics/pupil-vignetting.js.map +1 -0
  361. package/dist/optics/radial-distortion.d.ts +34 -33
  362. package/dist/optics/radial-distortion.js +37 -30
  363. package/dist/optics/radial-distortion.js.map +1 -1
  364. package/dist/optics/scene-to-sensor-irradiance.d.ts +47 -33
  365. package/dist/optics/scene-to-sensor-irradiance.js +73 -45
  366. package/dist/optics/scene-to-sensor-irradiance.js.map +1 -1
  367. package/dist/optics/scene-to-sensor-quadrature.d.ts +23 -18
  368. package/dist/optics/scene-to-sensor-quadrature.js +16 -11
  369. package/dist/optics/scene-to-sensor-quadrature.js.map +1 -1
  370. package/dist/optics/sensor-aperture-rays.d.ts +20 -4
  371. package/dist/optics/sensor-aperture-rays.js +32 -14
  372. package/dist/optics/sensor-aperture-rays.js.map +1 -1
  373. package/dist/optics/sensor-environment-query.d.ts +81 -16
  374. package/dist/optics/sensor-environment-query.js +145 -12
  375. package/dist/optics/sensor-environment-query.js.map +1 -1
  376. package/dist/optics/sensor-psf-quadrature.d.ts +12 -10
  377. package/dist/optics/sensor-psf-quadrature.js +18 -11
  378. package/dist/optics/sensor-psf-quadrature.js.map +1 -1
  379. package/dist/optics/sensor-psf-support.d.ts +8 -6
  380. package/dist/optics/sensor-psf-support.js +8 -5
  381. package/dist/optics/sensor-psf-support.js.map +1 -1
  382. package/dist/optics/stray-light.d.ts +22 -19
  383. package/dist/optics/stray-light.js +18 -12
  384. package/dist/optics/stray-light.js.map +1 -1
  385. package/dist/optics/thin-lens.d.ts +10 -9
  386. package/dist/optics/thin-lens.js +12 -8
  387. package/dist/optics/thin-lens.js.map +1 -1
  388. package/dist/optics/zernike-wavefront.d.ts +154 -0
  389. package/dist/optics/zernike-wavefront.js +352 -0
  390. package/dist/optics/zernike-wavefront.js.map +1 -0
  391. package/dist/output/capture-corrected-sdr.d.ts +16 -8
  392. package/dist/output/capture-corrected-sdr.js +16 -8
  393. package/dist/output/capture-corrected-sdr.js.map +1 -1
  394. package/dist/output/capture-geometry.d.ts +34 -36
  395. package/dist/output/capture-geometry.js +52 -32
  396. package/dist/output/capture-geometry.js.map +1 -1
  397. package/dist/output/capture-sdr.d.ts +7 -6
  398. package/dist/output/capture-sdr.js +11 -8
  399. package/dist/output/capture-sdr.js.map +1 -1
  400. package/dist/output/crop.d.ts +22 -6
  401. package/dist/output/crop.js +40 -6
  402. package/dist/output/crop.js.map +1 -1
  403. package/dist/output/geometric-transforms.d.ts +60 -23
  404. package/dist/output/geometric-transforms.js +111 -24
  405. package/dist/output/geometric-transforms.js.map +1 -1
  406. package/dist/output/lens-corrections.d.ts +27 -19
  407. package/dist/output/lens-corrections.js +29 -13
  408. package/dist/output/lens-corrections.js.map +1 -1
  409. package/dist/output/native-capture-sdr.d.ts +71 -16
  410. package/dist/output/native-capture-sdr.js +190 -33
  411. package/dist/output/native-capture-sdr.js.map +1 -1
  412. package/dist/output/png-encoder.d.ts +65 -0
  413. package/dist/output/png-encoder.js +461 -0
  414. package/dist/output/png-encoder.js.map +1 -0
  415. package/dist/output/print-contrast-reference.d.ts +10 -9
  416. package/dist/output/print-contrast-reference.js +10 -8
  417. package/dist/output/print-contrast-reference.js.map +1 -1
  418. package/dist/output/print-detail.d.ts +18 -17
  419. package/dist/output/print-detail.js +12 -10
  420. package/dist/output/print-detail.js.map +1 -1
  421. package/dist/output/print-jpeg.d.ts +26 -5
  422. package/dist/output/print-jpeg.js +117 -50
  423. package/dist/output/print-jpeg.js.map +1 -1
  424. package/dist/output/print-plan.d.ts +19 -19
  425. package/dist/output/print-plan.js +11 -10
  426. package/dist/output/print-plan.js.map +1 -1
  427. package/dist/output/print-region-statistics.d.ts +14 -15
  428. package/dist/output/print-region-statistics.js +11 -11
  429. package/dist/output/print-region-statistics.js.map +1 -1
  430. package/dist/output/sdr-rendering.d.ts +48 -10
  431. package/dist/output/sdr-rendering.js +114 -25
  432. package/dist/output/sdr-rendering.js.map +1 -1
  433. package/dist/output/subject-framing-crop.d.ts +6 -10
  434. package/dist/output/subject-framing-crop.js +23 -13
  435. package/dist/output/subject-framing-crop.js.map +1 -1
  436. package/dist/processing/demosaic.d.ts +90 -0
  437. package/dist/processing/demosaic.js +275 -0
  438. package/dist/processing/demosaic.js.map +1 -0
  439. package/dist/processing/denoise.d.ts +68 -0
  440. package/dist/processing/denoise.js +214 -0
  441. package/dist/processing/denoise.js.map +1 -0
  442. package/dist/processing/focus-stacking.d.ts +17 -0
  443. package/dist/processing/focus-stacking.js +80 -0
  444. package/dist/processing/focus-stacking.js.map +1 -0
  445. package/dist/processing/hdr.d.ts +54 -0
  446. package/dist/processing/hdr.js +172 -0
  447. package/dist/processing/hdr.js.map +1 -0
  448. package/dist/processing/image-ops.d.ts +66 -0
  449. package/dist/processing/image-ops.js +192 -0
  450. package/dist/processing/image-ops.js.map +1 -0
  451. package/dist/processing/panorama.d.ts +51 -0
  452. package/dist/processing/panorama.js +305 -0
  453. package/dist/processing/panorama.js.map +1 -0
  454. package/dist/processing/processing-task.d.ts +85 -0
  455. package/dist/processing/processing-task.js +164 -0
  456. package/dist/processing/processing-task.js.map +1 -0
  457. package/dist/processing/tone-mapping.d.ts +69 -0
  458. package/dist/processing/tone-mapping.js +310 -0
  459. package/dist/processing/tone-mapping.js.map +1 -0
  460. package/dist/schema/camera.d.ts +5 -4
  461. package/dist/schema/illumination-spectral.d.ts +13 -19
  462. package/dist/schema/illumination-spectral.js +23 -19
  463. package/dist/schema/illumination-spectral.js.map +1 -1
  464. package/dist/schema/illumination-temporal.d.ts +12 -15
  465. package/dist/schema/illumination-temporal.js +43 -28
  466. package/dist/schema/illumination-temporal.js.map +1 -1
  467. package/dist/schema/illumination.d.ts +5 -4
  468. package/dist/schema/illumination.js +55 -20
  469. package/dist/schema/illumination.js.map +1 -1
  470. package/dist/schema/scene-radiance-temporal.d.ts +9 -11
  471. package/dist/schema/scene-radiance-temporal.js +26 -23
  472. package/dist/schema/scene-radiance-temporal.js.map +1 -1
  473. package/dist/schema/scene-radiance.d.ts +17 -17
  474. package/dist/schema/scene-radiance.js +56 -34
  475. package/dist/schema/scene-radiance.js.map +1 -1
  476. package/dist/schema/scene.d.ts +14 -13
  477. package/dist/schema/validation.d.ts +0 -1
  478. package/dist/schema/validation.js +17 -15
  479. package/dist/schema/validation.js.map +1 -1
  480. package/dist/sensor/accumulated-charge.d.ts +45 -64
  481. package/dist/sensor/accumulated-charge.js +41 -47
  482. package/dist/sensor/accumulated-charge.js.map +1 -1
  483. package/dist/sensor/architecture.d.ts +22 -25
  484. package/dist/sensor/architecture.js +17 -16
  485. package/dist/sensor/architecture.js.map +1 -1
  486. package/dist/sensor/camera-saturation-capacity.d.ts +21 -28
  487. package/dist/sensor/camera-saturation-capacity.js +36 -34
  488. package/dist/sensor/camera-saturation-capacity.js.map +1 -1
  489. package/dist/sensor/capture-color-sampling-binding.d.ts +46 -51
  490. package/dist/sensor/capture-color-sampling-binding.js +39 -41
  491. package/dist/sensor/capture-color-sampling-binding.js.map +1 -1
  492. package/dist/sensor/capture-mode-timing.d.ts +8 -9
  493. package/dist/sensor/capture-mode-timing.js +24 -21
  494. package/dist/sensor/capture-mode-timing.js.map +1 -1
  495. package/dist/sensor/capture-mode.d.ts +28 -30
  496. package/dist/sensor/capture-mode.js +33 -31
  497. package/dist/sensor/capture-mode.js.map +1 -1
  498. package/dist/sensor/color-sampling.d.ts +30 -33
  499. package/dist/sensor/color-sampling.js +32 -37
  500. package/dist/sensor/color-sampling.js.map +1 -1
  501. package/dist/sensor/constant-rate-temporal-integration.d.ts +19 -23
  502. package/dist/sensor/constant-rate-temporal-integration.js +28 -26
  503. package/dist/sensor/constant-rate-temporal-integration.js.map +1 -1
  504. package/dist/sensor/dark-current.d.ts +53 -49
  505. package/dist/sensor/dark-current.js +87 -46
  506. package/dist/sensor/dark-current.js.map +1 -1
  507. package/dist/sensor/environment-photo-signal.d.ts +71 -30
  508. package/dist/sensor/environment-photo-signal.js +127 -46
  509. package/dist/sensor/environment-photo-signal.js.map +1 -1
  510. package/dist/sensor/eqe-electron-rate.d.ts +14 -13
  511. package/dist/sensor/eqe-electron-rate.js +34 -14
  512. package/dist/sensor/eqe-electron-rate.js.map +1 -1
  513. package/dist/sensor/eqe-local-exposure.d.ts +24 -24
  514. package/dist/sensor/eqe-local-exposure.js +15 -11
  515. package/dist/sensor/eqe-local-exposure.js.map +1 -1
  516. package/dist/sensor/eqe-temporal-exposure.d.ts +11 -11
  517. package/dist/sensor/eqe-temporal-exposure.js +15 -10
  518. package/dist/sensor/eqe-temporal-exposure.js.map +1 -1
  519. package/dist/sensor/exposure-window.d.ts +48 -34
  520. package/dist/sensor/exposure-window.js +77 -36
  521. package/dist/sensor/exposure-window.js.map +1 -1
  522. package/dist/sensor/fixed-pattern-noise.d.ts +108 -0
  523. package/dist/sensor/fixed-pattern-noise.js +166 -0
  524. package/dist/sensor/fixed-pattern-noise.js.map +1 -0
  525. package/dist/sensor/iso-gain.d.ts +44 -0
  526. package/dist/sensor/iso-gain.js +119 -0
  527. package/dist/sensor/iso-gain.js.map +1 -0
  528. package/dist/sensor/iso-signal-chain.d.ts +25 -48
  529. package/dist/sensor/iso-signal-chain.js +52 -66
  530. package/dist/sensor/iso-signal-chain.js.map +1 -1
  531. package/dist/sensor/local-exposure-binding.d.ts +21 -21
  532. package/dist/sensor/local-exposure-binding.js +22 -18
  533. package/dist/sensor/local-exposure-binding.js.map +1 -1
  534. package/dist/sensor/optical-stack.d.ts +36 -40
  535. package/dist/sensor/optical-stack.js +34 -37
  536. package/dist/sensor/optical-stack.js.map +1 -1
  537. package/dist/sensor/photon-energy.d.ts +22 -28
  538. package/dist/sensor/photon-energy.js +42 -34
  539. package/dist/sensor/photon-energy.js.map +1 -1
  540. package/dist/sensor/physical-charge-capacity.d.ts +20 -30
  541. package/dist/sensor/physical-charge-capacity.js +35 -36
  542. package/dist/sensor/physical-charge-capacity.js.map +1 -1
  543. package/dist/sensor/pixel-pitch.d.ts +2 -3
  544. package/dist/sensor/pixel-pitch.js +4 -2
  545. package/dist/sensor/pixel-pitch.js.map +1 -1
  546. package/dist/sensor/radiometry-readiness.d.ts +13 -15
  547. package/dist/sensor/radiometry-readiness.js +20 -17
  548. package/dist/sensor/radiometry-readiness.js.map +1 -1
  549. package/dist/sensor/raw-readout.d.ts +173 -83
  550. package/dist/sensor/raw-readout.js +425 -160
  551. package/dist/sensor/raw-readout.js.map +1 -1
  552. package/dist/sensor/raw-reconstruction.d.ts +112 -44
  553. package/dist/sensor/raw-reconstruction.js +200 -47
  554. package/dist/sensor/raw-reconstruction.js.map +1 -1
  555. package/dist/sensor/readout-exposure-linkage.d.ts +103 -34
  556. package/dist/sensor/readout-exposure-linkage.js +125 -27
  557. package/dist/sensor/readout-exposure-linkage.js.map +1 -1
  558. package/dist/sensor/readout-timing.d.ts +43 -44
  559. package/dist/sensor/readout-timing.js +38 -30
  560. package/dist/sensor/readout-timing.js.map +1 -1
  561. package/dist/sensor/response-application-compatibility.d.ts +21 -28
  562. package/dist/sensor/response-application-compatibility.js +35 -34
  563. package/dist/sensor/response-application-compatibility.js.map +1 -1
  564. package/dist/sensor/response-operating-range.d.ts +26 -35
  565. package/dist/sensor/response-operating-range.js +40 -39
  566. package/dist/sensor/response-operating-range.js.map +1 -1
  567. package/dist/sensor/responsivity-photocurrent.d.ts +21 -29
  568. package/dist/sensor/responsivity-photocurrent.js +57 -40
  569. package/dist/sensor/responsivity-photocurrent.js.map +1 -1
  570. package/dist/sensor/sampling-aperture.d.ts +21 -25
  571. package/dist/sensor/sampling-aperture.js +29 -28
  572. package/dist/sensor/sampling-aperture.js.map +1 -1
  573. package/dist/sensor/scene-eqe-temporal-exposure.d.ts +14 -12
  574. package/dist/sensor/scene-eqe-temporal-exposure.js +13 -8
  575. package/dist/sensor/scene-eqe-temporal-exposure.js.map +1 -1
  576. package/dist/sensor/sensor-geometry.d.ts +28 -32
  577. package/dist/sensor/sensor-geometry.js +35 -20
  578. package/dist/sensor/sensor-geometry.js.map +1 -1
  579. package/dist/sensor/signal-noise.d.ts +14 -16
  580. package/dist/sensor/signal-noise.js +15 -13
  581. package/dist/sensor/signal-noise.js.map +1 -1
  582. package/dist/sensor/spatial-sample-reduction.d.ts +45 -60
  583. package/dist/sensor/spatial-sample-reduction.js +39 -48
  584. package/dist/sensor/spatial-sample-reduction.js.map +1 -1
  585. package/dist/sensor/spatial-sampling-quadrature.d.ts +46 -54
  586. package/dist/sensor/spatial-sampling-quadrature.js +31 -36
  587. package/dist/sensor/spatial-sampling-quadrature.js.map +1 -1
  588. package/dist/sensor/spatio-spectral-reduction.d.ts +32 -42
  589. package/dist/sensor/spatio-spectral-reduction.js +24 -29
  590. package/dist/sensor/spatio-spectral-reduction.js.map +1 -1
  591. package/dist/sensor/spectral-coverage.d.ts +6 -9
  592. package/dist/sensor/spectral-coverage.js +9 -6
  593. package/dist/sensor/spectral-coverage.js.map +1 -1
  594. package/dist/sensor/spectral-quadrature.d.ts +46 -60
  595. package/dist/sensor/spectral-quadrature.js +38 -48
  596. package/dist/sensor/spectral-quadrature.js.map +1 -1
  597. package/dist/sensor/spectral-response.d.ts +53 -41
  598. package/dist/sensor/spectral-response.js +80 -47
  599. package/dist/sensor/spectral-response.js.map +1 -1
  600. package/dist/sensor/stochastic-seed.d.ts +50 -0
  601. package/dist/sensor/stochastic-seed.js +123 -0
  602. package/dist/sensor/stochastic-seed.js.map +1 -0
  603. package/dist/sensor/temporal-eqe-sum.d.ts +2 -4
  604. package/dist/sensor/temporal-eqe-sum.js +5 -6
  605. package/dist/sensor/temporal-eqe-sum.js.map +1 -1
  606. package/dist/sensor/temporal-photo-signal.d.ts +5 -6
  607. package/dist/sensor/temporal-photo-signal.js +11 -10
  608. package/dist/sensor/temporal-photo-signal.js.map +1 -1
  609. package/dist/sensor/temporal-sample-binding.d.ts +1 -2
  610. package/dist/sensor/temporal-sample-binding.js +3 -3
  611. package/dist/sensor/temporal-sample-binding.js.map +1 -1
  612. package/dist/simulation/poc-simulation.d.ts +16 -16
  613. package/dist/simulation/poc-simulation.js +20 -15
  614. package/dist/simulation/poc-simulation.js.map +1 -1
  615. package/dist/stabilization/camera-shake.d.ts +42 -18
  616. package/dist/stabilization/camera-shake.js +43 -20
  617. package/dist/stabilization/camera-shake.js.map +1 -1
  618. package/dist/stabilization/system.d.ts +44 -41
  619. package/dist/stabilization/system.js +196 -108
  620. package/dist/stabilization/system.js.map +1 -1
  621. package/docs/AGENT_GUIDE.md +183 -0
  622. package/docs/API_REFERENCE.md +761 -2
  623. package/docs/QUICK_START.md +495 -0
  624. package/docs/USAGE.md +1719 -714
  625. package/docs/api/camera-equivalent-focal-length.md +6 -7
  626. package/docs/api/camera-field-of-view.md +16 -8
  627. package/docs/api/camera-lens-projection.md +246 -0
  628. package/docs/api/camera-projected-object-size.md +6 -5
  629. package/docs/api/capture-capture-export-metadata.md +10 -10
  630. package/docs/api/capture-dng-import.md +134 -0
  631. package/docs/api/capture-environment-raw-producer.md +17 -11
  632. package/docs/api/capture-export-jpeg.md +16 -0
  633. package/docs/api/capture-focus-control.md +25 -47
  634. package/docs/api/capture-linear-encoding.md +21 -12
  635. package/docs/api/capture-lossless-jpeg.md +49 -0
  636. package/docs/api/capture-native-environment-optical-stage.md +75 -0
  637. package/docs/api/capture-native-environment-raw.md +161 -4
  638. package/docs/api/capture-native-raw-development.md +69 -4
  639. package/docs/api/capture-native-raw-dng.md +84 -0
  640. package/docs/api/capture-native-raw.md +23 -8
  641. package/docs/api/capture-packed-sensor-raw.md +156 -0
  642. package/docs/api/capture-photographic-export.md +69 -31
  643. package/docs/api/capture-raw-frame-reconstruction.md +8 -8
  644. package/docs/api/capture-raw-white-level.md +37 -0
  645. package/docs/api/capture-release-sequence.md +6 -7
  646. package/docs/api/capture-sensor-raw-frame.md +6 -6
  647. package/docs/api/capture-sensor-raw-producer.md +17 -11
  648. package/docs/api/capture-simulated-capture.md +15 -15
  649. package/docs/api/color-camera-color-matrix.md +103 -0
  650. package/docs/api/color-capture-color.md +22 -11
  651. package/docs/api/color-chromatic-adaptation.md +82 -0
  652. package/docs/api/color-color-difference.md +134 -0
  653. package/docs/api/color-color-matching-functions.md +259 -0
  654. package/docs/api/color-colorimetry-math.md +54 -0
  655. package/docs/api/color-gamut-mapping.md +72 -0
  656. package/docs/api/color-illuminants.md +280 -0
  657. package/docs/api/color-rgb-color-spaces.md +151 -0
  658. package/docs/api/color-sensor-color-development.md +27 -0
  659. package/docs/api/color-srgb-icc.md +2 -4
  660. package/docs/api/color-white-balance.md +95 -19
  661. package/docs/api/composition-image-formation-plan.md +124 -95
  662. package/docs/api/composition-plan-consumer.md +7 -7
  663. package/docs/api/core-calculation-result.md +18 -14
  664. package/docs/api/core-configuration-error.md +1 -1
  665. package/docs/api/core-image-formation.md +7 -7
  666. package/docs/api/core-scientific-assurance.md +12 -10
  667. package/docs/api/core-spectral-composition.md +14 -14
  668. package/docs/api/core-spectral.md +6 -6
  669. package/docs/api/core-validation.md +3 -3
  670. package/docs/api/core-version.md +7 -6
  671. package/docs/api/equipment-exposure-capabilities.md +11 -10
  672. package/docs/api/equipment-generic-tier-assets.md +7 -2
  673. package/docs/api/equipment-generic-tier-presets.md +6 -6
  674. package/docs/api/equipment-iso-capabilities.md +18 -18
  675. package/docs/api/equipment-metering-capabilities.md +6 -6
  676. package/docs/api/equipment-release-capabilities.md +4 -4
  677. package/docs/api/exports.json +2213 -8
  678. package/docs/api/exposure-exposure-duration-control.md +9 -9
  679. package/docs/api/exposure-exposure-mode-resolver.md +35 -31
  680. package/docs/api/exposure-exposure.md +10 -10
  681. package/docs/api/exposure-flash-ttl.md +182 -0
  682. package/docs/api/exposure-flash.md +183 -28
  683. package/docs/api/exposure-metering-scene-radiance.md +11 -10
  684. package/docs/api/exposure-metering-target.md +9 -8
  685. package/docs/api/exposure-metering-temporal.md +8 -8
  686. package/docs/api/exposure-metering.md +69 -9
  687. package/docs/api/exposure-program-line.md +6 -5
  688. package/docs/api/facade-chart-radiance-batch.md +96 -0
  689. package/docs/api/facade-chart-scenes.md +240 -0
  690. package/docs/api/facade-scene-radiance.md +122 -0
  691. package/docs/api/facade-simulate-capture.md +324 -0
  692. package/docs/api/gpu-image-kernel-accelerator.md +157 -0
  693. package/docs/api/gpu-image-kernel-execution.md +152 -0
  694. package/docs/api/motion-camera-rotation.md +43 -26
  695. package/docs/api/motion-capture-rotation-inverse-mapping.md +24 -23
  696. package/docs/api/motion-capture-rotation-temporal-quadrature.md +22 -22
  697. package/docs/api/motion-capture-rotation-trajectory.md +15 -15
  698. package/docs/api/motion-capture-translation-parallax-temporal-quadrature.md +15 -14
  699. package/docs/api/motion-extended-object-projection.md +10 -8
  700. package/docs/api/motion-projected-motion.md +8 -8
  701. package/docs/api/motion-temporal-exposure-sum.md +98 -0
  702. package/docs/api/motion-video-sequence.md +159 -0
  703. package/docs/api/optics-aperture.md +8 -8
  704. package/docs/api/optics-atmospheric-haze.md +104 -0
  705. package/docs/api/optics-brown-conrady-distortion.md +123 -0
  706. package/docs/api/optics-circle-of-confusion.md +5 -4
  707. package/docs/api/optics-complex-pupil-psf.md +57 -16
  708. package/docs/api/optics-depth-of-field.md +12 -6
  709. package/docs/api/optics-diffraction.md +8 -7
  710. package/docs/api/optics-focus-breathing.md +104 -16
  711. package/docs/api/optics-focus-state.md +9 -10
  712. package/docs/api/optics-front-of-lens-filter.md +72 -14
  713. package/docs/api/optics-illumination-vignetting.md +10 -10
  714. package/docs/api/optics-irradiance-convolution.md +95 -0
  715. package/docs/api/optics-lateral-chromatic-aberration.md +22 -21
  716. package/docs/api/optics-lens-psf-kernels.md +72 -0
  717. package/docs/api/optics-lens-psf-profile.md +48 -26
  718. package/docs/api/optics-longitudinal-chromatic-aberration.md +128 -0
  719. package/docs/api/optics-polygon-diffraction.md +78 -13
  720. package/docs/api/optics-profile-contract.md +4 -4
  721. package/docs/api/optics-psf-foundation.md +12 -12
  722. package/docs/api/optics-pupil-vignetting.md +132 -0
  723. package/docs/api/optics-radial-distortion.md +12 -12
  724. package/docs/api/optics-scene-to-sensor-irradiance.md +25 -14
  725. package/docs/api/optics-scene-to-sensor-quadrature.md +15 -12
  726. package/docs/api/optics-sensor-aperture-rays.md +3 -2
  727. package/docs/api/optics-sensor-environment-query.md +52 -9
  728. package/docs/api/optics-sensor-psf-quadrature.md +13 -10
  729. package/docs/api/optics-stray-light.md +12 -11
  730. package/docs/api/optics-thin-lens.md +4 -3
  731. package/docs/api/optics-zernike-wavefront.md +229 -0
  732. package/docs/api/output-capture-corrected-sdr.md +10 -7
  733. package/docs/api/output-capture-geometry.md +35 -36
  734. package/docs/api/output-capture-sdr.md +4 -4
  735. package/docs/api/output-crop.md +7 -4
  736. package/docs/api/output-geometric-transforms.md +65 -19
  737. package/docs/api/output-lens-corrections.md +17 -15
  738. package/docs/api/output-native-capture-sdr.md +26 -13
  739. package/docs/api/output-png-encoder.md +105 -0
  740. package/docs/api/output-print-contrast-reference.md +8 -8
  741. package/docs/api/output-print-detail.md +14 -14
  742. package/docs/api/output-print-jpeg.md +22 -5
  743. package/docs/api/output-print-plan.md +18 -18
  744. package/docs/api/output-print-region-statistics.md +14 -14
  745. package/docs/api/output-sdr-rendering.md +52 -10
  746. package/docs/api/output-subject-framing-crop.md +5 -6
  747. package/docs/api/processing-demosaic.md +120 -0
  748. package/docs/api/processing-denoise.md +148 -0
  749. package/docs/api/processing-focus-stacking.md +41 -0
  750. package/docs/api/processing-hdr.md +113 -0
  751. package/docs/api/processing-panorama.md +82 -0
  752. package/docs/api/processing-processing-task.md +107 -0
  753. package/docs/api/processing-tone-mapping.md +142 -0
  754. package/docs/api/schema-camera.md +6 -4
  755. package/docs/api/schema-illumination-spectral.md +10 -11
  756. package/docs/api/schema-illumination-temporal.md +13 -15
  757. package/docs/api/schema-illumination.md +4 -4
  758. package/docs/api/schema-scene-radiance-temporal.md +10 -11
  759. package/docs/api/schema-scene-radiance.md +18 -17
  760. package/docs/api/schema-scene.md +9 -9
  761. package/docs/api/schema-validation.md +1 -1
  762. package/docs/api/sensor-accumulated-charge.md +12 -20
  763. package/docs/api/sensor-architecture.md +15 -16
  764. package/docs/api/sensor-camera-saturation-capacity.md +9 -11
  765. package/docs/api/sensor-capture-color-sampling-binding.md +47 -51
  766. package/docs/api/sensor-capture-mode-timing.md +9 -9
  767. package/docs/api/sensor-capture-mode.md +29 -30
  768. package/docs/api/sensor-color-sampling.md +31 -33
  769. package/docs/api/sensor-constant-rate-temporal-integration.md +10 -11
  770. package/docs/api/sensor-dark-current.md +30 -14
  771. package/docs/api/sensor-environment-photo-signal.md +13 -6
  772. package/docs/api/sensor-eqe-electron-rate.md +9 -8
  773. package/docs/api/sensor-eqe-local-exposure.md +18 -17
  774. package/docs/api/sensor-eqe-temporal-exposure.md +12 -11
  775. package/docs/api/sensor-exposure-window.md +24 -24
  776. package/docs/api/sensor-fixed-pattern-noise.md +104 -0
  777. package/docs/api/sensor-iso-gain.md +63 -0
  778. package/docs/api/sensor-iso-signal-chain.md +13 -22
  779. package/docs/api/sensor-local-exposure-binding.md +12 -13
  780. package/docs/api/sensor-optical-stack.md +37 -40
  781. package/docs/api/sensor-photon-energy.md +10 -11
  782. package/docs/api/sensor-physical-charge-capacity.md +8 -13
  783. package/docs/api/sensor-pixel-pitch.md +1 -1
  784. package/docs/api/sensor-radiometry-readiness.md +9 -9
  785. package/docs/api/sensor-raw-readout.md +118 -52
  786. package/docs/api/sensor-raw-reconstruction.md +97 -20
  787. package/docs/api/sensor-readout-exposure-linkage.md +120 -24
  788. package/docs/api/sensor-readout-timing.md +33 -35
  789. package/docs/api/sensor-response-application-compatibility.md +9 -11
  790. package/docs/api/sensor-response-operating-range.md +14 -18
  791. package/docs/api/sensor-responsivity-photocurrent.md +9 -12
  792. package/docs/api/sensor-sampling-aperture.md +22 -25
  793. package/docs/api/sensor-scene-eqe-temporal-exposure.md +9 -8
  794. package/docs/api/sensor-sensor-geometry.md +23 -24
  795. package/docs/api/sensor-signal-noise.md +10 -10
  796. package/docs/api/sensor-spatial-sample-reduction.md +27 -30
  797. package/docs/api/sensor-spatial-sampling-quadrature.md +37 -39
  798. package/docs/api/sensor-spatio-spectral-reduction.md +27 -29
  799. package/docs/api/sensor-spectral-coverage.md +5 -5
  800. package/docs/api/sensor-spectral-quadrature.md +33 -35
  801. package/docs/api/sensor-spectral-response.md +28 -16
  802. package/docs/api/sensor-temporal-photo-signal.md +6 -6
  803. package/docs/api/simulation-poc-simulation.md +17 -16
  804. package/docs/api/stabilization-camera-shake.md +29 -10
  805. package/docs/api/stabilization-system.md +25 -21
  806. package/docs/examples/production-request.json +3821 -2157
  807. package/docs/examples/simulate-capture.mjs +14 -0
  808. package/llms.txt +35 -0
  809. package/package.json +32 -12
  810. package/AGENTS.md +0 -674
  811. package/CONTRIBUTING.md +0 -76
  812. package/DCO +0 -33
  813. package/dist/camera/equivalent-focal-length.d.ts.map +0 -1
  814. package/dist/camera/field-of-view.d.ts.map +0 -1
  815. package/dist/camera/projected-object-size.d.ts.map +0 -1
  816. package/dist/capture/capture-export-metadata.d.ts.map +0 -1
  817. package/dist/capture/environment-raw-producer.d.ts.map +0 -1
  818. package/dist/capture/export-jpeg.d.ts.map +0 -1
  819. package/dist/capture/export-tiff.d.ts.map +0 -1
  820. package/dist/capture/focus-control.d.ts.map +0 -1
  821. package/dist/capture/linear-encoding.d.ts.map +0 -1
  822. package/dist/capture/native-environment-raw.d.ts.map +0 -1
  823. package/dist/capture/native-raw-development.d.ts.map +0 -1
  824. package/dist/capture/native-raw.d.ts.map +0 -1
  825. package/dist/capture/photographic-export.d.ts.map +0 -1
  826. package/dist/capture/raw-frame-limits.d.ts.map +0 -1
  827. package/dist/capture/raw-frame-reconstruction.d.ts.map +0 -1
  828. package/dist/capture/release-sequence.d.ts.map +0 -1
  829. package/dist/capture/sensor-raw-frame.d.ts.map +0 -1
  830. package/dist/capture/sensor-raw-producer.d.ts.map +0 -1
  831. package/dist/capture/simulated-capture.d.ts.map +0 -1
  832. package/dist/color/capture-color.d.ts.map +0 -1
  833. package/dist/color/sensor-color-development.d.ts.map +0 -1
  834. package/dist/color/srgb-icc.d.ts.map +0 -1
  835. package/dist/color/srgb-transfer.d.ts.map +0 -1
  836. package/dist/color/white-balance.d.ts.map +0 -1
  837. package/dist/composition/image-formation-plan.d.ts.map +0 -1
  838. package/dist/composition/plan-consumer.d.ts.map +0 -1
  839. package/dist/core/calculation-result.d.ts.map +0 -1
  840. package/dist/core/canonical-json.d.ts.map +0 -1
  841. package/dist/core/configuration-error.d.ts.map +0 -1
  842. package/dist/core/evidence-provenance.d.ts.map +0 -1
  843. package/dist/core/image-formation.d.ts.map +0 -1
  844. package/dist/core/owned-data.d.ts.map +0 -1
  845. package/dist/core/record-validation.d.ts.map +0 -1
  846. package/dist/core/scientific-assurance.d.ts.map +0 -1
  847. package/dist/core/spectral-composition.d.ts.map +0 -1
  848. package/dist/core/spectral.d.ts.map +0 -1
  849. package/dist/core/validation.d.ts.map +0 -1
  850. package/dist/core/version.d.ts.map +0 -1
  851. package/dist/equipment/exposure-capabilities.d.ts.map +0 -1
  852. package/dist/equipment/generic-tier-assets.d.ts.map +0 -1
  853. package/dist/equipment/generic-tier-presets.d.ts.map +0 -1
  854. package/dist/equipment/iso-capabilities.d.ts.map +0 -1
  855. package/dist/equipment/metering-capabilities.d.ts.map +0 -1
  856. package/dist/equipment/release-capabilities.d.ts.map +0 -1
  857. package/dist/exposure/exposure-duration-control.d.ts.map +0 -1
  858. package/dist/exposure/exposure-mode-resolver.d.ts.map +0 -1
  859. package/dist/exposure/exposure.d.ts.map +0 -1
  860. package/dist/exposure/flash.d.ts.map +0 -1
  861. package/dist/exposure/metering-scene-radiance.d.ts.map +0 -1
  862. package/dist/exposure/metering-target.d.ts.map +0 -1
  863. package/dist/exposure/metering-temporal.d.ts.map +0 -1
  864. package/dist/exposure/metering.d.ts.map +0 -1
  865. package/dist/exposure/program-line.d.ts.map +0 -1
  866. package/dist/index.d.ts.map +0 -1
  867. package/dist/motion/camera-rotation.d.ts.map +0 -1
  868. package/dist/motion/capture-rotation-inverse-mapping.d.ts.map +0 -1
  869. package/dist/motion/capture-rotation-temporal-quadrature.d.ts.map +0 -1
  870. package/dist/motion/capture-rotation-trajectory.d.ts.map +0 -1
  871. package/dist/motion/capture-translation-parallax-temporal-quadrature.d.ts.map +0 -1
  872. package/dist/motion/extended-object-projection.d.ts.map +0 -1
  873. package/dist/motion/projected-motion.d.ts.map +0 -1
  874. package/dist/optics/aperture.d.ts.map +0 -1
  875. package/dist/optics/circle-of-confusion.d.ts.map +0 -1
  876. package/dist/optics/complex-pupil-psf.d.ts.map +0 -1
  877. package/dist/optics/depth-of-field.d.ts.map +0 -1
  878. package/dist/optics/diffraction.d.ts.map +0 -1
  879. package/dist/optics/focus-breathing.d.ts.map +0 -1
  880. package/dist/optics/focus-state.d.ts.map +0 -1
  881. package/dist/optics/front-of-lens-filter.d.ts.map +0 -1
  882. package/dist/optics/illumination-vignetting.d.ts.map +0 -1
  883. package/dist/optics/lateral-chromatic-aberration.d.ts.map +0 -1
  884. package/dist/optics/lens-psf-profile.d.ts.map +0 -1
  885. package/dist/optics/polygon-diffraction.d.ts.map +0 -1
  886. package/dist/optics/profile-contract.d.ts.map +0 -1
  887. package/dist/optics/psf-foundation.d.ts.map +0 -1
  888. package/dist/optics/radial-distortion.d.ts.map +0 -1
  889. package/dist/optics/scene-to-sensor-irradiance.d.ts.map +0 -1
  890. package/dist/optics/scene-to-sensor-quadrature.d.ts.map +0 -1
  891. package/dist/optics/sensor-aperture-rays.d.ts.map +0 -1
  892. package/dist/optics/sensor-environment-query.d.ts.map +0 -1
  893. package/dist/optics/sensor-psf-quadrature.d.ts.map +0 -1
  894. package/dist/optics/sensor-psf-support.d.ts.map +0 -1
  895. package/dist/optics/stray-light.d.ts.map +0 -1
  896. package/dist/optics/thin-lens.d.ts.map +0 -1
  897. package/dist/output/capture-corrected-sdr.d.ts.map +0 -1
  898. package/dist/output/capture-geometry.d.ts.map +0 -1
  899. package/dist/output/capture-sdr.d.ts.map +0 -1
  900. package/dist/output/crop.d.ts.map +0 -1
  901. package/dist/output/geometric-transforms.d.ts.map +0 -1
  902. package/dist/output/lens-corrections.d.ts.map +0 -1
  903. package/dist/output/native-capture-sdr.d.ts.map +0 -1
  904. package/dist/output/print-contrast-reference.d.ts.map +0 -1
  905. package/dist/output/print-detail.d.ts.map +0 -1
  906. package/dist/output/print-jpeg.d.ts.map +0 -1
  907. package/dist/output/print-plan.d.ts.map +0 -1
  908. package/dist/output/print-region-statistics.d.ts.map +0 -1
  909. package/dist/output/sdr-rendering.d.ts.map +0 -1
  910. package/dist/output/subject-framing-crop.d.ts.map +0 -1
  911. package/dist/schema/camera.d.ts.map +0 -1
  912. package/dist/schema/camera.js +0 -3
  913. package/dist/schema/camera.js.map +0 -1
  914. package/dist/schema/illumination-spectral.d.ts.map +0 -1
  915. package/dist/schema/illumination-temporal.d.ts.map +0 -1
  916. package/dist/schema/illumination.d.ts.map +0 -1
  917. package/dist/schema/scene-radiance-temporal.d.ts.map +0 -1
  918. package/dist/schema/scene-radiance.d.ts.map +0 -1
  919. package/dist/schema/scene.d.ts.map +0 -1
  920. package/dist/schema/scene.js +0 -3
  921. package/dist/schema/scene.js.map +0 -1
  922. package/dist/schema/validation.d.ts.map +0 -1
  923. package/dist/sensor/accumulated-charge.d.ts.map +0 -1
  924. package/dist/sensor/architecture.d.ts.map +0 -1
  925. package/dist/sensor/camera-saturation-capacity.d.ts.map +0 -1
  926. package/dist/sensor/capture-color-sampling-binding.d.ts.map +0 -1
  927. package/dist/sensor/capture-mode-timing.d.ts.map +0 -1
  928. package/dist/sensor/capture-mode.d.ts.map +0 -1
  929. package/dist/sensor/color-sampling.d.ts.map +0 -1
  930. package/dist/sensor/constant-rate-temporal-integration.d.ts.map +0 -1
  931. package/dist/sensor/dark-current.d.ts.map +0 -1
  932. package/dist/sensor/environment-photo-signal.d.ts.map +0 -1
  933. package/dist/sensor/eqe-electron-rate.d.ts.map +0 -1
  934. package/dist/sensor/eqe-local-exposure.d.ts.map +0 -1
  935. package/dist/sensor/eqe-temporal-exposure.d.ts.map +0 -1
  936. package/dist/sensor/exposure-window.d.ts.map +0 -1
  937. package/dist/sensor/iso-signal-chain.d.ts.map +0 -1
  938. package/dist/sensor/local-exposure-binding.d.ts.map +0 -1
  939. package/dist/sensor/optical-stack.d.ts.map +0 -1
  940. package/dist/sensor/photon-energy.d.ts.map +0 -1
  941. package/dist/sensor/physical-charge-capacity.d.ts.map +0 -1
  942. package/dist/sensor/pixel-pitch.d.ts.map +0 -1
  943. package/dist/sensor/radiometry-readiness.d.ts.map +0 -1
  944. package/dist/sensor/raw-readout.d.ts.map +0 -1
  945. package/dist/sensor/raw-reconstruction.d.ts.map +0 -1
  946. package/dist/sensor/readout-exposure-linkage.d.ts.map +0 -1
  947. package/dist/sensor/readout-timing.d.ts.map +0 -1
  948. package/dist/sensor/response-application-compatibility.d.ts.map +0 -1
  949. package/dist/sensor/response-operating-range.d.ts.map +0 -1
  950. package/dist/sensor/responsivity-photocurrent.d.ts.map +0 -1
  951. package/dist/sensor/sampling-aperture.d.ts.map +0 -1
  952. package/dist/sensor/scene-eqe-temporal-exposure.d.ts.map +0 -1
  953. package/dist/sensor/sensor-geometry.d.ts.map +0 -1
  954. package/dist/sensor/signal-noise.d.ts.map +0 -1
  955. package/dist/sensor/spatial-sample-reduction.d.ts.map +0 -1
  956. package/dist/sensor/spatial-sampling-quadrature.d.ts.map +0 -1
  957. package/dist/sensor/spatio-spectral-reduction.d.ts.map +0 -1
  958. package/dist/sensor/spectral-coverage.d.ts.map +0 -1
  959. package/dist/sensor/spectral-quadrature.d.ts.map +0 -1
  960. package/dist/sensor/spectral-response.d.ts.map +0 -1
  961. package/dist/sensor/temporal-eqe-sum.d.ts.map +0 -1
  962. package/dist/sensor/temporal-photo-signal.d.ts.map +0 -1
  963. package/dist/sensor/temporal-sample-binding.d.ts.map +0 -1
  964. package/dist/simulation/poc-simulation.d.ts.map +0 -1
  965. package/dist/stabilization/camera-shake.d.ts.map +0 -1
  966. package/dist/stabilization/system.d.ts.map +0 -1
  967. package/docs/API_STYLE.md +0 -235
  968. package/docs/ARCHITECTURE.md +0 -356
  969. package/docs/AUTOMATION_COORDINATION.md +0 -190
  970. package/docs/CAPTURE_COLOR.md +0 -25
  971. package/docs/CAPTURE_CORRECTED_SDR.md +0 -25
  972. package/docs/CAPTURE_EXPORT_METADATA.md +0 -27
  973. package/docs/CAPTURE_SDR.md +0 -22
  974. package/docs/DEVELOPERS.md +0 -68
  975. package/docs/DIGITAL_OPTICS_FOUNDATION.md +0 -69
  976. package/docs/ENVIRONMENT_RAW_CAPTURE.md +0 -208
  977. package/docs/EXPORT_ACCEPTANCE.md +0 -133
  978. package/docs/GENERIC_TIER_PRESETS.md +0 -269
  979. package/docs/GEOMETRIC_PREPARATION_REUSE.md +0 -141
  980. package/docs/IMAGE_FORMATION.md +0 -247
  981. package/docs/LINEAR_CAPTURE_ENCODING.md +0 -25
  982. package/docs/MOTION_AND_SIGNAL.md +0 -250
  983. package/docs/NATIVE_CAPTURE_SDR.md +0 -70
  984. package/docs/NATIVE_CAPTURE_SDR_REVIEW.md +0 -37
  985. package/docs/NATIVE_CAPTURE_SDR_VALIDATION.md +0 -34
  986. package/docs/NATIVE_RAW_AND_PRINT.md +0 -47
  987. package/docs/NUMERICAL_CORRECTNESS.md +0 -191
  988. package/docs/PERFORMANCE_BASELINE.md +0 -56
  989. package/docs/PHOTOGRAPHIC_EXPORT.md +0 -206
  990. package/docs/PHYSICS_FOUNDATION.md +0 -426
  991. package/docs/POC_API.md +0 -278
  992. package/docs/POC_PROJECTION_PLATFORM_REFERENCE.md +0 -12
  993. package/docs/POC_PROJECTION_REUSE.md +0 -124
  994. package/docs/PRINT_195_196_REVIEW.md +0 -93
  995. package/docs/PRINT_196_ENGINE_ACCEPTANCE.md +0 -45
  996. package/docs/PRINT_CONTRAST_REFERENCE.md +0 -43
  997. package/docs/PRINT_DETAIL_ASSESSMENT.md +0 -81
  998. package/docs/PRINT_DETAIL_JPEG_EVIDENCE.md +0 -36
  999. package/docs/PRINT_DETAIL_SDR_EVIDENCE.md +0 -29
  1000. package/docs/PRINT_DETAIL_VALIDATION.md +0 -36
  1001. package/docs/PRINT_PLANNING.md +0 -75
  1002. package/docs/PRINT_REGION_STATISTICS.md +0 -38
  1003. package/docs/PROCESSED_OUTPUT.md +0 -157
  1004. package/docs/PRODUCTION_COMPOSITION.md +0 -373
  1005. package/docs/PRODUCTION_ENVIRONMENT_CAPTURE.md +0 -131
  1006. package/docs/PROVENANCE.md +0 -115
  1007. package/docs/PSF_FOUNDATION.md +0 -165
  1008. package/docs/RAW_FRAME_ENVELOPE.md +0 -56
  1009. package/docs/RAW_FRAME_RECONSTRUCTION.md +0 -30
  1010. package/docs/RELEASE_1_0.md +0 -66
  1011. package/docs/RELEASE_1_0_1.md +0 -61
  1012. package/docs/RELEASE_1_1_0.md +0 -25
  1013. package/docs/RELEASE_1_2_0.md +0 -51
  1014. package/docs/RELEASE_1_3_0.md +0 -15
  1015. package/docs/RELEASE_1_4_0.md +0 -23
  1016. package/docs/RELEASE_AUDIT.md +0 -39
  1017. package/docs/SCENE_RADIANCE_AND_ILLUMINATION.md +0 -298
  1018. package/docs/SCENE_SENSOR_QUADRATURE.md +0 -98
  1019. package/docs/SCENE_SENSOR_TEMPORAL_EXPOSURE.md +0 -86
  1020. package/docs/SCIENTIFIC_ASSURANCE.md +0 -280
  1021. package/docs/SCIENTIFIC_CONFORMANCE.md +0 -83
  1022. package/docs/SDR_RENDERING.md +0 -33
  1023. package/docs/SENSOR_APERTURE_RAYS.md +0 -23
  1024. package/docs/SENSOR_ENVIRONMENT_QUERY.md +0 -86
  1025. package/docs/SENSOR_EQE_LOCAL_EXPOSURE.md +0 -104
  1026. package/docs/SENSOR_EQE_TEMPORAL_EXPOSURE.md +0 -74
  1027. package/docs/SENSOR_PSF_QUADRATURE.md +0 -90
  1028. package/docs/SENSOR_RAW_FRAME.md +0 -20
  1029. package/docs/SENSOR_RAW_PRODUCER.md +0 -77
  1030. package/docs/SIGNAL_CONFORMANCE.md +0 -23
  1031. package/docs/SIMULATED_CAPTURE.md +0 -65
  1032. package/docs/STABILIZATION.md +0 -234
  1033. package/docs/TEMPORAL_PHOTO_RAW.md +0 -83
  1034. package/docs/TIER_ACCEPTANCE.md +0 -129
  1035. package/docs/TIER_PRESET_ACCEPTANCE.md +0 -59
  1036. package/docs/V1_COMPOSITION_MAP.md +0 -123
  1037. package/docs/V1_HELPER_REUSE_REVIEW.md +0 -60
  1038. package/docs/V1_PERFORMANCE_DISPOSITION.md +0 -88
  1039. package/docs/benchmarks/2026-10-01-main-baseline.json +0 -694
  1040. package/docs/benchmarks/2026-10-02-geometric-preparation-reuse.json +0 -2190
  1041. package/docs/benchmarks/2026-10-02-poc-projection-reuse.json +0 -2423
  1042. package/docs/benchmarks/2026-10-02-v1-environment-gc-profile.json +0 -210
  1043. package/docs/benchmarks/2026-10-02-v1-environment-ordinary.json +0 -187
  1044. package/docs/benchmarks/2026-10-02-v1-geometry-gc-profile.json +0 -756
  1045. package/docs/benchmarks/2026-10-02-v1-geometry-ordinary-1.json +0 -711
  1046. package/docs/benchmarks/2026-10-02-v1-geometry-ordinary-2.json +0 -711
  1047. package/docs/benchmarks/2026-10-02-v1-poc-gc-profile.json +0 -885
  1048. package/docs/benchmarks/2026-10-02-v1-poc-ordinary-1.json +0 -868
  1049. package/docs/benchmarks/2026-10-02-v1-poc-ordinary-2.json +0 -868
  1050. package/docs/licenses/castleCSF-MIT.txt +0 -21
  1051. package/docs/validation/documentation-fragments.json +0 -212
  1052. package/docs/validation/native-capture-sdr-darwin-arm64-node26-review.jsonl +0 -4
  1053. package/docs/validation/native-capture-sdr-darwin-arm64.jsonl +0 -3
  1054. package/docs/validation/native-raw-print-2026-10-04/fractional-asymmetric-crop.jpg +0 -0
  1055. package/docs/validation/native-raw-print-2026-10-04/gray-ramp.jpg +0 -0
  1056. package/docs/validation/native-raw-print-2026-10-04/linear-area-checker.jpg +0 -0
  1057. package/docs/validation/native-raw-print-2026-10-04/manifest.json +0 -218
  1058. package/docs/validation/native-raw-print-2026-10-04/megapixel-native.jpg +0 -0
  1059. package/docs/validation/native-raw-print-2026-10-04/native-color.jpg +0 -0
  1060. package/docs/validation/native-raw-print-2026-10-04/photivra-native-full-megapixel-validation.json +0 -9
  1061. package/docs/validation/native-raw-print-2026-10-04/photivra-native-full-megapixel.json +0 -29
  1062. package/docs/validation/native-raw-print-2026-10-04/photivra-native-full-megapixel.json.codes.u16le.gz +0 -0
  1063. package/docs/validation/native-raw-print-2026-10-04/photivra-native-full-megapixel.json.jpg +0 -0
  1064. package/docs/validation/native-raw-print-2026-10-04/photivra-native-full-megapixel.json.rgb.gz +0 -0
  1065. package/docs/validation/native-raw-print-2026-10-04/srgb.icc +0 -0
  1066. package/docs/validation/native-raw-print-2026-10-04/validation.json +0 -41
  1067. package/docs/validation/print-196-candidate-capabilities.json +0 -28
  1068. package/docs/validation/print-196-candidate-evidence.json +0 -356
  1069. package/docs/validation/print-196-engine-acceptance.json +0 -81
  1070. package/docs/validation/print-detail-capabilities.json +0 -103
  1071. package/docs/validation/print-detail-jpeg-evidence.json +0 -116
  1072. package/docs/validation/print-detail-sdr-evidence.json +0 -81
  1073. package/docs/validation/release-audit-inventory.json +0 -1306
  1074. package/docs/validation/tier-acceptance-report-v1.json +0 -2538
@@ -1,37 +1,70 @@
1
1
  /**
2
- * Module boundary and integration notes.
3
- * Parses strict transform data, rejecting unknown semantics and noninvertible profiles.
4
- * Prepares deterministic still/frame geometry; time changes require another preparation.
2
+ * Geometric image transforms (warps) such as distortion correction and projection changes, and
3
+ * a resampler that applies them.
4
+ *
5
+ * A mapping goes from destination (output) points to source (captured) points. Preparing a
6
+ * mapping fixes it for one still or frame; a change in time needs a new preparation.
7
+ *
8
+ * Transform kinds:
9
+ * - `affine` and `radial` (schema 0.1.0, unchanged).
10
+ * - From mapping schema 0.2.0: `brown-conrady` (radial plus tangential lens distortion) and
11
+ * `projection-remap` (a change of ideal projection, for example fisheye capture to a
12
+ * rectilinear or equirectangular view).
13
+ *
14
+ * A mapping that uses only 0.1.0 kinds keeps schema and model version 0.1.0 and gives identical output.
5
15
  * @see docs/DIGITAL_OPTICS_FOUNDATION.md for equations, coordinate/unit conventions, blockers and
6
16
  * support limits.
7
17
  */
8
18
  import { type CalculationResult } from "../core/calculation-result.js";
9
19
  import { type RadialDistortionProfile, type LensFieldPointMm } from "../optics/radial-distortion.js";
10
- /** Domains are barriers: only contiguous equal-domain maps share a resample. */
20
+ import { type BrownConradyDistortionProfile } from "../optics/brown-conrady-distortion.js";
21
+ import { type LensProjectionModel } from "../camera/lens-projection.js";
22
+ /** A domain change separates maps: only adjacent maps in the same domain share one resampling pass. */
11
23
  export type GeometricImageDomain = "raw-channel" | "reconstructed-linear" | "processed-output";
12
- /** Row-major derivative d(source mm)/d(destination mm). */
24
+ /** Jacobian (derivative) d(source mm)/d(destination mm), in row-major order. */
13
25
  export type GeometricJacobian = readonly [number, number, number, number];
14
26
  interface TransformIdentity {
15
27
  id: string;
16
28
  version: string;
17
29
  domain: GeometricImageDomain;
18
- purpose: "distortion" | "breathing" | "digital-stabilization" | "orientation-crop" | "lateral-ca";
30
+ purpose: "distortion" | "breathing" | "digital-stabilization" | "orientation-crop" | "lateral-ca" | "projection";
19
31
  }
20
- /** Explicit destination-to-source affine map, including rotation/shear/offset. */
32
+ /** Explicit destination-to-source affine map, which can include rotation, shear and offset. */
21
33
  export interface AffineGeometricTransform extends TransformIdentity {
22
34
  kind: "affine";
23
35
  matrix: GeometricJacobian;
24
36
  offsetMm: LensFieldPointMm;
25
37
  }
26
- /** Correction samples physical distorted data at the mapped ideal destination. */
38
+ /** Radial distortion. A correction reads the physically distorted data at the position mapped from each ideal (undistorted) destination point. */
27
39
  export interface RadialGeometricTransform extends TransformIdentity {
28
40
  kind: "radial";
29
41
  profile: RadialDistortionProfile;
30
42
  }
31
- export type DigitalGeometricTransform = AffineGeometricTransform | RadialGeometricTransform;
32
- /** Serializable prepared state. Maps are applied in listed destination-to-source order. */
43
+ /** Schema 0.2.0: Brown-Conrady distortion. A correction reads the distorted data at the position mapped from each ideal destination point. */
44
+ export interface BrownConradyGeometricTransform extends TransformIdentity {
45
+ kind: "brown-conrady";
46
+ profile: BrownConradyDistortionProfile;
47
+ }
48
+ /** One ideal projection and its mapping scale (focal length, or mm per radian for equirectangular). */
49
+ export interface GeometricProjectionDeclaration {
50
+ projectionModel: LensProjectionModel;
51
+ focalLengthMm: number;
52
+ }
53
+ /**
54
+ * Schema 0.2.0: change of projection. Each destination point becomes a scene direction (using
55
+ * the destination projection), then a source point (using the source projection). Purpose must
56
+ * be "projection".
57
+ */
58
+ export interface ProjectionRemapGeometricTransform extends TransformIdentity {
59
+ kind: "projection-remap";
60
+ destinationProjection: GeometricProjectionDeclaration;
61
+ sourceProjection: GeometricProjectionDeclaration;
62
+ }
63
+ export type DigitalGeometricTransform = AffineGeometricTransform | RadialGeometricTransform | BrownConradyGeometricTransform | ProjectionRemapGeometricTransform;
64
+ /** Serializable prepared mapping. Maps are applied in the listed order, from destination towards source. */
33
65
  export interface PreparedGeometricMapping {
34
- schemaVersion: "0.1.0";
66
+ /** 0.1.0 when only affine and radial kinds are used; 0.2.0 when a kind added in 2.0 is present. */
67
+ schemaVersion: "0.1.0" | "0.2.0";
35
68
  frameTimeSeconds: number;
36
69
  transforms: readonly DigitalGeometricTransform[];
37
70
  semanticKey: string;
@@ -40,14 +73,14 @@ export interface PreparedGeometricMapping {
40
73
  componentIds: readonly string[];
41
74
  }[];
42
75
  }
43
- /** Regular pixel centers on the optical plane: +X right, +Y up; row order down. */
76
+ /** A regular grid of pixel centres on the optical plane: +X right, +Y up; rows run top to bottom. */
44
77
  export interface GeometricRaster {
45
78
  width: number;
46
79
  height: number;
47
80
  centerMm: LensFieldPointMm;
48
81
  pitchMm: number;
49
82
  }
50
- /** Resampler identity is independent of mapping. Prefiltering is a caller obligation. */
83
+ /** The resampling filter, chosen independently of the mapping. Any prefiltering (anti-aliasing) is the caller's job. */
51
84
  export interface GeometricResampler {
52
85
  id: string;
53
86
  version: string;
@@ -72,9 +105,9 @@ export interface GeometricSamplingPlan {
72
105
  destinationRaster: GeometricRaster;
73
106
  resampler: GeometricResampler;
74
107
  points: readonly GeometricMappingPoint[];
75
- /** Includes exact center-domain support for the selected filter; no edge extension. */
108
+ /** True where the selected filter has full source support around the pixel centre. Edges are not extended. */
76
109
  validSourceMask: readonly boolean[];
77
- /** Largest all-valid axis-aligned pixel rectangle, half-open. Null if empty. */
110
+ /** Largest axis-aligned rectangle of valid pixels (half-open). Null if there is none. */
78
111
  jointCrop: {
79
112
  x: number;
80
113
  y: number;
@@ -87,7 +120,7 @@ export interface GeometricSamplingPlan {
87
120
  horizontal: number;
88
121
  vertical: number;
89
122
  };
90
- /** Envelope of mapped pixel-center rays retained by the joint crop, not edge FOV. */
123
+ /** Angular extent of the mapped pixel-centre rays kept by the joint crop. It is not the edge-to-edge FOV. */
91
124
  retainedSampleRayEnvelopeDegrees: {
92
125
  minX: number;
93
126
  maxX: number;
@@ -95,19 +128,19 @@ export interface GeometricSamplingPlan {
95
128
  maxY: number;
96
129
  } | null;
97
130
  }
98
- /** Parses strict transform data, rejecting unknown semantics and noninvertible profiles. */
131
+ /** Strictly parses transform data. Unknown kinds or fields and profiles that cannot be inverted are rejected. */
99
132
  export declare function parseDigitalGeometricTransform(value: unknown): DigitalGeometricTransform;
100
- /** Prepares deterministic still/frame geometry; time changes require another preparation. */
133
+ /** Prepares a deterministic mapping for one still or frame. A change in time needs a new preparation. */
101
134
  export declare function prepareGeometricMapping(input: {
102
135
  transforms: readonly DigitalGeometricTransform[];
103
136
  frameTimeSeconds: number;
104
137
  }): CalculationResult<PreparedGeometricMapping>;
105
- /** Authoritative display-to-capture map and full local directional derivatives. */
138
+ /** Maps a display point to the capture, with the full local derivatives in each direction. */
106
139
  export declare function calculateComposedGeometricMapping(input: {
107
140
  mapping: PreparedGeometricMapping;
108
141
  destinationPointMm: LensFieldPointMm;
109
142
  }): CalculationResult<GeometricMappingPoint>;
110
- /** Capture-to-display bridge for focus, metering and overlays; reverses the same maps. */
143
+ /** Maps a capture point to the display, for focus, metering and overlays. It inverts the same maps. */
111
144
  export declare function calculateForwardGeometricMapping(input: {
112
145
  mapping: PreparedGeometricMapping;
113
146
  sourcePointMm: LensFieldPointMm;
@@ -116,15 +149,20 @@ export declare function calculateForwardGeometricMapping(input: {
116
149
  export declare function parseGeometricRaster(value: unknown): GeometricRaster;
117
150
  /** @internal Shared deterministic crop for a validated pixel mask. */
118
151
  export declare function calculateValidSourceCrop(mask: readonly boolean[], width: number, height: number): GeometricSamplingPlan["jointCrop"];
119
- /** Resolves one joint validity/crop/AA plan after composing compatible inverse maps. */
152
+ /** Composes compatible inverse maps, then resolves one shared plan for validity, crop and anti-aliasing (AA). */
120
153
  export declare function calculateGeometricSamplingPlan(input: {
121
154
  mapping: PreparedGeometricMapping;
122
155
  sourceRaster: GeometricRaster;
123
156
  destinationRaster: GeometricRaster;
124
157
  resampler: GeometricResampler;
125
158
  physicalProjectionDistanceMm: number;
159
+ /**
160
+ * Ideal projection of the captured (source) image, used for the reported angles. Omitted or
161
+ * "rectilinear" keeps the existing atan(mm / projection distance) angles exactly.
162
+ */
163
+ sourceProjectionModel?: LensProjectionModel;
126
164
  }): CalculationResult<GeometricSamplingPlan>;
127
- /** Samples an already-formed scalar image once; null output marks missing source support. */
165
+ /** Resamples an already-formed single-channel image once. A null output sample marks missing source data. */
128
166
  export declare function calculateGeometricResampling(input: {
129
167
  plan: GeometricSamplingPlan;
130
168
  sourceSamples: readonly number[];
@@ -134,4 +172,3 @@ export declare function calculateGeometricResampling(input: {
134
172
  resampler: GeometricResampler;
135
173
  }>;
136
174
  export {};
137
- //# sourceMappingURL=geometric-transforms.d.ts.map
@@ -1,8 +1,18 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
- * Module boundary and integration notes.
4
- * Parses strict transform data, rejecting unknown semantics and noninvertible profiles.
5
- * Prepares deterministic still/frame geometry; time changes require another preparation.
3
+ * Geometric image transforms (warps) such as distortion correction and projection changes, and
4
+ * a resampler that applies them.
5
+ *
6
+ * A mapping goes from destination (output) points to source (captured) points. Preparing a
7
+ * mapping fixes it for one still or frame; a change in time needs a new preparation.
8
+ *
9
+ * Transform kinds:
10
+ * - `affine` and `radial` (schema 0.1.0, unchanged).
11
+ * - From mapping schema 0.2.0: `brown-conrady` (radial plus tangential lens distortion) and
12
+ * `projection-remap` (a change of ideal projection, for example fisheye capture to a
13
+ * rectilinear or equirectangular view).
14
+ *
15
+ * A mapping that uses only 0.1.0 kinds keeps schema and model version 0.1.0 and gives identical output.
6
16
  * @see docs/DIGITAL_OPTICS_FOUNDATION.md for equations, coordinate/unit conventions, blockers and
7
17
  * support limits.
8
18
  */
@@ -10,6 +20,9 @@ import { approximationResult } from "../core/calculation-result.js";
10
20
  import { InvalidScientificInputError } from "../core/validation.js";
11
21
  import { calculateRadialDistortionMapping, calculateInverseRadialDistortionMapping, validateRadialDistortionProfile } from "../optics/radial-distortion.js";
12
22
  import { choice, finite, list, positive, record, textValue } from "../optics/profile-contract.js";
23
+ import { requireInputObject, requireInputKeys } from "../core/record-validation.js";
24
+ import { brownConradyForwardValue, brownConradyInverseValue, validateBrownConradyDistortionProfile } from "../optics/brown-conrady-distortion.js";
25
+ import { lensProjectionRemapValue, lensProjectionSignedAxisAngle, parseLensProjectionModel } from "../camera/lens-projection.js";
13
26
  function point(value) {
14
27
  const p = record(value, ["x", "y"]);
15
28
  return { x: finite(p.x, "x"), y: finite(p.y, "y") };
@@ -28,15 +41,43 @@ function inverse(m) {
28
41
  function affine(p, m, o) {
29
42
  return { x: m[0] * p.x + m[1] * p.y + o.x, y: m[2] * p.x + m[3] * p.y + o.y };
30
43
  }
31
- /** Parses strict transform data, rejecting unknown semantics and noninvertible profiles. */
44
+ /** Strictly parses transform data. Unknown kinds or fields and profiles that cannot be inverted are rejected. */
32
45
  export function parseDigitalGeometricTransform(value) {
33
- const r = record(value, ["id", "version", "domain", "purpose", "kind", "matrix", "offsetMm", "profile"]);
46
+ const r = record(value, ["id", "version", "domain", "purpose", "kind", "matrix", "offsetMm", "profile",
47
+ "destinationProjection", "sourceProjection"]);
34
48
  const identity = {
35
49
  id: textValue(r.id), version: textValue(r.version),
36
50
  domain: choice(r.domain, ["raw-channel", "reconstructed-linear", "processed-output"]),
37
- purpose: choice(r.purpose, ["distortion", "breathing", "digital-stabilization", "orientation-crop", "lateral-ca"])
51
+ purpose: choice(r.purpose, ["distortion", "breathing", "digital-stabilization", "orientation-crop", "lateral-ca", "projection"])
38
52
  };
39
- const kind = choice(r.kind, ["affine", "radial"]);
53
+ const kind = choice(r.kind, ["affine", "radial", "brown-conrady", "projection-remap"]);
54
+ if ((kind === "projection-remap") !== (identity.purpose === "projection")) {
55
+ throw new InvalidScientificInputError("Purpose \"projection\" is used exactly by projection-remap transforms.");
56
+ }
57
+ if (kind !== "projection-remap" && (r.destinationProjection !== undefined || r.sourceProjection !== undefined)) {
58
+ throw new InvalidScientificInputError("Only projection-remap transforms carry projection declarations.");
59
+ }
60
+ if (kind === "projection-remap") {
61
+ if (r.matrix !== undefined || r.offsetMm !== undefined || r.profile !== undefined) {
62
+ throw new InvalidScientificInputError("Projection remap cannot contain affine or distortion fields.");
63
+ }
64
+ const projection = (v) => {
65
+ const d = record(v, ["projectionModel", "focalLengthMm"]);
66
+ return { projectionModel: parseLensProjectionModel(d.projectionModel), focalLengthMm: positive(d.focalLengthMm, "focalLengthMm") };
67
+ };
68
+ return { ...identity, kind, destinationProjection: projection(r.destinationProjection), sourceProjection: projection(r.sourceProjection) };
69
+ }
70
+ if (kind === "brown-conrady") {
71
+ if (r.matrix !== undefined || r.offsetMm !== undefined)
72
+ throw new InvalidScientificInputError("Brown-Conrady map cannot contain affine fields.");
73
+ const p = record(r.profile, ["normalizationRadiusMm", "maximumNormalizedRadius", "coefficients"]);
74
+ const c = record(p.coefficients, ["k1", "k2", "k3", "p1", "p2"]);
75
+ const profile = { normalizationRadiusMm: positive(p.normalizationRadiusMm, "normalizationRadiusMm"),
76
+ maximumNormalizedRadius: positive(p.maximumNormalizedRadius, "maximumNormalizedRadius"),
77
+ coefficients: { k1: finite(c.k1, "k1"), k2: finite(c.k2, "k2"), k3: finite(c.k3, "k3"), p1: finite(c.p1, "p1"), p2: finite(c.p2, "p2") } };
78
+ validateBrownConradyDistortionProfile(profile);
79
+ return { ...identity, kind, profile };
80
+ }
40
81
  if (kind === "affine") {
41
82
  if (r.profile !== undefined)
42
83
  throw new InvalidScientificInputError("Affine map cannot contain radial profile.");
@@ -57,8 +98,9 @@ export function parseDigitalGeometricTransform(value) {
57
98
  validateRadialDistortionProfile(profile);
58
99
  return { ...identity, kind, profile };
59
100
  }
60
- /** Prepares deterministic still/frame geometry; time changes require another preparation. */
101
+ /** Prepares a deterministic mapping for one still or frame. A change in time needs a new preparation. */
61
102
  export function prepareGeometricMapping(input) {
103
+ requireInputKeys(input, "prepareGeometricMapping", ["transforms", "frameTimeSeconds"]);
62
104
  const time = finite(input.frameTimeSeconds, "frameTimeSeconds");
63
105
  if (time < 0)
64
106
  throw new InvalidScientificInputError("Time is seconds from exposure start.");
@@ -73,15 +115,35 @@ export function prepareGeometricMapping(input) {
73
115
  else
74
116
  groups.push({ domain: t.domain, componentIds: [t.id] });
75
117
  }
76
- return approximationResult({ schemaVersion: "0.1.0", frameTimeSeconds: time, transforms,
77
- semanticKey: JSON.stringify({ frameTimeSeconds: time, transforms }), groups }, "composed-digital-geometry", "0.1.0", ["Explicit inverse maps; incompatible domains require separate image stages", "No physical PSF, photon or noise-history recalculation"]);
118
+ const version = transforms.some((t) => t.kind === "brown-conrady" || t.kind === "projection-remap") ? "0.2.0" : "0.1.0";
119
+ return approximationResult({ schemaVersion: version, frameTimeSeconds: time, transforms,
120
+ semanticKey: JSON.stringify({ frameTimeSeconds: time, transforms }), groups }, "composed-digital-geometry", version, ["Explicit inverse maps; incompatible domains require separate image stages", "No physical PSF, photon or noise-history recalculation"]);
121
+ }
122
+ /**
123
+ * Re-validates a prepared mapping from its defining fields (transforms and frame time). Its derived
124
+ * fields (schema version, semantic key, groups) are recomputed, never trusted.
125
+ */
126
+ function reprepareGeometricMapping(mapping) {
127
+ requireInputObject(mapping, "prepareGeometricMapping input");
128
+ return prepareGeometricMapping({ transforms: mapping.transforms, frameTimeSeconds: mapping.frameTimeSeconds }).value;
78
129
  }
79
- /** Authoritative display-to-capture map and full local directional derivatives. */
130
+ /** Maps a display point to the capture, with the full local derivatives in each direction. */
80
131
  export function calculateComposedGeometricMapping(input) {
81
- const mapping = prepareGeometricMapping(input.mapping).value;
132
+ requireInputKeys(input, "calculateComposedGeometricMapping", ["mapping", "destinationPointMm"]);
133
+ const mapping = reprepareGeometricMapping(input.mapping);
82
134
  return calculatePreparedGeometricMappingPoint(mapping, input.destinationPointMm);
83
135
  }
84
- /** Call-local parsed/copy-owned mapping only; never accepts external prepared state. */
136
+ /** Only a mapping parsed and copied within this call; prepared state from outside is never accepted. */
137
+ const VALIDATED_BROWN_CONRADY = new WeakMap();
138
+ /** Validates a parsed transform's profile once per prepared mapping (the transform object is call-local). */
139
+ function validatedBrownConrady(t) {
140
+ let v = VALIDATED_BROWN_CONRADY.get(t);
141
+ if (v === undefined) {
142
+ v = validateBrownConradyDistortionProfile(t.profile);
143
+ VALIDATED_BROWN_CONRADY.set(t, v);
144
+ }
145
+ return v;
146
+ }
85
147
  function calculatePreparedGeometricMappingPoint(mapping, destinationPointMm) {
86
148
  let p = point(destinationPointMm);
87
149
  let j = [1, 0, 0, 1];
@@ -89,10 +151,20 @@ function calculatePreparedGeometricMappingPoint(mapping, destinationPointMm) {
89
151
  for (const t of mapping.transforms) {
90
152
  let local;
91
153
  if (t.kind === "affine") {
92
- // Preserve independent result arrays when one mapping serves many points.
154
+ // Give each point its own result arrays when one mapping serves many points.
93
155
  local = [...t.matrix];
94
156
  p = affine(p, local, t.offsetMm);
95
157
  }
158
+ else if (t.kind === "brown-conrady") {
159
+ const mapped = brownConradyForwardValue(validatedBrownConrady(t), p);
160
+ local = [...mapped.jacobian];
161
+ p = mapped.mappedImagePointMm;
162
+ }
163
+ else if (t.kind === "projection-remap") {
164
+ const mapped = lensProjectionRemapValue(t.destinationProjection.projectionModel, t.destinationProjection.focalLengthMm, t.sourceProjection.projectionModel, t.sourceProjection.focalLengthMm, p.x, p.y);
165
+ local = [...mapped.jacobian];
166
+ p = { ...mapped.sourcePointMm };
167
+ }
96
168
  else {
97
169
  const { k1, k2, k3 } = t.profile.coefficients;
98
170
  const r2 = (p.x * p.x + p.y * p.y) / t.profile.normalizationRadiusMm ** 2;
@@ -104,21 +176,27 @@ function calculatePreparedGeometricMappingPoint(mapping, destinationPointMm) {
104
176
  j = multiply(local, j);
105
177
  components.push({ id: t.id, sourcePointMm: { ...p }, jacobian: local });
106
178
  }
107
- // Singular values via the symmetric J^T J eigenproblem. det/smax avoids cancellation at smin.
179
+ // Singular values from the eigenvalues of the symmetric matrix JᵀJ. Computing the smaller one as
180
+ // det/smax avoids cancellation error.
108
181
  const a = j[0] * j[0] + j[2] * j[2], b = j[0] * j[1] + j[2] * j[3], c = j[1] * j[1] + j[3] * j[3];
109
182
  const maximum = Math.sqrt((a + c + Math.hypot(a - c, 2 * b)) / 2);
110
183
  const det = determinant(j), minimum = Math.abs(det) / maximum;
111
184
  return approximationResult({ sourcePointMm: p, jacobian: j, determinant: det,
112
185
  principalStretches: [maximum, minimum], anisotropy: maximum / minimum, components }, "composed-digital-geometry-point", "0.1.0", ["Jacobian warps already-formed blur and noise; it creates no captured detail"]);
113
186
  }
114
- /** Capture-to-display bridge for focus, metering and overlays; reverses the same maps. */
187
+ /** Maps a capture point to the display, for focus, metering and overlays. It inverts the same maps. */
115
188
  export function calculateForwardGeometricMapping(input) {
189
+ requireInputKeys(input, "calculateForwardGeometricMapping", ["mapping", "sourcePointMm"]);
116
190
  let p = point(input.sourcePointMm);
117
- const mapping = prepareGeometricMapping(input.mapping).value;
191
+ const mapping = reprepareGeometricMapping(input.mapping);
118
192
  for (const t of [...mapping.transforms].reverse()) {
119
193
  p = t.kind === "affine"
120
194
  ? affine({ x: p.x - t.offsetMm.x, y: p.y - t.offsetMm.y }, inverse(t.matrix), { x: 0, y: 0 })
121
- : calculateInverseRadialDistortionMapping({ distortedImagePointMm: p, profile: t.profile }).value.sourceImagePointMm;
195
+ : t.kind === "brown-conrady"
196
+ ? brownConradyInverseValue(validatedBrownConrady(t), p)
197
+ : t.kind === "projection-remap"
198
+ ? lensProjectionRemapValue(t.sourceProjection.projectionModel, t.sourceProjection.focalLengthMm, t.destinationProjection.projectionModel, t.destinationProjection.focalLengthMm, p.x, p.y).sourcePointMm
199
+ : calculateInverseRadialDistortionMapping({ distortedImagePointMm: p, profile: t.profile }).value.sourceImagePointMm;
122
200
  }
123
201
  return approximationResult(p, "forward-digital-geometry-bridge", "0.1.0", ["Inverse of the authoritative destination-to-source geometry"]);
124
202
  }
@@ -166,9 +244,10 @@ export function calculateValidSourceCrop(mask, width, height) {
166
244
  }
167
245
  return best;
168
246
  }
169
- /** Resolves one joint validity/crop/AA plan after composing compatible inverse maps. */
247
+ /** Composes compatible inverse maps, then resolves one shared plan for validity, crop and anti-aliasing (AA). */
170
248
  export function calculateGeometricSamplingPlan(input) {
171
- const mapping = prepareGeometricMapping(input.mapping).value;
249
+ requireInputKeys(input, "calculateGeometricSamplingPlan", ["mapping", "sourceRaster", "destinationRaster", "resampler", "physicalProjectionDistanceMm", "sourceProjectionModel"]);
250
+ const mapping = reprepareGeometricMapping(input.mapping);
172
251
  if (mapping.groups.length > 1)
173
252
  throw new InvalidScientificInputError("Separate incompatible-domain groups before resampling.");
174
253
  const source = parseGeometricRaster(input.sourceRaster), destination = parseGeometricRaster(input.destinationRaster);
@@ -185,7 +264,10 @@ export function calculateGeometricSamplingPlan(input) {
185
264
  }
186
265
  const requiresPrefilter = points.some((p) => p.principalStretches[0] * destination.pitchMm / source.pitchMm > 1 + 1e-12);
187
266
  const crop = calculateValidSourceCrop(mask, destination.width, destination.height);
188
- const angle = (mm) => Math.atan(mm / projection) * 180 / Math.PI;
267
+ const sourceModel = input.sourceProjectionModel === undefined ? "rectilinear" : parseLensProjectionModel(input.sourceProjectionModel);
268
+ const angle = sourceModel === "rectilinear"
269
+ ? (mm) => Math.atan(mm / projection) * 180 / Math.PI
270
+ : (mm) => lensProjectionSignedAxisAngle(sourceModel, projection, mm) * 180 / Math.PI;
189
271
  const retained = points.filter((_, i) => crop !== null && i % destination.width >= crop.x &&
190
272
  i % destination.width < crop.x + crop.width && Math.floor(i / destination.width) >= crop.y &&
191
273
  Math.floor(i / destination.width) < crop.y + crop.height).map((p) => p.sourcePointMm);
@@ -200,9 +282,14 @@ export function calculateGeometricSamplingPlan(input) {
200
282
  vertical: angle(source.centerMm.y + source.height * source.pitchMm / 2) - angle(source.centerMm.y - source.height * source.pitchMm / 2)
201
283
  }, retainedSampleRayEnvelopeDegrees: envelope }, "joint-geometric-sampling-plan", "0.1.0", ["Mask and crop are exact for this pixel-center lattice/filter, not continuous between-pixel support", "Compression requires explicitly source-prefiltered data; this API does not implement that prefilter", "No temporal trajectory crop guarantee"]);
202
284
  }
203
- /** Samples an already-formed scalar image once; null output marks missing source support. */
285
+ /** Resamples an already-formed single-channel image once. A null output sample marks missing source data. */
204
286
  export function calculateGeometricResampling(input) {
205
- const plan = calculateGeometricSamplingPlan({ ...input.plan, physicalProjectionDistanceMm: 1 }).value;
287
+ requireInputKeys(input, "calculateGeometricResampling", ["plan", "sourceSamples"]);
288
+ const prior = input.plan;
289
+ requireInputObject(prior, "calculateGeometricResampling plan");
290
+ // Re-plan from the defining fields; the derived plan fields are recomputed, never trusted.
291
+ const plan = calculateGeometricSamplingPlan({ mapping: prior.mapping, sourceRaster: prior.sourceRaster,
292
+ destinationRaster: prior.destinationRaster, resampler: prior.resampler, physicalProjectionDistanceMm: 1 }).value;
206
293
  if (!plan.canResample)
207
294
  throw new InvalidScientificInputError("Compression requires source-prefiltered data.");
208
295
  const source = list(input.sourceSamples, 65536).map((v) => finite(v, "source sample"));
@@ -215,7 +302,7 @@ export function calculateGeometricResampling(input) {
215
302
  if (plan.resampler.filter === "nearest")
216
303
  return source[Math.round(q.y) * width + Math.round(q.x)];
217
304
  const x = Math.floor(q.x), y = Math.floor(q.y), dx = q.x - x, dy = q.y - y;
218
- // Exact boundary centers need no nonexistent neighbor; no border extension occurs.
305
+ // A centre exactly on the boundary needs no missing neighbour. The border is never extended.
219
306
  const x1 = dx === 0 ? x : x + 1, y1 = dy === 0 ? y : y + 1;
220
307
  return (1 - dy) * ((1 - dx) * source[y * width + x] + dx * source[y * width + x1]) +
221
308
  dy * ((1 - dx) * source[y1 * width + x] + dx * source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AE,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAC,CAAC,CAAC;QACvD,OAAO,CAAC,CAAC,GAAC,EAAE,CAAC,GAAC,CAAC,CAAC,CAAC,GAAC,EAAE,CAAC,GAAC,MAAM,CAAC,CAAC,GAAC,KAAK,GAAC,CAAC,CAAE,GAAC,EAAE,GAAC,MAAM,CAAC,CAAC,GAAC,KAAK,GAAC,EAAE,CAAE,CAAC;YAC9D,EAAE,GAAC,CAAC,CAAC,CAAC,GAAC,EAAE,CAAC,GAAC,MAAM,CAAC,EAAE,GAAC,KAAK,GAAC,CAAC,CAAE,GAAC,EAAE,GAAC,MAAM,CAAC,EAAE,GAAC,KAAK,GAAC,EAAE,CAAE,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IACH,OAAO,mBAAmB,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,EAClF,kCAAkC,EAAE,OAAO,EAAE,CAAC,iEAAiE,CAAC,CAAC,CAAC;AACtH,CAAC","sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Geometric image transforms (warps) such as distortion correction and projection changes, and\n * a resampler that applies them.\n *\n * A mapping goes from destination (output) points to source (captured) points. Preparing a\n * mapping fixes it for one still or frame; a change in time needs a new preparation.\n *\n * Transform kinds:\n * - `affine` and `radial` (schema 0.1.0, unchanged).\n * - From mapping schema 0.2.0: `brown-conrady` (radial plus tangential lens distortion) and\n * `projection-remap` (a change of ideal projection, for example fisheye capture to a\n * rectilinear or equirectangular view).\n *\n * A mapping that uses only 0.1.0 kinds keeps schema and model version 0.1.0 and gives identical output.\n * @see docs/DIGITAL_OPTICS_FOUNDATION.md for equations, coordinate/unit conventions, blockers and\n * support limits.\n */\n\nimport { approximationResult, type CalculationResult } from \"../core/calculation-result.js\";\nimport { InvalidScientificInputError } from \"../core/validation.js\";\nimport {\n calculateRadialDistortionMapping, calculateInverseRadialDistortionMapping,\n validateRadialDistortionProfile, type RadialDistortionProfile, type LensFieldPointMm\n} from \"../optics/radial-distortion.js\";\nimport { choice, finite, list, positive, record, textValue } from \"../optics/profile-contract.js\";\nimport { requireInputObject, requireInputKeys } from \"../core/record-validation.js\";\nimport {\n brownConradyForwardValue, brownConradyInverseValue, validateBrownConradyDistortionProfile,\n type BrownConradyDistortionProfile, type ValidatedBrownConradyDistortionProfile\n} from \"../optics/brown-conrady-distortion.js\";\nimport {\n lensProjectionRemapValue, lensProjectionSignedAxisAngle, parseLensProjectionModel,\n type LensProjectionModel\n} from \"../camera/lens-projection.js\";\n\n/** A domain change separates maps: only adjacent maps in the same domain share one resampling pass. */\nexport type GeometricImageDomain = \"raw-channel\" | \"reconstructed-linear\" | \"processed-output\";\n/** Jacobian (derivative) d(source mm)/d(destination mm), in row-major order. */\nexport type GeometricJacobian = readonly [number, number, number, number];\ninterface TransformIdentity {\n id: string;\n version: string;\n domain: GeometricImageDomain;\n purpose: \"distortion\" | \"breathing\" | \"digital-stabilization\" | \"orientation-crop\" | \"lateral-ca\" | \"projection\";\n}\n/** Explicit destination-to-source affine map, which can include rotation, shear and offset. */\nexport interface AffineGeometricTransform extends TransformIdentity {\n kind: \"affine\";\n matrix: GeometricJacobian;\n offsetMm: LensFieldPointMm;\n}\n/** Radial distortion. A correction reads the physically distorted data at the position mapped from each ideal (undistorted) destination point. */\nexport interface RadialGeometricTransform extends TransformIdentity {\n kind: \"radial\";\n profile: RadialDistortionProfile;\n}\n/** Schema 0.2.0: Brown-Conrady distortion. A correction reads the distorted data at the position mapped from each ideal destination point. */\nexport interface BrownConradyGeometricTransform extends TransformIdentity {\n kind: \"brown-conrady\";\n profile: BrownConradyDistortionProfile;\n}\n/** One ideal projection and its mapping scale (focal length, or mm per radian for equirectangular). */\nexport interface GeometricProjectionDeclaration {\n projectionModel: LensProjectionModel;\n focalLengthMm: number;\n}\n/**\n * Schema 0.2.0: change of projection. Each destination point becomes a scene direction (using\n * the destination projection), then a source point (using the source projection). Purpose must\n * be \"projection\".\n */\nexport interface ProjectionRemapGeometricTransform extends TransformIdentity {\n kind: \"projection-remap\";\n destinationProjection: GeometricProjectionDeclaration;\n sourceProjection: GeometricProjectionDeclaration;\n}\nexport type DigitalGeometricTransform =\n | AffineGeometricTransform\n | RadialGeometricTransform\n | BrownConradyGeometricTransform\n | ProjectionRemapGeometricTransform;\n/** Serializable prepared mapping. Maps are applied in the listed order, from destination towards source. */\nexport interface PreparedGeometricMapping {\n /** 0.1.0 when only affine and radial kinds are used; 0.2.0 when a kind added in 2.0 is present. */\n schemaVersion: \"0.1.0\" | \"0.2.0\";\n frameTimeSeconds: number;\n transforms: readonly DigitalGeometricTransform[];\n semanticKey: string;\n groups: readonly { domain: GeometricImageDomain; componentIds: readonly string[] }[];\n}\n/** A regular grid of pixel centres on the optical plane: +X right, +Y up; rows run top to bottom. */\nexport interface GeometricRaster {\n width: number;\n height: number;\n centerMm: LensFieldPointMm;\n pitchMm: number;\n}\n/** The resampling filter, chosen independently of the mapping. Any prefiltering (anti-aliasing) is the caller's job. */\nexport interface GeometricResampler {\n id: string;\n version: string;\n filter: \"nearest\" | \"bilinear\";\n antialias: \"none\" | \"source-prefiltered\";\n}\nexport interface GeometricMappingPoint {\n sourcePointMm: LensFieldPointMm;\n jacobian: GeometricJacobian;\n determinant: number;\n principalStretches: readonly [number, number];\n anisotropy: number;\n components: readonly { id: string; sourcePointMm: LensFieldPointMm; jacobian: GeometricJacobian }[];\n}\nexport interface GeometricSamplingPlan {\n mapping: PreparedGeometricMapping;\n sourceRaster: GeometricRaster;\n destinationRaster: GeometricRaster;\n resampler: GeometricResampler;\n points: readonly GeometricMappingPoint[];\n /** True where the selected filter has full source support around the pixel centre. Edges are not extended. */\n validSourceMask: readonly boolean[];\n /** Largest axis-aligned rectangle of valid pixels (half-open). Null if there is none. */\n jointCrop: { x: number; y: number; width: number; height: number } | null;\n requiresPrefilter: boolean;\n canResample: boolean;\n physicalCapturedFovDegrees: { horizontal: number; vertical: number };\n /** Angular extent of the mapped pixel-centre rays kept by the joint crop. It is not the edge-to-edge FOV. */\n retainedSampleRayEnvelopeDegrees: { minX: number; maxX: number; minY: number; maxY: number } | null;\n}\n\nfunction point(value: unknown): LensFieldPointMm {\n const p = record(value, [\"x\", \"y\"]);\n return { x: finite(p.x, \"x\"), y: finite(p.y, \"y\") };\n}\nfunction multiply(a: GeometricJacobian, b: GeometricJacobian): GeometricJacobian {\n return [a[0]*b[0]+a[1]*b[2], a[0]*b[1]+a[1]*b[3],\n a[2]*b[0]+a[3]*b[2], a[2]*b[1]+a[3]*b[3]];\n}\nfunction determinant(m: GeometricJacobian): number { return m[0]*m[3]-m[1]*m[2]; }\nfunction inverse(m: GeometricJacobian): GeometricJacobian {\n const d = determinant(m);\n if (!Number.isFinite(d) || Math.abs(d) < 1e-12) throw new InvalidScientificInputError(\"Singular or ill-conditioned affine map.\");\n return [m[3]/d, -m[1]/d, -m[2]/d, m[0]/d];\n}\nfunction affine(p: LensFieldPointMm, m: GeometricJacobian, o: LensFieldPointMm): LensFieldPointMm {\n return { x: m[0]*p.x+m[1]*p.y+o.x, y: m[2]*p.x+m[3]*p.y+o.y };\n}\n/** Strictly parses transform data. Unknown kinds or fields and profiles that cannot be inverted are rejected. */\nexport function parseDigitalGeometricTransform(value: unknown): DigitalGeometricTransform {\n const r = record(value, [\"id\", \"version\", \"domain\", \"purpose\", \"kind\", \"matrix\", \"offsetMm\", \"profile\",\n \"destinationProjection\", \"sourceProjection\"]);\n const identity = {\n id: textValue(r.id), version: textValue(r.version),\n domain: choice(r.domain, [\"raw-channel\", \"reconstructed-linear\", \"processed-output\"]),\n purpose: choice(r.purpose, [\"distortion\", \"breathing\", \"digital-stabilization\", \"orientation-crop\", \"lateral-ca\", \"projection\"])\n };\n const kind = choice(r.kind, [\"affine\", \"radial\", \"brown-conrady\", \"projection-remap\"]);\n if ((kind === \"projection-remap\") !== (identity.purpose === \"projection\")) {\n throw new InvalidScientificInputError(\"Purpose \\\"projection\\\" is used exactly by projection-remap transforms.\");\n }\n if (kind !== \"projection-remap\" && (r.destinationProjection !== undefined || r.sourceProjection !== undefined)) {\n throw new InvalidScientificInputError(\"Only projection-remap transforms carry projection declarations.\");\n }\n if (kind === \"projection-remap\") {\n if (r.matrix !== undefined || r.offsetMm !== undefined || r.profile !== undefined) {\n throw new InvalidScientificInputError(\"Projection remap cannot contain affine or distortion fields.\");\n }\n const projection = (v: unknown): GeometricProjectionDeclaration => {\n const d = record(v, [\"projectionModel\", \"focalLengthMm\"]);\n return { projectionModel: parseLensProjectionModel(d.projectionModel), focalLengthMm: positive(d.focalLengthMm, \"focalLengthMm\") };\n };\n return { ...identity, kind, destinationProjection: projection(r.destinationProjection), sourceProjection: projection(r.sourceProjection) };\n }\n if (kind === \"brown-conrady\") {\n if (r.matrix !== undefined || r.offsetMm !== undefined) throw new InvalidScientificInputError(\"Brown-Conrady map cannot contain affine fields.\");\n const p = record(r.profile, [\"normalizationRadiusMm\", \"maximumNormalizedRadius\", \"coefficients\"]);\n const c = record(p.coefficients, [\"k1\", \"k2\", \"k3\", \"p1\", \"p2\"]);\n const profile = { normalizationRadiusMm: positive(p.normalizationRadiusMm, \"normalizationRadiusMm\"),\n maximumNormalizedRadius: positive(p.maximumNormalizedRadius, \"maximumNormalizedRadius\"),\n coefficients: { k1: finite(c.k1, \"k1\"), k2: finite(c.k2, \"k2\"), k3: finite(c.k3, \"k3\"), p1: finite(c.p1, \"p1\"), p2: finite(c.p2, \"p2\") } };\n validateBrownConradyDistortionProfile(profile);\n return { ...identity, kind, profile };\n }\n if (kind === \"affine\") {\n if (r.profile !== undefined) throw new InvalidScientificInputError(\"Affine map cannot contain radial profile.\");\n const entries = list(r.matrix, 4).map((v) => finite(v, \"matrix\"));\n if (entries.length !== 4) throw new InvalidScientificInputError(\"Matrix must have four entries.\");\n const matrix = entries as [number, number, number, number];\n inverse(matrix);\n return { ...identity, kind, matrix, offsetMm: point(r.offsetMm) };\n }\n if (r.matrix !== undefined || r.offsetMm !== undefined) throw new InvalidScientificInputError(\"Radial map cannot contain affine fields.\");\n const p = record(r.profile, [\"normalizationRadiusMm\", \"maximumNormalizedRadius\", \"coefficients\"]);\n const c = record(p.coefficients, [\"k1\", \"k2\", \"k3\"]);\n const profile = { normalizationRadiusMm: positive(p.normalizationRadiusMm, \"normalizationRadiusMm\"),\n maximumNormalizedRadius: positive(p.maximumNormalizedRadius, \"maximumNormalizedRadius\"),\n coefficients: { k1: finite(c.k1, \"k1\"), k2: finite(c.k2, \"k2\"), k3: finite(c.k3, \"k3\") } };\n validateRadialDistortionProfile(profile);\n return { ...identity, kind, profile };\n}\n\n/** Prepares a deterministic mapping for one still or frame. A change in time needs a new preparation. */\nexport function prepareGeometricMapping(input: {\n transforms: readonly DigitalGeometricTransform[]; frameTimeSeconds: number;\n}): CalculationResult<PreparedGeometricMapping> {\n requireInputKeys(input, \"prepareGeometricMapping\", [\"transforms\", \"frameTimeSeconds\"]);\n const time = finite(input.frameTimeSeconds, \"frameTimeSeconds\");\n if (time < 0) throw new InvalidScientificInputError(\"Time is seconds from exposure start.\");\n const transforms = list(input.transforms, 32).map(parseDigitalGeometricTransform);\n if (new Set(transforms.map((t) => t.id)).size !== transforms.length) throw new InvalidScientificInputError(\"Duplicate transform IDs.\");\n const groups: { domain: GeometricImageDomain; componentIds: string[] }[] = [];\n for (const t of transforms) {\n const last = groups.at(-1);\n if (last?.domain === t.domain) last.componentIds.push(t.id);\n else groups.push({ domain: t.domain, componentIds: [t.id] });\n }\n const version = transforms.some((t) => t.kind === \"brown-conrady\" || t.kind === \"projection-remap\") ? \"0.2.0\" as const : \"0.1.0\" as const;\n return approximationResult({ schemaVersion: version, frameTimeSeconds: time, transforms,\n semanticKey: JSON.stringify({ frameTimeSeconds: time, transforms }), groups },\n \"composed-digital-geometry\", version, [\"Explicit inverse maps; incompatible domains require separate image stages\", \"No physical PSF, photon or noise-history recalculation\"]);\n}\n\n/**\n * Re-validates a prepared mapping from its defining fields (transforms and frame time). Its derived\n * fields (schema version, semantic key, groups) are recomputed, never trusted.\n */\nfunction reprepareGeometricMapping(mapping: PreparedGeometricMapping): PreparedGeometricMapping {\n requireInputObject(mapping, \"prepareGeometricMapping input\");\n return prepareGeometricMapping({ transforms: mapping.transforms, frameTimeSeconds: mapping.frameTimeSeconds }).value;\n}\n\n/** Maps a display point to the capture, with the full local derivatives in each direction. */\nexport function calculateComposedGeometricMapping(input: {\n mapping: PreparedGeometricMapping; destinationPointMm: LensFieldPointMm;\n}): CalculationResult<GeometricMappingPoint> {\n requireInputKeys(input, \"calculateComposedGeometricMapping\", [\"mapping\", \"destinationPointMm\"]);\n const mapping = reprepareGeometricMapping(input.mapping);\n return calculatePreparedGeometricMappingPoint(mapping, input.destinationPointMm);\n}\n\n/** Only a mapping parsed and copied within this call; prepared state from outside is never accepted. */\nconst VALIDATED_BROWN_CONRADY = new WeakMap<BrownConradyGeometricTransform, ValidatedBrownConradyDistortionProfile>();\n/** Validates a parsed transform's profile once per prepared mapping (the transform object is call-local). */\nfunction validatedBrownConrady(t: BrownConradyGeometricTransform): ValidatedBrownConradyDistortionProfile {\n let v = VALIDATED_BROWN_CONRADY.get(t);\n if (v === undefined) { v = validateBrownConradyDistortionProfile(t.profile); VALIDATED_BROWN_CONRADY.set(t, v); }\n return v;\n}\n\nfunction calculatePreparedGeometricMappingPoint(\n mapping: PreparedGeometricMapping,\n destinationPointMm: LensFieldPointMm\n): CalculationResult<GeometricMappingPoint> {\n let p = point(destinationPointMm);\n let j: GeometricJacobian = [1, 0, 0, 1];\n const components: GeometricMappingPoint[\"components\"][number][] = [];\n for (const t of mapping.transforms) {\n let local: GeometricJacobian;\n if (t.kind === \"affine\") {\n // Give each point its own result arrays when one mapping serves many points.\n local = [...t.matrix];\n p = affine(p, local, t.offsetMm);\n } else if (t.kind === \"brown-conrady\") {\n const mapped = brownConradyForwardValue(validatedBrownConrady(t), p);\n local = [...mapped.jacobian];\n p = mapped.mappedImagePointMm;\n } else if (t.kind === \"projection-remap\") {\n const mapped = lensProjectionRemapValue(t.destinationProjection.projectionModel, t.destinationProjection.focalLengthMm,\n t.sourceProjection.projectionModel, t.sourceProjection.focalLengthMm, p.x, p.y);\n local = [...mapped.jacobian];\n p = { ...mapped.sourcePointMm };\n } else {\n const { k1, k2, k3 } = t.profile.coefficients;\n const r2 = (p.x*p.x+p.y*p.y)/t.profile.normalizationRadiusMm**2;\n const s = 1+k1*r2+k2*r2*r2+k3*r2*r2*r2;\n const d = 2*(k1+2*k2*r2+3*k3*r2*r2)/t.profile.normalizationRadiusMm**2;\n local = [s+d*p.x*p.x, d*p.x*p.y, d*p.x*p.y, s+d*p.y*p.y];\n p = calculateRadialDistortionMapping({ imagePointMm: p, profile: t.profile }).value.mappedImagePointMm;\n }\n j = multiply(local, j);\n components.push({ id: t.id, sourcePointMm: { ...p }, jacobian: local });\n }\n // Singular values from the eigenvalues of the symmetric matrix JᵀJ. Computing the smaller one as\n // det/smax avoids cancellation error.\n const a = j[0]*j[0]+j[2]*j[2], b = j[0]*j[1]+j[2]*j[3], c = j[1]*j[1]+j[3]*j[3];\n const maximum = Math.sqrt((a+c+Math.hypot(a-c, 2*b))/2);\n const det = determinant(j), minimum = Math.abs(det)/maximum;\n return approximationResult({ sourcePointMm: p, jacobian: j, determinant: det,\n principalStretches: [maximum, minimum], anisotropy: maximum/minimum, components },\n \"composed-digital-geometry-point\", \"0.1.0\", [\"Jacobian warps already-formed blur and noise; it creates no captured detail\"]);\n}\n\n/** Maps a capture point to the display, for focus, metering and overlays. It inverts the same maps. */\nexport function calculateForwardGeometricMapping(input: {\n mapping: PreparedGeometricMapping; sourcePointMm: LensFieldPointMm;\n}): CalculationResult<LensFieldPointMm> {\n requireInputKeys(input, \"calculateForwardGeometricMapping\", [\"mapping\", \"sourcePointMm\"]);\n let p = point(input.sourcePointMm);\n const mapping = reprepareGeometricMapping(input.mapping);\n for (const t of [...mapping.transforms].reverse()) {\n p = t.kind === \"affine\"\n ? affine({ x: p.x-t.offsetMm.x, y: p.y-t.offsetMm.y }, inverse(t.matrix), { x: 0, y: 0 })\n : t.kind === \"brown-conrady\"\n ? brownConradyInverseValue(validatedBrownConrady(t), p)\n : t.kind === \"projection-remap\"\n ? lensProjectionRemapValue(t.sourceProjection.projectionModel, t.sourceProjection.focalLengthMm,\n t.destinationProjection.projectionModel, t.destinationProjection.focalLengthMm, p.x, p.y).sourcePointMm\n : calculateInverseRadialDistortionMapping({ distortedImagePointMm: p, profile: t.profile }).value.sourceImagePointMm;\n }\n return approximationResult(p, \"forward-digital-geometry-bridge\", \"0.1.0\", [\"Inverse of the authoritative destination-to-source geometry\"]);\n}\n\n/** @internal Shared lattice validation for downstream correction consumers. */\nexport function parseGeometricRaster(value: unknown): GeometricRaster {\n const r = record(value, [\"width\", \"height\", \"centerMm\", \"pitchMm\"]);\n const width = positive(r.width, \"width\"), height = positive(r.height, \"height\");\n if (!Number.isSafeInteger(width) || !Number.isSafeInteger(height) || width*height > 65536) {\n throw new InvalidScientificInputError(\"Raster must have at most 65536 integral samples.\");\n }\n return { width, height, centerMm: point(r.centerMm), pitchMm: positive(r.pitchMm, \"pitchMm\") };\n}\nfunction pixelPoint(r: GeometricRaster, x: number, y: number): LensFieldPointMm {\n return { x: r.centerMm.x+(x+.5-r.width/2)*r.pitchMm, y: r.centerMm.y-(y+.5-r.height/2)*r.pitchMm };\n}\nfunction pixelCoordinate(r: GeometricRaster, p: LensFieldPointMm): LensFieldPointMm {\n return { x: (p.x-r.centerMm.x)/r.pitchMm+r.width/2-.5, y: (r.centerMm.y-p.y)/r.pitchMm+r.height/2-.5 };\n}\nfunction supported(r: GeometricRaster, p: LensFieldPointMm, filter: GeometricResampler[\"filter\"]): boolean {\n const q = pixelCoordinate(r, p);\n return filter === \"nearest\"\n ? Math.round(q.x) >= 0 && Math.round(q.x) < r.width && Math.round(q.y) >= 0 && Math.round(q.y) < r.height\n : q.x >= 0 && q.x <= r.width-1 && q.y >= 0 && q.y <= r.height-1;\n}\n/** @internal Shared deterministic crop for a validated pixel mask. */\nexport function calculateValidSourceCrop(mask: readonly boolean[], width: number, height: number): GeometricSamplingPlan[\"jointCrop\"] {\n const heights = Array<number>(width).fill(0);\n let best: GeometricSamplingPlan[\"jointCrop\"] = null, area = 0;\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) heights[x] = mask[y*width+x] ? heights[x]!+1 : 0;\n const stack: number[] = [];\n for (let x = 0; x <= width; x++) {\n const h = x === width ? 0 : heights[x]!;\n while (stack.length && heights[stack.at(-1)!]! > h) {\n const index = stack.pop()!, rectangleHeight = heights[index]!;\n const left = stack.length ? stack.at(-1)!+1 : 0, rectangleWidth = x-left;\n if (rectangleHeight*rectangleWidth > area) {\n area = rectangleHeight*rectangleWidth;\n best = { x: left, y: y-rectangleHeight+1, width: rectangleWidth, height: rectangleHeight };\n }\n }\n stack.push(x);\n }\n }\n return best;\n}\n\n/** Composes compatible inverse maps, then resolves one shared plan for validity, crop and anti-aliasing (AA). */\nexport function calculateGeometricSamplingPlan(input: {\n mapping: PreparedGeometricMapping; sourceRaster: GeometricRaster; destinationRaster: GeometricRaster;\n resampler: GeometricResampler; physicalProjectionDistanceMm: number;\n /**\n * Ideal projection of the captured (source) image, used for the reported angles. Omitted or\n * \"rectilinear\" keeps the existing atan(mm / projection distance) angles exactly.\n */\n sourceProjectionModel?: LensProjectionModel;\n}): CalculationResult<GeometricSamplingPlan> {\n requireInputKeys(input, \"calculateGeometricSamplingPlan\", [\"mapping\", \"sourceRaster\", \"destinationRaster\", \"resampler\", \"physicalProjectionDistanceMm\", \"sourceProjectionModel\"]);\n const mapping = reprepareGeometricMapping(input.mapping);\n if (mapping.groups.length > 1) throw new InvalidScientificInputError(\"Separate incompatible-domain groups before resampling.\");\n const source = parseGeometricRaster(input.sourceRaster), destination = parseGeometricRaster(input.destinationRaster);\n const r = record(input.resampler, [\"id\", \"version\", \"filter\", \"antialias\"]);\n const resampler: GeometricResampler = { id: textValue(r.id), version: textValue(r.version),\n filter: choice(r.filter, [\"nearest\", \"bilinear\"]), antialias: choice(r.antialias, [\"none\", \"source-prefiltered\"]) };\n const projection = positive(input.physicalProjectionDistanceMm, \"physicalProjectionDistanceMm\");\n const points: GeometricMappingPoint[] = [], mask: boolean[] = [];\n for (let y = 0; y < destination.height; y++) for (let x = 0; x < destination.width; x++) {\n const mapped = calculatePreparedGeometricMappingPoint(mapping, pixelPoint(destination, x, y)).value;\n points.push(mapped); mask.push(supported(source, mapped.sourcePointMm, resampler.filter));\n }\n const requiresPrefilter = points.some((p) => p.principalStretches[0]*destination.pitchMm/source.pitchMm > 1+1e-12);\n const crop = calculateValidSourceCrop(mask, destination.width, destination.height);\n const sourceModel = input.sourceProjectionModel === undefined ? \"rectilinear\" : parseLensProjectionModel(input.sourceProjectionModel);\n const angle = sourceModel === \"rectilinear\"\n ? (mm: number): number => Math.atan(mm/projection)*180/Math.PI\n : (mm: number): number => lensProjectionSignedAxisAngle(sourceModel, projection, mm)*180/Math.PI;\n const retained = points.filter((_, i) => crop !== null && i%destination.width >= crop.x &&\n i%destination.width < crop.x+crop.width && Math.floor(i/destination.width) >= crop.y &&\n Math.floor(i/destination.width) < crop.y+crop.height).map((p) => p.sourcePointMm);\n const envelope = retained.length ? { minX: Math.min(...retained.map((p) => angle(p.x))),\n maxX: Math.max(...retained.map((p) => angle(p.x))), minY: Math.min(...retained.map((p) => angle(p.y))),\n maxY: Math.max(...retained.map((p) => angle(p.y))) } : null;\n return approximationResult({ mapping, sourceRaster: source, destinationRaster: destination, resampler, points,\n validSourceMask: mask, jointCrop: crop, requiresPrefilter,\n canResample: !requiresPrefilter || resampler.antialias === \"source-prefiltered\",\n physicalCapturedFovDegrees: {\n horizontal: angle(source.centerMm.x+source.width*source.pitchMm/2)-angle(source.centerMm.x-source.width*source.pitchMm/2),\n vertical: angle(source.centerMm.y+source.height*source.pitchMm/2)-angle(source.centerMm.y-source.height*source.pitchMm/2)\n }, retainedSampleRayEnvelopeDegrees: envelope },\n \"joint-geometric-sampling-plan\", \"0.1.0\", [\"Mask and crop are exact for this pixel-center lattice/filter, not continuous between-pixel support\", \"Compression requires explicitly source-prefiltered data; this API does not implement that prefilter\", \"No temporal trajectory crop guarantee\"]);\n}\n\n/** Resamples an already-formed single-channel image once. A null output sample marks missing source data. */\nexport function calculateGeometricResampling(input: {\n plan: GeometricSamplingPlan; sourceSamples: readonly number[];\n}): CalculationResult<{ samples: readonly (number | null)[]; resamplePasses: 1; resampler: GeometricResampler }> {\n requireInputKeys(input, \"calculateGeometricResampling\", [\"plan\", \"sourceSamples\"]);\n const prior = input.plan;\n requireInputObject(prior, \"calculateGeometricResampling plan\");\n // Re-plan from the defining fields; the derived plan fields are recomputed, never trusted.\n const plan = calculateGeometricSamplingPlan({ mapping: prior.mapping, sourceRaster: prior.sourceRaster,\n destinationRaster: prior.destinationRaster, resampler: prior.resampler, physicalProjectionDistanceMm: 1 }).value;\n if (!plan.canResample) throw new InvalidScientificInputError(\"Compression requires source-prefiltered data.\");\n const source = list(input.sourceSamples, 65536).map((v) => finite(v, \"source sample\"));\n if (source.length !== plan.sourceRaster.width*plan.sourceRaster.height) throw new InvalidScientificInputError(\"Source sample count mismatch.\");\n const samples = plan.points.map((p, index): number | null => {\n if (!plan.validSourceMask[index]) return null;\n const q = pixelCoordinate(plan.sourceRaster, p.sourcePointMm), width = plan.sourceRaster.width;\n if (plan.resampler.filter === \"nearest\") return source[Math.round(q.y)*width+Math.round(q.x)]!;\n const x = Math.floor(q.x), y = Math.floor(q.y), dx = q.x-x, dy = q.y-y;\n // A centre exactly on the boundary needs no missing neighbour. The border is never extended.\n const x1 = dx === 0 ? x : x+1, y1 = dy === 0 ? y : y+1;\n return (1-dy)*((1-dx)*source[y*width+x]!+dx*source[y*width+x1]!) +\n dy*((1-dx)*source[y1*width+x]!+dx*source[y1*width+x1]!);\n });\n return approximationResult({ samples, resamplePasses: 1, resampler: plan.resampler },\n \"single-pass-geometric-resampling\", \"0.1.0\", [\"Warps captured blur/noise; does not recalculate the optical PSF\"]);\n}\n"]}