@photivra/engine 0.1.0 → 0.4.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 (93) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/CITATION.cff +1 -1
  3. package/README.md +61 -12
  4. package/dist/camera/equivalent-focal-length.d.ts +34 -0
  5. package/dist/camera/equivalent-focal-length.d.ts.map +1 -0
  6. package/dist/camera/equivalent-focal-length.js +33 -0
  7. package/dist/camera/equivalent-focal-length.js.map +1 -0
  8. package/dist/camera/field-of-view.d.ts +40 -3
  9. package/dist/camera/field-of-view.d.ts.map +1 -1
  10. package/dist/camera/field-of-view.js +66 -24
  11. package/dist/camera/field-of-view.js.map +1 -1
  12. package/dist/core/calculation-result.d.ts.map +1 -1
  13. package/dist/core/calculation-result.js +14 -2
  14. package/dist/core/calculation-result.js.map +1 -1
  15. package/dist/core/configuration-error.d.ts +9 -0
  16. package/dist/core/configuration-error.d.ts.map +1 -0
  17. package/dist/core/configuration-error.js +13 -0
  18. package/dist/core/configuration-error.js.map +1 -0
  19. package/dist/core/evidence-provenance.d.ts +40 -0
  20. package/dist/core/evidence-provenance.d.ts.map +1 -0
  21. package/dist/core/evidence-provenance.js +79 -0
  22. package/dist/core/evidence-provenance.js.map +1 -0
  23. package/dist/core/image-formation.d.ts +70 -0
  24. package/dist/core/image-formation.d.ts.map +1 -0
  25. package/dist/core/image-formation.js +335 -0
  26. package/dist/core/image-formation.js.map +1 -0
  27. package/dist/exposure/exposure.d.ts +31 -0
  28. package/dist/exposure/exposure.d.ts.map +1 -1
  29. package/dist/exposure/exposure.js +35 -0
  30. package/dist/exposure/exposure.js.map +1 -1
  31. package/dist/index.d.ts +16 -4
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +16 -4
  34. package/dist/index.js.map +1 -1
  35. package/dist/motion/camera-rotation.d.ts +91 -0
  36. package/dist/motion/camera-rotation.d.ts.map +1 -0
  37. package/dist/motion/camera-rotation.js +157 -0
  38. package/dist/motion/camera-rotation.js.map +1 -0
  39. package/dist/optics/focus-breathing.d.ts +73 -0
  40. package/dist/optics/focus-breathing.d.ts.map +1 -0
  41. package/dist/optics/focus-breathing.js +77 -0
  42. package/dist/optics/focus-breathing.js.map +1 -0
  43. package/dist/optics/illumination-vignetting.d.ts +59 -0
  44. package/dist/optics/illumination-vignetting.d.ts.map +1 -0
  45. package/dist/optics/illumination-vignetting.js +107 -0
  46. package/dist/optics/illumination-vignetting.js.map +1 -0
  47. package/dist/optics/lateral-chromatic-aberration.d.ts +93 -0
  48. package/dist/optics/lateral-chromatic-aberration.d.ts.map +1 -0
  49. package/dist/optics/lateral-chromatic-aberration.js +174 -0
  50. package/dist/optics/lateral-chromatic-aberration.js.map +1 -0
  51. package/dist/optics/psf-foundation.d.ts +102 -0
  52. package/dist/optics/psf-foundation.d.ts.map +1 -0
  53. package/dist/optics/psf-foundation.js +164 -0
  54. package/dist/optics/psf-foundation.js.map +1 -0
  55. package/dist/optics/radial-distortion.d.ts +91 -0
  56. package/dist/optics/radial-distortion.d.ts.map +1 -0
  57. package/dist/optics/radial-distortion.js +198 -0
  58. package/dist/optics/radial-distortion.js.map +1 -0
  59. package/dist/output/capture-geometry.d.ts +225 -0
  60. package/dist/output/capture-geometry.d.ts.map +1 -0
  61. package/dist/output/capture-geometry.js +478 -0
  62. package/dist/output/capture-geometry.js.map +1 -0
  63. package/dist/schema/validation.d.ts +1 -8
  64. package/dist/schema/validation.d.ts.map +1 -1
  65. package/dist/schema/validation.js +2 -11
  66. package/dist/schema/validation.js.map +1 -1
  67. package/dist/sensor/architecture.d.ts +40 -0
  68. package/dist/sensor/architecture.d.ts.map +1 -0
  69. package/dist/sensor/architecture.js +98 -0
  70. package/dist/sensor/architecture.js.map +1 -0
  71. package/dist/sensor/radiometry-readiness.d.ts +111 -0
  72. package/dist/sensor/radiometry-readiness.d.ts.map +1 -0
  73. package/dist/sensor/radiometry-readiness.js +294 -0
  74. package/dist/sensor/radiometry-readiness.js.map +1 -0
  75. package/dist/sensor/sensor-geometry.d.ts +99 -0
  76. package/dist/sensor/sensor-geometry.d.ts.map +1 -0
  77. package/dist/sensor/sensor-geometry.js +71 -0
  78. package/dist/sensor/sensor-geometry.js.map +1 -0
  79. package/dist/simulation/poc-simulation.d.ts +93 -1
  80. package/dist/simulation/poc-simulation.d.ts.map +1 -1
  81. package/dist/simulation/poc-simulation.js +308 -24
  82. package/dist/simulation/poc-simulation.js.map +1 -1
  83. package/docs/API_STYLE.md +35 -2
  84. package/docs/ARCHITECTURE.md +179 -1
  85. package/docs/IMAGE_FORMATION.md +142 -0
  86. package/docs/MOTION_AND_SIGNAL.md +54 -1
  87. package/docs/PHYSICS_FOUNDATION.md +190 -3
  88. package/docs/POC_API.md +73 -7
  89. package/docs/PROVENANCE.md +24 -0
  90. package/docs/PSF_FOUNDATION.md +133 -0
  91. package/docs/STABILIZATION.md +17 -4
  92. package/docs/USAGE.md +680 -4
  93. package/package.json +2 -1
@@ -0,0 +1,478 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ import { calculateFieldOfViewBounds } from "../camera/field-of-view.js";
3
+ import { calculatedResult } from "../core/calculation-result.js";
4
+ import { InvalidScientificInputError, requirePositiveFinite, requirePositiveInteger } from "../core/validation.js";
5
+ import {} from "../sensor/sensor-geometry.js";
6
+ const CAPTURE_ORIENTATIONS = new Set([
7
+ "landscape",
8
+ "portrait-clockwise",
9
+ "landscape-inverted",
10
+ "portrait-counter-clockwise"
11
+ ]);
12
+ function requireCaptureOrientation(value) {
13
+ if (typeof value !== "string" ||
14
+ !CAPTURE_ORIENTATIONS.has(value)) {
15
+ throw new InvalidScientificInputError("orientation is invalid.");
16
+ }
17
+ }
18
+ function requireRasterDimensions(name, raster) {
19
+ requirePositiveInteger(`${name}.pixelWidth`, raster.pixelWidth);
20
+ requirePositiveInteger(`${name}.pixelHeight`, raster.pixelHeight);
21
+ }
22
+ function requireNonNegativeInteger(name, value) {
23
+ if (!Number.isSafeInteger(value) || value < 0) {
24
+ throw new InvalidScientificInputError(`${name} must be a non-negative safe integer.`);
25
+ }
26
+ }
27
+ function validateRasterRect(name, rect, bounds) {
28
+ requireNonNegativeInteger(`${name}.x`, rect.x);
29
+ requireNonNegativeInteger(`${name}.y`, rect.y);
30
+ requirePositiveInteger(`${name}.width`, rect.width);
31
+ requirePositiveInteger(`${name}.height`, rect.height);
32
+ if (rect.x + rect.width > bounds.pixelWidth ||
33
+ rect.y + rect.height > bounds.pixelHeight) {
34
+ throw new InvalidScientificInputError(`${name} must fit entirely within its raster bounds.`);
35
+ }
36
+ }
37
+ function validateRasterPoint(name, point, bounds) {
38
+ if (!Number.isFinite(point.x) || !Number.isFinite(point.y)) {
39
+ throw new InvalidScientificInputError(`${name} coordinates must be finite.`);
40
+ }
41
+ if (point.x < 0 ||
42
+ point.y < 0 ||
43
+ point.x > bounds.pixelWidth ||
44
+ point.y > bounds.pixelHeight) {
45
+ throw new InvalidScientificInputError(`${name} must lie within the raster edge-coordinate bounds.`);
46
+ }
47
+ }
48
+ function validateRasterVector(name, vector) {
49
+ if (!Number.isFinite(vector.x) || !Number.isFinite(vector.y)) {
50
+ throw new InvalidScientificInputError(`${name} coordinates must be finite.`);
51
+ }
52
+ }
53
+ function fullRect(raster) {
54
+ return {
55
+ x: 0,
56
+ y: 0,
57
+ width: raster.pixelWidth,
58
+ height: raster.pixelHeight
59
+ };
60
+ }
61
+ function orientRaster(raster, orientation) {
62
+ return orientation === "portrait-clockwise" ||
63
+ orientation === "portrait-counter-clockwise"
64
+ ? {
65
+ pixelWidth: raster.pixelHeight,
66
+ pixelHeight: raster.pixelWidth
67
+ }
68
+ : {
69
+ pixelWidth: raster.pixelWidth,
70
+ pixelHeight: raster.pixelHeight
71
+ };
72
+ }
73
+ function rotateVector(vector, orientation) {
74
+ switch (orientation) {
75
+ case "landscape":
76
+ return { x: vector.x, y: vector.y };
77
+ case "portrait-clockwise":
78
+ return { x: -vector.y, y: vector.x };
79
+ case "landscape-inverted":
80
+ return { x: -vector.x, y: -vector.y };
81
+ case "portrait-counter-clockwise":
82
+ return { x: vector.y, y: -vector.x };
83
+ }
84
+ }
85
+ function inverseRotateVector(vector, orientation) {
86
+ switch (orientation) {
87
+ case "landscape":
88
+ return { x: vector.x, y: vector.y };
89
+ case "portrait-clockwise":
90
+ return { x: vector.y, y: -vector.x };
91
+ case "landscape-inverted":
92
+ return { x: -vector.x, y: -vector.y };
93
+ case "portrait-counter-clockwise":
94
+ return { x: -vector.y, y: vector.x };
95
+ }
96
+ }
97
+ /**
98
+ * Transforms a continuous native raster edge-coordinate point into oriented
99
+ * capture coordinates. Pixel centers can be represented with +0.5 offsets.
100
+ */
101
+ export function transformNativeRasterPointToOriented(input) {
102
+ requireCaptureOrientation(input.orientation);
103
+ requireRasterDimensions("nativeRaster", input.nativeRaster);
104
+ validateRasterPoint("point", input.point, input.nativeRaster);
105
+ const { pixelWidth: width, pixelHeight: height } = input.nativeRaster;
106
+ switch (input.orientation) {
107
+ case "landscape":
108
+ return { ...input.point };
109
+ case "portrait-clockwise":
110
+ return { x: height - input.point.y, y: input.point.x };
111
+ case "landscape-inverted":
112
+ return { x: width - input.point.x, y: height - input.point.y };
113
+ case "portrait-counter-clockwise":
114
+ return { x: input.point.y, y: width - input.point.x };
115
+ }
116
+ }
117
+ /** Transforms an oriented raster edge-coordinate point back to native coordinates. */
118
+ export function transformOrientedRasterPointToNative(input) {
119
+ requireCaptureOrientation(input.orientation);
120
+ requireRasterDimensions("nativeRaster", input.nativeRaster);
121
+ const orientedRaster = orientRaster(input.nativeRaster, input.orientation);
122
+ validateRasterPoint("point", input.point, orientedRaster);
123
+ const { pixelWidth: width, pixelHeight: height } = input.nativeRaster;
124
+ switch (input.orientation) {
125
+ case "landscape":
126
+ return { ...input.point };
127
+ case "portrait-clockwise":
128
+ return { x: input.point.y, y: height - input.point.x };
129
+ case "landscape-inverted":
130
+ return { x: width - input.point.x, y: height - input.point.y };
131
+ case "portrait-counter-clockwise":
132
+ return { x: width - input.point.y, y: input.point.x };
133
+ }
134
+ }
135
+ /** Rotates a native raster vector into oriented coordinates. */
136
+ export function transformNativeRasterVectorToOriented(input) {
137
+ requireCaptureOrientation(input.orientation);
138
+ validateRasterVector("vector", input.vector);
139
+ return rotateVector(input.vector, input.orientation);
140
+ }
141
+ /** Rotates an oriented raster vector back into native coordinates. */
142
+ export function transformOrientedRasterVectorToNative(input) {
143
+ requireCaptureOrientation(input.orientation);
144
+ validateRasterVector("vector", input.vector);
145
+ return inverseRotateVector(input.vector, input.orientation);
146
+ }
147
+ /** Transforms an integer half-open native raster rectangle into oriented coordinates. */
148
+ export function transformNativeRasterRectToOriented(input) {
149
+ requireCaptureOrientation(input.orientation);
150
+ requireRasterDimensions("nativeRaster", input.nativeRaster);
151
+ validateRasterRect("rect", input.rect, input.nativeRaster);
152
+ const { pixelWidth: width, pixelHeight: height } = input.nativeRaster;
153
+ const { x, y, width: rectWidth, height: rectHeight } = input.rect;
154
+ switch (input.orientation) {
155
+ case "landscape":
156
+ return { ...input.rect };
157
+ case "portrait-clockwise":
158
+ return {
159
+ x: height - (y + rectHeight),
160
+ y: x,
161
+ width: rectHeight,
162
+ height: rectWidth
163
+ };
164
+ case "landscape-inverted":
165
+ return {
166
+ x: width - (x + rectWidth),
167
+ y: height - (y + rectHeight),
168
+ width: rectWidth,
169
+ height: rectHeight
170
+ };
171
+ case "portrait-counter-clockwise":
172
+ return {
173
+ x: y,
174
+ y: width - (x + rectWidth),
175
+ width: rectHeight,
176
+ height: rectWidth
177
+ };
178
+ }
179
+ }
180
+ /** Transforms an oriented integer half-open rectangle back to native coordinates. */
181
+ export function transformOrientedRasterRectToNative(input) {
182
+ requireCaptureOrientation(input.orientation);
183
+ requireRasterDimensions("nativeRaster", input.nativeRaster);
184
+ const orientedRaster = orientRaster(input.nativeRaster, input.orientation);
185
+ validateRasterRect("rect", input.rect, orientedRaster);
186
+ const { pixelWidth: width, pixelHeight: height } = input.nativeRaster;
187
+ const { x, y, width: rectWidth, height: rectHeight } = input.rect;
188
+ switch (input.orientation) {
189
+ case "landscape":
190
+ return { ...input.rect };
191
+ case "portrait-clockwise":
192
+ return {
193
+ x: y,
194
+ y: height - (x + rectWidth),
195
+ width: rectHeight,
196
+ height: rectWidth
197
+ };
198
+ case "landscape-inverted":
199
+ return {
200
+ x: width - (x + rectWidth),
201
+ y: height - (y + rectHeight),
202
+ width: rectWidth,
203
+ height: rectHeight
204
+ };
205
+ case "portrait-counter-clockwise":
206
+ return {
207
+ x: width - (y + rectHeight),
208
+ y: x,
209
+ width: rectHeight,
210
+ height: rectWidth
211
+ };
212
+ }
213
+ }
214
+ function nativePhysicalBoundsFromRect(imagingArea, nativeRaster, rect) {
215
+ const pitchX = imagingArea.widthMm / nativeRaster.pixelWidth;
216
+ const pitchY = imagingArea.heightMm / nativeRaster.pixelHeight;
217
+ return {
218
+ left: rect.x * pitchX - imagingArea.widthMm / 2,
219
+ right: (rect.x + rect.width) * pitchX - imagingArea.widthMm / 2,
220
+ top: rect.y * pitchY - imagingArea.heightMm / 2,
221
+ bottom: (rect.y + rect.height) * pitchY - imagingArea.heightMm / 2
222
+ };
223
+ }
224
+ function orientPhysicalBounds(bounds, orientation) {
225
+ const corners = [
226
+ { x: bounds.left, y: bounds.top },
227
+ { x: bounds.right, y: bounds.top },
228
+ { x: bounds.right, y: bounds.bottom },
229
+ { x: bounds.left, y: bounds.bottom }
230
+ ].map((corner) => rotateVector(corner, orientation));
231
+ return {
232
+ left: Math.min(...corners.map((corner) => corner.x)),
233
+ right: Math.max(...corners.map((corner) => corner.x)),
234
+ top: Math.min(...corners.map((corner) => corner.y)),
235
+ bottom: Math.max(...corners.map((corner) => corner.y))
236
+ };
237
+ }
238
+ function physicalBoundsFromRectWithinBounds(sourceBounds, sourceRaster, rect) {
239
+ const pitchX = (sourceBounds.right - sourceBounds.left) / sourceRaster.pixelWidth;
240
+ const pitchY = (sourceBounds.bottom - sourceBounds.top) / sourceRaster.pixelHeight;
241
+ return {
242
+ left: sourceBounds.left + rect.x * pitchX,
243
+ right: sourceBounds.left + (rect.x + rect.width) * pitchX,
244
+ top: sourceBounds.top + rect.y * pitchY,
245
+ bottom: sourceBounds.top + (rect.y + rect.height) * pitchY
246
+ };
247
+ }
248
+ function validateOutputAspectRatio(cropRect, outputRaster) {
249
+ // Preserve one isotropic output scale while allowing only the sub-pixel
250
+ // disagreement introduced when an ideal scaled dimension is rounded to an
251
+ // integer raster size. A fixed percentage tolerance can admit visible
252
+ // anisotropic stretching at large output dimensions.
253
+ const widthScaleMinimum = (outputRaster.pixelWidth - 0.5) / cropRect.width;
254
+ const widthScaleMaximum = (outputRaster.pixelWidth + 0.5) / cropRect.width;
255
+ const heightScaleMinimum = (outputRaster.pixelHeight - 0.5) / cropRect.height;
256
+ const heightScaleMaximum = (outputRaster.pixelHeight + 0.5) / cropRect.height;
257
+ const minimumCommonScale = Math.max(widthScaleMinimum, heightScaleMinimum);
258
+ const maximumCommonScale = Math.min(widthScaleMaximum, heightScaleMaximum);
259
+ if (minimumCommonScale > maximumCommonScale) {
260
+ throw new InvalidScientificInputError("outputRaster must preserve outputCropRect aspect ratio within nearest-integer raster rounding; implicit geometric stretching is not supported.");
261
+ }
262
+ }
263
+ function angleBetweenSensorRaysDegrees(first, second, projectionDistanceMm) {
264
+ const firstLength = Math.hypot(first.x, first.y, projectionDistanceMm);
265
+ const secondLength = Math.hypot(second.x, second.y, projectionDistanceMm);
266
+ const dot = first.x * second.x +
267
+ first.y * second.y +
268
+ projectionDistanceMm * projectionDistanceMm;
269
+ const cosine = Math.max(-1, Math.min(1, dot / (firstLength * secondLength)));
270
+ return (Math.acos(cosine) * 180) / Math.PI;
271
+ }
272
+ function calculateBoundsFieldOfView(bounds, focalLengthMm, focusDistanceM) {
273
+ const fovInput = {
274
+ focalLengthMm,
275
+ ...(focusDistanceM === undefined ? {} : { focusDistanceM })
276
+ };
277
+ const horizontal = calculateFieldOfViewBounds({
278
+ ...fovInput,
279
+ minimumSensorCoordinateMm: bounds.left,
280
+ maximumSensorCoordinateMm: bounds.right
281
+ });
282
+ const vertical = calculateFieldOfViewBounds({
283
+ ...fovInput,
284
+ minimumSensorCoordinateMm: bounds.top,
285
+ maximumSensorCoordinateMm: bounds.bottom
286
+ });
287
+ const projectionDistanceMm = horizontal.value.projectionDistanceMm;
288
+ const topLeft = { x: bounds.left, y: bounds.top };
289
+ const topRight = { x: bounds.right, y: bounds.top };
290
+ const bottomRight = { x: bounds.right, y: bounds.bottom };
291
+ const bottomLeft = { x: bounds.left, y: bounds.bottom };
292
+ const topLeftToBottomRight = angleBetweenSensorRaysDegrees(topLeft, bottomRight, projectionDistanceMm);
293
+ const topRightToBottomLeft = angleBetweenSensorRaysDegrees(topRight, bottomLeft, projectionDistanceMm);
294
+ return {
295
+ horizontalDegrees: horizontal.value.degrees,
296
+ verticalDegrees: vertical.value.degrees,
297
+ diagonalDegrees: Math.max(topLeftToBottomRight, topRightToBottomLeft),
298
+ horizontalBoundsDegrees: {
299
+ minimum: horizontal.value.minimumDegrees,
300
+ maximum: horizontal.value.maximumDegrees
301
+ },
302
+ verticalBoundsDegrees: {
303
+ minimum: vertical.value.minimumDegrees,
304
+ maximum: vertical.value.maximumDegrees
305
+ },
306
+ diagonalDegreesByCornerPair: {
307
+ topLeftToBottomRight,
308
+ topRightToBottomLeft
309
+ },
310
+ projection: {
311
+ projectionDistanceMm,
312
+ provenance: horizontal.provenance
313
+ }
314
+ };
315
+ }
316
+ /**
317
+ * Resolves native sensor geometry, active capture, physical camera orientation,
318
+ * and final digital/output geometry without conflating their identities.
319
+ */
320
+ export function resolveCaptureGeometry(input) {
321
+ requireCaptureOrientation(input.orientation);
322
+ requirePositiveFinite("imagingArea.widthMm", input.imagingArea.widthMm);
323
+ requirePositiveFinite("imagingArea.heightMm", input.imagingArea.heightMm);
324
+ requireRasterDimensions("nativeRaster", input.nativeRaster);
325
+ const activeCaptureRect = input.activeCaptureRect ?? fullRect(input.nativeRaster);
326
+ validateRasterRect("activeCaptureRect", activeCaptureRect, input.nativeRaster);
327
+ const nativeBounds = nativePhysicalBoundsFromRect(input.imagingArea, input.nativeRaster, activeCaptureRect);
328
+ const activeImagingArea = {
329
+ widthMm: nativeBounds.right - nativeBounds.left,
330
+ heightMm: nativeBounds.bottom - nativeBounds.top
331
+ };
332
+ const activeRaster = {
333
+ pixelWidth: activeCaptureRect.width,
334
+ pixelHeight: activeCaptureRect.height
335
+ };
336
+ const orientedBounds = orientPhysicalBounds(nativeBounds, input.orientation);
337
+ const orientedRaster = orientRaster(activeRaster, input.orientation);
338
+ const orientedImagingArea = {
339
+ widthMm: orientedBounds.right - orientedBounds.left,
340
+ heightMm: orientedBounds.bottom - orientedBounds.top
341
+ };
342
+ const outputCropRect = input.outputCropRect ?? fullRect(orientedRaster);
343
+ validateRasterRect("outputCropRect", outputCropRect, orientedRaster);
344
+ const outputRaster = input.outputRaster ?? {
345
+ pixelWidth: outputCropRect.width,
346
+ pixelHeight: outputCropRect.height
347
+ };
348
+ requireRasterDimensions("outputRaster", outputRaster);
349
+ validateOutputAspectRatio(outputCropRect, outputRaster);
350
+ const outputBounds = physicalBoundsFromRectWithinBounds(orientedBounds, orientedRaster, outputCropRect);
351
+ const outputImagingArea = {
352
+ widthMm: outputBounds.right - outputBounds.left,
353
+ heightMm: outputBounds.bottom - outputBounds.top
354
+ };
355
+ const outputScaleX = outputRaster.pixelWidth / outputCropRect.width;
356
+ const outputScaleY = outputRaster.pixelHeight / outputCropRect.height;
357
+ const outputScaleAxisRelativeDifference = Math.abs(outputScaleX - outputScaleY) /
358
+ ((outputScaleX + outputScaleY) / 2);
359
+ return calculatedResult({
360
+ native: {
361
+ imagingArea: { ...input.imagingArea },
362
+ raster: { ...input.nativeRaster }
363
+ },
364
+ activeCapture: {
365
+ nativeRect: { ...activeCaptureRect },
366
+ imagingArea: activeImagingArea,
367
+ physicalOffsetMm: {
368
+ x: nativeBounds.left + input.imagingArea.widthMm / 2,
369
+ y: nativeBounds.top + input.imagingArea.heightMm / 2
370
+ },
371
+ centerOffsetFromOpticalAxisMm: {
372
+ x: (nativeBounds.left + nativeBounds.right) / 2,
373
+ y: (nativeBounds.top + nativeBounds.bottom) / 2
374
+ },
375
+ physicalBoundsFromOpticalAxisMm: nativeBounds,
376
+ imagingAreaDerivation: "uniform-native-raster",
377
+ raster: activeRaster
378
+ },
379
+ orientedCapture: {
380
+ orientation: input.orientation,
381
+ imagingArea: orientedImagingArea,
382
+ physicalBoundsFromOpticalAxisMm: orientedBounds,
383
+ raster: orientedRaster
384
+ },
385
+ output: {
386
+ cropRect: { ...outputCropRect },
387
+ raster: { ...outputRaster },
388
+ imagingArea: outputImagingArea,
389
+ physicalBoundsFromOpticalAxisMm: outputBounds,
390
+ centerOffsetFromOpticalAxisMm: {
391
+ x: (outputBounds.left + outputBounds.right) / 2,
392
+ y: (outputBounds.top + outputBounds.bottom) / 2
393
+ },
394
+ sourceRetainedAreaFraction: (outputCropRect.width * outputCropRect.height) /
395
+ (orientedRaster.pixelWidth * orientedRaster.pixelHeight),
396
+ orientedCaptureToOutputScale: {
397
+ x: outputScaleX,
398
+ y: outputScaleY,
399
+ axisRelativeDifference: outputScaleAxisRelativeDifference
400
+ }
401
+ }
402
+ }, "capture-geometry-pipeline", "1.2.0", [
403
+ "Native sensor raster coordinates use a top-left origin with +X right and +Y down.",
404
+ "Raster rectangles are integer half-open extents.",
405
+ "Physical camera orientation does not rotate or redefine the native sensor coordinate system.",
406
+ "The generic active physical area is derived by assuming native image samples uniformly span the declared physical imaging area.",
407
+ "Output crop/resampling is digital geometry and does not mutate physical sensor or active-capture identity.",
408
+ "The physical image region retained by output crop is tracked explicitly for final framing and equivalent-viewing calculations.",
409
+ "Output raster aspect ratio must remain consistent with the output crop; implicit geometric stretching is rejected."
410
+ ]);
411
+ }
412
+ /**
413
+ * Calculates asymmetric horizontal/vertical FOV plus opposite-corner diagonal
414
+ * spans for the active physical capture area after physical camera orientation.
415
+ *
416
+ * Final digital/output crop is intentionally excluded.
417
+ */
418
+ export function calculateActiveCaptureFieldOfView(input) {
419
+ requirePositiveFinite("focalLengthMm", input.focalLengthMm);
420
+ const geometry = resolveCaptureGeometry({
421
+ imagingArea: input.imagingArea,
422
+ nativeRaster: input.nativeRaster,
423
+ orientation: input.orientation,
424
+ ...(input.activeCaptureRect === undefined
425
+ ? {}
426
+ : { activeCaptureRect: input.activeCaptureRect })
427
+ }).value;
428
+ const bounds = geometry.orientedCapture.physicalBoundsFromOpticalAxisMm;
429
+ const fieldOfView = calculateBoundsFieldOfView(bounds, input.focalLengthMm, input.focusDistanceM);
430
+ return calculatedResult({
431
+ orientation: input.orientation,
432
+ ...fieldOfView,
433
+ activeImagingArea: {
434
+ ...geometry.orientedCapture.imagingArea
435
+ },
436
+ centerOffsetFromOpticalAxisMm: rotateVector(geometry.activeCapture.centerOffsetFromOpticalAxisMm, input.orientation)
437
+ }, "oriented-active-capture-field-of-view", "1.1.0", [
438
+ "Rectilinear projection is evaluated from signed active-area bounds relative to the optical axis.",
439
+ "Off-center active crops preserve asymmetric angular bounds rather than being treated as centered.",
440
+ "Camera orientation rotates physical bounds while leaving the native sensor coordinate system unchanged.",
441
+ "For off-center rectangles the two opposite-corner diagonal spans may differ; diagonalDegrees reports the larger span.",
442
+ "Final digital/output crop is excluded from active-capture FOV."
443
+ ]);
444
+ }
445
+ /**
446
+ * Calculates final visible field of view after physical active capture,
447
+ * orientation, and digital/output crop. Output raster resolution does not
448
+ * affect this optical/framing result.
449
+ */
450
+ export function calculateOutputFieldOfView(input) {
451
+ requirePositiveFinite("focalLengthMm", input.focalLengthMm);
452
+ const geometry = resolveCaptureGeometry({
453
+ imagingArea: input.imagingArea,
454
+ nativeRaster: input.nativeRaster,
455
+ orientation: input.orientation,
456
+ ...(input.activeCaptureRect === undefined
457
+ ? {}
458
+ : { activeCaptureRect: input.activeCaptureRect }),
459
+ ...(input.outputCropRect === undefined
460
+ ? {}
461
+ : { outputCropRect: input.outputCropRect })
462
+ }).value;
463
+ const fieldOfView = calculateBoundsFieldOfView(geometry.output.physicalBoundsFromOpticalAxisMm, input.focalLengthMm, input.focusDistanceM);
464
+ return calculatedResult({
465
+ orientation: input.orientation,
466
+ ...fieldOfView,
467
+ outputImagingArea: { ...geometry.output.imagingArea },
468
+ centerOffsetFromOpticalAxisMm: {
469
+ ...geometry.output.centerOffsetFromOpticalAxisMm
470
+ }
471
+ }, "oriented-output-field-of-view", "1.0.0", [
472
+ "Final visible FOV is derived from the physical image region retained by active capture and digital/output crop.",
473
+ "Output raster resolution does not change field of view.",
474
+ "Off-center output crops preserve asymmetric angular bounds.",
475
+ "Physical sensor identity and active-capture 35 mm-equivalent focal length are unchanged by final digital crop."
476
+ ]);
477
+ }
478
+ //# sourceMappingURL=capture-geometry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-geometry.js","sourceRoot":"","sources":["../../src/output/capture-geometry.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC,OAAO,EACL,0BAA0B,EAC3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,gBAAgB,EAGjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAIN,MAAM,8BAA8B,CAAC;AAQtC,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAqB;IACvD,WAAW;IACX,oBAAoB;IACpB,oBAAoB;IACpB,4BAA4B;CAC7B,CAAC,CAAC;AA2MH,SAAS,yBAAyB,CAChC,KAAc;IAEd,IACE,OAAO,KAAK,KAAK,QAAQ;QACzB,CAAC,oBAAoB,CAAC,GAAG,CAAC,KAA2B,CAAC,EACtD,CAAC;QACD,MAAM,IAAI,2BAA2B,CAAC,yBAAyB,CAAC,CAAC;IACnE,CAAC;AACH,CAAC;AAED,SAAS,uBAAuB,CAC9B,IAAY,EACZ,MAAwB;IAExB,sBAAsB,CAAC,GAAG,IAAI,aAAa,EAAE,MAAM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AQ,CAAC,MAAM,CAAC,WAAW,EAAE;QACrD,6BAA6B,EAAE;YAC7B,GAAG,QAAQ,CAAC,MAAM,CAAC,6BAA6B;SACjD;KACF,EACD,+BAA+B,EAC/B,OAAO,EACP;QACE,iHAAiH;QACjH,yDAAyD;QACzD,6DAA6D;QAC7D,gHAAgH;KACjH,CACF,CAAC;AACJ,CAAC"}
@@ -1,13 +1,6 @@
1
+ export { InvalidConfigurationError } from "../core/configuration-error.js";
1
2
  import type { CameraConfiguration } from "./camera.js";
2
3
  import type { SceneDefinition } from "./scene.js";
3
- /**
4
- * Error thrown when external configuration data does not match a public
5
- * runtime schema.
6
- */
7
- export declare class InvalidConfigurationError extends TypeError {
8
- readonly code = "INVALID_CONFIGURATION";
9
- constructor(message: string);
10
- }
11
4
  /**
12
5
  * Parses and validates an untrusted camera configuration.
13
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/schema/validation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAEV,eAAe,EAChB,MAAM,YAAY,CAAC;AAsBpB;;;GAGG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IACtD,QAAQ,CAAC,IAAI,2BAA2B;gBAE5B,OAAO,EAAE,MAAM;CAI5B;AAkGD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,GACb,mBAAmB,CAwCrB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CAuFpE"}
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/schema/validation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAEV,eAAe,EAChB,MAAM,YAAY,CAAC;AAsHpB;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,GACb,mBAAmB,CAwCrB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CAuFpE"}
@@ -1,4 +1,6 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
+ import { InvalidConfigurationError } from "../core/configuration-error.js";
3
+ export { InvalidConfigurationError } from "../core/configuration-error.js";
2
4
  const CAMERA_SUPPORTS = new Set([
3
5
  "handheld",
4
6
  "braced",
@@ -15,17 +17,6 @@ const SCENE_CAPABILITIES = new Set([
15
17
  "multi-resolution-layers",
16
18
  "absolute-radiometry"
17
19
  ]);
18
- /**
19
- * Error thrown when external configuration data does not match a public
20
- * runtime schema.
21
- */
22
- export class InvalidConfigurationError extends TypeError {
23
- code = "INVALID_CONFIGURATION";
24
- constructor(message) {
25
- super(message);
26
- this.name = "InvalidConfigurationError";
27
- }
28
- }
29
20
  function requireRecord(value, path) {
30
21
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
31
22
  throw new InvalidConfigurationError(`${path} must be an object.`);
@@ -1 +1 @@
1
- {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/schema/validation.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAatC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAgB;IAC7C,UAAU;IACV,QAAQ;IACR,SAAS;IACT,QAAQ;CACT,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAkB;IAClD,kBAAkB;IAClB,cAAc;IACd,cAAc;IACd,kBAAkB;IAClB,gBAAgB;IAChB,eAAe;IACf,yBAAyB;IACzB,qBAAqB;CACtB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,OAAO,yBAA0B,SAAQ,SAAS;IAC7C,IAAI,GAAG,uBAAuB,CAAC;IAExC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC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AAI,yBAAyB,CACjC,+BAA+B,aAAa,EAAE,CAC/C,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,KAAwB,CAAC;AAClC,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { type EvidenceBackedFact, type EvidenceProvenance, type EvidenceReuseStatus, type EvidenceSourceOrigin } from "../core/evidence-provenance.js";
2
+ export type SensorIlluminationArchitecture = "fsi" | "bsi";
3
+ export type SensorIntegrationArchitecture = "monolithic" | "partially-stacked" | "stacked";
4
+ export type SensorReadoutArchitecture = "rolling" | "global";
5
+ export type SensorColorSamplingFamily = "bayer" | "quad-bayer" | "monochrome" | "custom-rgb-mosaic" | "layered-color";
6
+ export type SensorArchitectureSourceKind = EvidenceSourceOrigin;
7
+ export type SensorArchitectureReuseStatus = EvidenceReuseStatus;
8
+ export type SensorArchitectureFactProvenance = EvidenceProvenance;
9
+ export type SourcedSensorArchitectureFact<T> = EvidenceBackedFact<T>;
10
+ /**
11
+ * Descriptive sensor hardware/capability metadata.
12
+ *
13
+ * Omitted properties mean unknown/unasserted. These fields are not scientific
14
+ * effect switches: no architecture value changes noise, dynamic range, FOV,
15
+ * crop factor, exposure, or sampling without a separate downstream model.
16
+ */
17
+ export interface SensorArchitectureProfile {
18
+ schemaVersion: "0.2.0";
19
+ illumination?: SourcedSensorArchitectureFact<SensorIlluminationArchitecture>;
20
+ integration?: SourcedSensorArchitectureFact<SensorIntegrationArchitecture>;
21
+ /**
22
+ * Hardware readout capabilities, not the readout mode selected for one
23
+ * capture. Each capability carries its own evidence because different
24
+ * readout modes may be documented by different sources.
25
+ */
26
+ readoutCapabilities?: readonly SourcedSensorArchitectureFact<SensorReadoutArchitecture>[];
27
+ colorSamplingFamily?: SourcedSensorArchitectureFact<SensorColorSamplingFamily>;
28
+ }
29
+ /**
30
+ * Parses untrusted descriptive sensor-architecture metadata.
31
+ *
32
+ * Unknown facts should be omitted instead of inferred. The parser validates
33
+ * structure, supported vocabulary, and field-level evidence only; it does not
34
+ * verify that a cited real-world claim is factually true.
35
+ *
36
+ * @param value Unknown external data.
37
+ * @returns Validated sensor architecture profile.
38
+ */
39
+ export declare function parseSensorArchitectureProfile(value: unknown): SensorArchitectureProfile;
40
+ //# sourceMappingURL=architecture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"architecture.d.ts","sourceRoot":"","sources":["../../src/sensor/architecture.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EAC1B,MAAM,gCAAgC,CAAC;AAKxC,MAAM,MAAM,8BAA8B,GAAG,KAAK,GAAG,KAAK,CAAC;AAE3D,MAAM,MAAM,6BAA6B,GACrC,YAAY,GACZ,mBAAmB,GACnB,SAAS,CAAC;AAEd,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE7D,MAAM,MAAM,yBAAyB,GACjC,OAAO,GACP,YAAY,GACZ,YAAY,GACZ,mBAAmB,GACnB,eAAe,CAAC;AAEpB,MAAM,MAAM,4BAA4B,GAAG,oBAAoB,CAAC;AAChE,MAAM,MAAM,6BAA6B,GAAG,mBAAmB,CAAC;AAChE,MAAM,MAAM,gCAAgC,GAAG,kBAAkB,CAAC;AAClE,MAAM,MAAM,6BAA6B,CAAC,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAC,CAAC;AAErE;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,6BAA6B,CAAC,8BAA8B,CAAC,CAAC;IAC7E,WAAW,CAAC,EAAE,6BAA6B,CAAC,6BAA6B,CAAC,CAAC;IAC3E;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,SAAS,6BAA6B,CAAC,yBAAyB,CAAC,EAAE,CAAC;IAC1F,mBAAmB,CAAC,EAAE,6BAA6B,CAAC,yBAAyB,CAAC,CAAC;CAChF;AA4FD;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,GACb,yBAAyB,CA+C3B"}