@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.
- package/CHANGELOG.md +87 -0
- package/CITATION.cff +1 -1
- package/README.md +61 -12
- package/dist/camera/equivalent-focal-length.d.ts +34 -0
- package/dist/camera/equivalent-focal-length.d.ts.map +1 -0
- package/dist/camera/equivalent-focal-length.js +33 -0
- package/dist/camera/equivalent-focal-length.js.map +1 -0
- package/dist/camera/field-of-view.d.ts +40 -3
- package/dist/camera/field-of-view.d.ts.map +1 -1
- package/dist/camera/field-of-view.js +66 -24
- package/dist/camera/field-of-view.js.map +1 -1
- package/dist/core/calculation-result.d.ts.map +1 -1
- package/dist/core/calculation-result.js +14 -2
- package/dist/core/calculation-result.js.map +1 -1
- package/dist/core/configuration-error.d.ts +9 -0
- package/dist/core/configuration-error.d.ts.map +1 -0
- package/dist/core/configuration-error.js +13 -0
- package/dist/core/configuration-error.js.map +1 -0
- package/dist/core/evidence-provenance.d.ts +40 -0
- package/dist/core/evidence-provenance.d.ts.map +1 -0
- package/dist/core/evidence-provenance.js +79 -0
- package/dist/core/evidence-provenance.js.map +1 -0
- package/dist/core/image-formation.d.ts +70 -0
- package/dist/core/image-formation.d.ts.map +1 -0
- package/dist/core/image-formation.js +335 -0
- package/dist/core/image-formation.js.map +1 -0
- package/dist/exposure/exposure.d.ts +31 -0
- package/dist/exposure/exposure.d.ts.map +1 -1
- package/dist/exposure/exposure.js +35 -0
- package/dist/exposure/exposure.js.map +1 -1
- package/dist/index.d.ts +16 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/dist/motion/camera-rotation.d.ts +91 -0
- package/dist/motion/camera-rotation.d.ts.map +1 -0
- package/dist/motion/camera-rotation.js +157 -0
- package/dist/motion/camera-rotation.js.map +1 -0
- package/dist/optics/focus-breathing.d.ts +73 -0
- package/dist/optics/focus-breathing.d.ts.map +1 -0
- package/dist/optics/focus-breathing.js +77 -0
- package/dist/optics/focus-breathing.js.map +1 -0
- package/dist/optics/illumination-vignetting.d.ts +59 -0
- package/dist/optics/illumination-vignetting.d.ts.map +1 -0
- package/dist/optics/illumination-vignetting.js +107 -0
- package/dist/optics/illumination-vignetting.js.map +1 -0
- package/dist/optics/lateral-chromatic-aberration.d.ts +93 -0
- package/dist/optics/lateral-chromatic-aberration.d.ts.map +1 -0
- package/dist/optics/lateral-chromatic-aberration.js +174 -0
- package/dist/optics/lateral-chromatic-aberration.js.map +1 -0
- package/dist/optics/psf-foundation.d.ts +102 -0
- package/dist/optics/psf-foundation.d.ts.map +1 -0
- package/dist/optics/psf-foundation.js +164 -0
- package/dist/optics/psf-foundation.js.map +1 -0
- package/dist/optics/radial-distortion.d.ts +91 -0
- package/dist/optics/radial-distortion.d.ts.map +1 -0
- package/dist/optics/radial-distortion.js +198 -0
- package/dist/optics/radial-distortion.js.map +1 -0
- package/dist/output/capture-geometry.d.ts +225 -0
- package/dist/output/capture-geometry.d.ts.map +1 -0
- package/dist/output/capture-geometry.js +478 -0
- package/dist/output/capture-geometry.js.map +1 -0
- package/dist/schema/validation.d.ts +1 -8
- package/dist/schema/validation.d.ts.map +1 -1
- package/dist/schema/validation.js +2 -11
- package/dist/schema/validation.js.map +1 -1
- package/dist/sensor/architecture.d.ts +40 -0
- package/dist/sensor/architecture.d.ts.map +1 -0
- package/dist/sensor/architecture.js +98 -0
- package/dist/sensor/architecture.js.map +1 -0
- package/dist/sensor/radiometry-readiness.d.ts +111 -0
- package/dist/sensor/radiometry-readiness.d.ts.map +1 -0
- package/dist/sensor/radiometry-readiness.js +294 -0
- package/dist/sensor/radiometry-readiness.js.map +1 -0
- package/dist/sensor/sensor-geometry.d.ts +99 -0
- package/dist/sensor/sensor-geometry.d.ts.map +1 -0
- package/dist/sensor/sensor-geometry.js +71 -0
- package/dist/sensor/sensor-geometry.js.map +1 -0
- package/dist/simulation/poc-simulation.d.ts +93 -1
- package/dist/simulation/poc-simulation.d.ts.map +1 -1
- package/dist/simulation/poc-simulation.js +308 -24
- package/dist/simulation/poc-simulation.js.map +1 -1
- package/docs/API_STYLE.md +35 -2
- package/docs/ARCHITECTURE.md +179 -1
- package/docs/IMAGE_FORMATION.md +142 -0
- package/docs/MOTION_AND_SIGNAL.md +54 -1
- package/docs/PHYSICS_FOUNDATION.md +190 -3
- package/docs/POC_API.md +73 -7
- package/docs/PROVENANCE.md +24 -0
- package/docs/PSF_FOUNDATION.md +133 -0
- package/docs/STABILIZATION.md +17 -4
- package/docs/USAGE.md +680 -4
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exposure.js","sourceRoot":"","sources":["../../src/exposure/exposure.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC,OAAO,EACL,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAS9D;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAqC;IAErC,qBAAqB,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAClD,qBAAqB,CAAC,gBAAgB,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAE9D,OAAO,gBAAgB,CACrB,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,EACnE,oBAAoB,EACpB,OAAO,EACP,CAAC,2CAA2C,CAAC,CAC9C,CAAC;AACJ,CAAC;AAgBD;;;;;;GAMG;AACH,MAAM,UAAU,gCAAgC,CAC9C,KAA4C;IAE5C,qBAAqB,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAClD,qBAAqB,CAAC,gBAAgB,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC9D,qBAAqB,CAAC,mBAAmB,EAAE,KAAK,CAAC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AAC,CAAC;IAChD,qBAAqB,CAAC,cAAc,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAC1D,qBAAqB,CAAC,oBAAoB,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACtE,qBAAqB,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAClD,qBAAqB,CAAC,gBAAgB,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAE9D,MAAM,SAAS,GACb,KAAK,CAAC,kBAAkB;QACxB,CAAC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC;IAC5C,MAAM,QAAQ,GACZ,KAAK,CAAC,cAAc,GAAG,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;IAE3D,OAAO,gBAAgB,CACrB,KAAK,CAAC,OAAO,GAAG,CAAC,SAAS,GAAG,QAAQ,CAAC,EACtC,6BAA6B,EAC7B,OAAO,EACP;QACE,6BAA6B;QAC7B,qEAAqE;QACrE,qEAAqE;KACtE,CACF,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,25 +4,37 @@
|
|
|
4
4
|
* This constant is intentionally independent of the package version so
|
|
5
5
|
* schema/API compatibility can be discussed explicitly.
|
|
6
6
|
*/
|
|
7
|
-
export declare const ENGINE_API_VERSION: "0.
|
|
7
|
+
export declare const ENGINE_API_VERSION: "0.32.0";
|
|
8
8
|
export { approximationResult, calibratedResult, calculatedResult, estimatedResult, validateCalculationQuality, type AbsoluteUncertaintyEstimate, type CalculationProvenance, type CalculationQuality, type CalculationResult, type CalculationValidRange, type ProvenanceKind, type RelativeUncertaintyEstimate, type UncertaintyConfidence, type UncertaintyEstimate, type UncertaintySource } from "./core/calculation-result.js";
|
|
9
9
|
export { InvalidScientificInputError, InvalidScientificResultError } from "./core/validation.js";
|
|
10
|
-
export {
|
|
10
|
+
export { IMAGE_FORMATION_CONTRACT_VERSION, getImageFormationContract, type ImageFormationContract, type ImageFormationCoordinateSpaceContract, type ImageFormationCoordinateSpaceId, type ImageFormationDomainId, type ImageFormationEffectId, type ImageFormationEffectPlacement, type ImageFormationImplementationStatus, type ImageFormationRendererContract, type ImageFormationStageContract, type ImageFormationStageId, type ImageFormationTemporalContract } from "./core/image-formation.js";
|
|
11
|
+
export { calculateFieldOfView, calculateFieldOfViewBounds, type CalculateFieldOfViewBoundsInput, type CalculateFieldOfViewInput, type FieldOfView, type FieldOfViewBounds } from "./camera/field-of-view.js";
|
|
11
12
|
export { calculateProjectedObjectSize, type CalculateProjectedObjectSizeInput, type ProjectedObjectSize } from "./camera/projected-object-size.js";
|
|
13
|
+
export { calculateEquivalentFocalLength35Mm, type CalculateEquivalentFocalLength35MmInput, type EquivalentFocalLength35Mm } from "./camera/equivalent-focal-length.js";
|
|
12
14
|
export { calculatePixelPitch, type CalculatePixelPitchInput, type PixelPitch } from "./sensor/pixel-pitch.js";
|
|
15
|
+
export { calculateImagingAreaMetrics, calculateSensorGeometryMetrics, type CalculateSensorGeometryMetricsInput, type ImagingAreaMetrics, type NativeImageRaster, type RasterDimensions, type SensorGeometryMetrics, type SensorImagingArea } from "./sensor/sensor-geometry.js";
|
|
16
|
+
export { parseSensorArchitectureProfile, type SensorArchitectureFactProvenance, type SensorArchitectureProfile, type SensorArchitectureReuseStatus, type SensorArchitectureSourceKind, type SensorColorSamplingFamily, type SensorIlluminationArchitecture, type SensorIntegrationArchitecture, type SensorReadoutArchitecture, type SourcedSensorArchitectureFact } from "./sensor/architecture.js";
|
|
13
17
|
export { calculateCenteredCrop, type CalculateCenteredCropInput, type CenteredCrop } from "./output/crop.js";
|
|
14
18
|
export { calculateSubjectFramingCrop, type CalculateSubjectFramingCropInput, type SubjectFramingCrop } from "./output/subject-framing-crop.js";
|
|
19
|
+
export { calculateActiveCaptureFieldOfView, calculateOutputFieldOfView, resolveCaptureGeometry, transformNativeRasterPointToOriented, transformNativeRasterRectToOriented, transformNativeRasterVectorToOriented, transformOrientedRasterPointToNative, transformOrientedRasterRectToNative, transformOrientedRasterVectorToNative, type ActiveCaptureFieldOfView, type CalculateActiveCaptureFieldOfViewInput, type CalculateOutputFieldOfViewInput, type CaptureOrientation, type OutputFieldOfView, type PhysicalBoundsFromOpticalAxisMm, type RasterPoint, type RasterRect, type RasterVector, type ResolveCaptureGeometryInput, type ResolvedCaptureGeometry, type TransformRasterPointInput, type TransformRasterRectInput, type TransformRasterVectorInput } from "./output/capture-geometry.js";
|
|
15
20
|
export { calculateIdealApertureGeometry, type ApertureVertex, type CalculateIdealApertureInput, type IdealApertureGeometry } from "./optics/aperture.js";
|
|
16
21
|
export { calculateAiryDisk, type AiryDisk, type CalculateAiryDiskInput } from "./optics/diffraction.js";
|
|
17
22
|
export { estimateEquivalentViewingCircleOfConfusion, type EquivalentViewingCircleOfConfusion, type EstimateEquivalentViewingCircleOfConfusionInput } from "./optics/circle-of-confusion.js";
|
|
18
23
|
export { calculateThinLensImageDistance, type CalculateThinLensImageDistanceInput, type ThinLensImageDistance } from "./optics/thin-lens.js";
|
|
19
24
|
export { calculateDefocusCircle, calculateDepthOfField, type CalculateDefocusCircleInput, type CalculateDepthOfFieldInput, type DefocusCircle, type DepthOfField } from "./optics/depth-of-field.js";
|
|
25
|
+
export { calculateFocusBreathingFieldOfView, calculateFocusBreathingProjection, type CalculateFocusBreathingFieldOfViewInput, type CalculateFocusBreathingProjectionInput, type FocusBreathingFieldOfView, type FocusBreathingProjection } from "./optics/focus-breathing.js";
|
|
26
|
+
export { calculateInverseRadialDistortionMapping, calculateRadialDistortionMapping, type CalculateInverseRadialDistortionMappingInput, type CalculateRadialDistortionMappingInput, type InverseRadialDistortionMapping, type LensFieldPointMm, type RadialDistortionCoefficients, type RadialDistortionMapping, type RadialDistortionProfile } from "./optics/radial-distortion.js";
|
|
27
|
+
export { calculateInverseLateralChromaticAberrationMapping, calculateLateralChromaticAberrationMapping, type CalculateInverseLateralChromaticAberrationMappingInput, type CalculateLateralChromaticAberrationMappingInput, type ChannelSeparationVectorMm, type InverseLateralChromaticAberrationChannelMapping, type InverseLateralChromaticAberrationMapping, type LateralChromaticAberrationChannel, type LateralChromaticAberrationChannelMapping, type LateralChromaticAberrationMapping, type LateralChromaticAberrationProfile, type LateralChromaticAberrationSeparation } from "./optics/lateral-chromatic-aberration.js";
|
|
28
|
+
export { calculateIlluminationVignetting, type CalculateIlluminationVignettingInput, type IlluminationVignetting, type IlluminationVignettingCoefficients, type IlluminationVignettingProfile } from "./optics/illumination-vignetting.js";
|
|
29
|
+
export { PSF_FOUNDATION_VERSION, calculatePsfFoundationComponents, getPsfFoundationContract, type CalculatePsfFoundationComponentsInput, type PsfContributionContract, type PsfContributionId, type PsfContributionStatus, type PsfFoundationComponents, type PsfFoundationContract } from "./optics/psf-foundation.js";
|
|
20
30
|
export type { CameraConfiguration, CameraSupport, ExposureConfiguration, FocusConfiguration, LensConfiguration, SensorConfiguration, StabilizationConfiguration } from "./schema/camera.js";
|
|
21
31
|
export type { SceneCapability, SceneDefinition, SceneMotion, SceneObject, SceneRadiometry, Vector3 } from "./schema/scene.js";
|
|
22
32
|
export { calculateProjectedMotionBlur, type CalculateProjectedMotionBlurInput, type ProjectedMotionBlur } from "./motion/projected-motion.js";
|
|
23
|
-
export {
|
|
33
|
+
export { calculateCameraRotationImageMapping, type AxisSamplingPitchMicrometers, type CalculateCameraRotationImageMappingInput, type CameraAngularVelocityRadPerSec, type CameraRotationImageMapping, type ImagePlanePointMm } from "./motion/camera-rotation.js";
|
|
34
|
+
export { calculateEquivalentIso, calculateExposureValue100, calculateRelativeOpticalExposure, calculateRelativeRenderedExposure, type CalculateEquivalentIsoInput, type CalculateExposureValue100Input, type CalculateRelativeOpticalExposureInput, type CalculateRelativeRenderedExposureInput, type RelativeOpticalExposure, type RelativeRenderedExposure } from "./exposure/exposure.js";
|
|
24
35
|
export { estimateCameraShakeBlur, type CameraShakeBlurSample, type CameraShakeEstimate, type EstimateCameraShakeBlurInput } from "./stabilization/camera-shake.js";
|
|
25
36
|
export { calculatePhotoelectrons, calculateSignalToNoise, type CalculatePhotoelectronsInput, type CalculateSignalToNoiseInput, type SignalToNoise } from "./sensor/signal-noise.js";
|
|
26
|
-
export {
|
|
37
|
+
export { assessRadiometryReadiness, parseRadiometryReadinessProfile, type CalibrationArtifactReference, type ExposureIntegrationRequirement, type OpticalTransmissionRequirement, type PhotositeCollectionAreaRequirement, type PupilVignettingRequirement, type RadiometryReadinessAssessment, type RadiometryReadinessProfile, type RadiometryRequirement, type RadiometryRequirementId, type RadiometryScientificStatus, type RadiometryUncertaintyDeclaration, type SceneSpectralRadianceRequirement, type SensorResponseRequirement } from "./sensor/radiometry-readiness.js";
|
|
38
|
+
export { POC_SIMULATION_API_VERSION, simulatePocCamera, type PocSimulationRequest, type PocSimulationResponse } from "./simulation/poc-simulation.js";
|
|
27
39
|
export { InvalidConfigurationError, parseCameraConfiguration, parseSceneDefinition } from "./schema/validation.js";
|
|
28
40
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAG,QAAiB,CAAC;AAEpD,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,0BAA0B,EAC1B,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB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AK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,0BAA0B,EAC/B,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,EACrC,KAAK,yBAAyB,EAC/B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC3B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,23 +5,35 @@
|
|
|
5
5
|
* This constant is intentionally independent of the package version so
|
|
6
6
|
* schema/API compatibility can be discussed explicitly.
|
|
7
7
|
*/
|
|
8
|
-
export const ENGINE_API_VERSION = "0.
|
|
8
|
+
export const ENGINE_API_VERSION = "0.32.0";
|
|
9
9
|
export { approximationResult, calibratedResult, calculatedResult, estimatedResult, validateCalculationQuality } from "./core/calculation-result.js";
|
|
10
10
|
export { InvalidScientificInputError, InvalidScientificResultError } from "./core/validation.js";
|
|
11
|
-
export {
|
|
11
|
+
export { IMAGE_FORMATION_CONTRACT_VERSION, getImageFormationContract } from "./core/image-formation.js";
|
|
12
|
+
export { calculateFieldOfView, calculateFieldOfViewBounds } from "./camera/field-of-view.js";
|
|
12
13
|
export { calculateProjectedObjectSize } from "./camera/projected-object-size.js";
|
|
14
|
+
export { calculateEquivalentFocalLength35Mm } from "./camera/equivalent-focal-length.js";
|
|
13
15
|
export { calculatePixelPitch } from "./sensor/pixel-pitch.js";
|
|
16
|
+
export { calculateImagingAreaMetrics, calculateSensorGeometryMetrics } from "./sensor/sensor-geometry.js";
|
|
17
|
+
export { parseSensorArchitectureProfile } from "./sensor/architecture.js";
|
|
14
18
|
export { calculateCenteredCrop } from "./output/crop.js";
|
|
15
19
|
export { calculateSubjectFramingCrop } from "./output/subject-framing-crop.js";
|
|
20
|
+
export { calculateActiveCaptureFieldOfView, calculateOutputFieldOfView, resolveCaptureGeometry, transformNativeRasterPointToOriented, transformNativeRasterRectToOriented, transformNativeRasterVectorToOriented, transformOrientedRasterPointToNative, transformOrientedRasterRectToNative, transformOrientedRasterVectorToNative } from "./output/capture-geometry.js";
|
|
16
21
|
export { calculateIdealApertureGeometry } from "./optics/aperture.js";
|
|
17
22
|
export { calculateAiryDisk } from "./optics/diffraction.js";
|
|
18
23
|
export { estimateEquivalentViewingCircleOfConfusion } from "./optics/circle-of-confusion.js";
|
|
19
24
|
export { calculateThinLensImageDistance } from "./optics/thin-lens.js";
|
|
20
25
|
export { calculateDefocusCircle, calculateDepthOfField } from "./optics/depth-of-field.js";
|
|
26
|
+
export { calculateFocusBreathingFieldOfView, calculateFocusBreathingProjection } from "./optics/focus-breathing.js";
|
|
27
|
+
export { calculateInverseRadialDistortionMapping, calculateRadialDistortionMapping } from "./optics/radial-distortion.js";
|
|
28
|
+
export { calculateInverseLateralChromaticAberrationMapping, calculateLateralChromaticAberrationMapping } from "./optics/lateral-chromatic-aberration.js";
|
|
29
|
+
export { calculateIlluminationVignetting } from "./optics/illumination-vignetting.js";
|
|
30
|
+
export { PSF_FOUNDATION_VERSION, calculatePsfFoundationComponents, getPsfFoundationContract } from "./optics/psf-foundation.js";
|
|
21
31
|
export { calculateProjectedMotionBlur } from "./motion/projected-motion.js";
|
|
22
|
-
export {
|
|
32
|
+
export { calculateCameraRotationImageMapping } from "./motion/camera-rotation.js";
|
|
33
|
+
export { calculateEquivalentIso, calculateExposureValue100, calculateRelativeOpticalExposure, calculateRelativeRenderedExposure } from "./exposure/exposure.js";
|
|
23
34
|
export { estimateCameraShakeBlur } from "./stabilization/camera-shake.js";
|
|
24
35
|
export { calculatePhotoelectrons, calculateSignalToNoise } from "./sensor/signal-noise.js";
|
|
25
|
-
export {
|
|
36
|
+
export { assessRadiometryReadiness, parseRadiometryReadinessProfile } from "./sensor/radiometry-readiness.js";
|
|
37
|
+
export { POC_SIMULATION_API_VERSION, simulatePocCamera } from "./simulation/poc-simulation.js";
|
|
26
38
|
export { InvalidConfigurationError, parseCameraConfiguration, parseSceneDefinition } from "./schema/validation.js";
|
|
27
39
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAiB,CAAC;AAEpD,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,0BAA0B,EAW3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAiB,CAAC;AAEpD,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,0BAA0B,EAW3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,gCAAgC,EAChC,yBAAyB,EAY1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAK3B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,4BAA4B,EAG7B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,kCAAkC,EAGnC,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EACL,mBAAmB,EAGpB,MAAM,y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AAwB,CAAC;AAEhC,OAAO,EACL,uBAAuB,EAIxB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EAIvB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAchC,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EAGlB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { type CalculationResult } from "../core/calculation-result.js";
|
|
2
|
+
export interface CameraAngularVelocityRadPerSec {
|
|
3
|
+
/** Right-hand rotation rate about camera +X (right), in radians per second. */
|
|
4
|
+
pitch: number;
|
|
5
|
+
/** Right-hand rotation rate about camera +Y (up), in radians per second. */
|
|
6
|
+
yaw: number;
|
|
7
|
+
/** Right-hand rotation rate about camera +Z (forward), in radians per second. */
|
|
8
|
+
roll: number;
|
|
9
|
+
}
|
|
10
|
+
export interface ImagePlanePointMm {
|
|
11
|
+
/** Image-plane X coordinate relative to the optical axis, in millimetres. */
|
|
12
|
+
x: number;
|
|
13
|
+
/** Image-plane Y coordinate relative to the optical axis, in millimetres. */
|
|
14
|
+
y: number;
|
|
15
|
+
}
|
|
16
|
+
export interface AxisSamplingPitchMicrometers {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
}
|
|
20
|
+
export interface CalculateCameraRotationImageMappingInput {
|
|
21
|
+
/** Physical focal length in millimetres. */
|
|
22
|
+
focalLengthMm: number;
|
|
23
|
+
/**
|
|
24
|
+
* Stationary-world-ray image-plane position at exposure start.
|
|
25
|
+
*
|
|
26
|
+
* Image-plane coordinates use optical-axis origin, +X right, +Y up.
|
|
27
|
+
*/
|
|
28
|
+
imagePointMm: ImagePlanePointMm;
|
|
29
|
+
/**
|
|
30
|
+
* Time in seconds from exposure start. Must be greater than or equal to zero.
|
|
31
|
+
*/
|
|
32
|
+
timeSecondsFromExposureStart: number;
|
|
33
|
+
/**
|
|
34
|
+
* Constant camera angular-velocity vector in radians per second.
|
|
35
|
+
*
|
|
36
|
+
* Components are resolved in the camera axes at exposure start and follow
|
|
37
|
+
* the right-hand rule: pitch about +X, yaw about +Y, roll about +Z.
|
|
38
|
+
*/
|
|
39
|
+
angularVelocityRadPerSec: CameraAngularVelocityRadPerSec;
|
|
40
|
+
/** Optional focus distance in metres for thin-lens projection distance. */
|
|
41
|
+
focusDistanceM?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Optional axis-aware geometric sampling pitch for reporting sample-domain
|
|
44
|
+
* displacement. This is geometric sample spacing, not photosite collection
|
|
45
|
+
* area.
|
|
46
|
+
*/
|
|
47
|
+
samplingPitchMicrometers?: AxisSamplingPitchMicrometers;
|
|
48
|
+
}
|
|
49
|
+
export interface CameraRotationImageMapping {
|
|
50
|
+
projectionDistanceMm: number;
|
|
51
|
+
timeSecondsFromExposureStart: number;
|
|
52
|
+
angularDisplacementRad: {
|
|
53
|
+
pitch: number;
|
|
54
|
+
yaw: number;
|
|
55
|
+
roll: number;
|
|
56
|
+
magnitude: number;
|
|
57
|
+
};
|
|
58
|
+
startImagePointMm: ImagePlanePointMm;
|
|
59
|
+
mappedImagePointMm: ImagePlanePointMm;
|
|
60
|
+
deltaMm: {
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
distance: number;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Optional geometric sample displacement in the image-plane basis
|
|
67
|
+
* (+X right, +Y up). This is not a native-raster vector.
|
|
68
|
+
*/
|
|
69
|
+
deltaImagePlaneSamples?: {
|
|
70
|
+
x: number;
|
|
71
|
+
y: number;
|
|
72
|
+
distance: number;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Maps one stationary-world ray to its image-plane location after pure camera
|
|
77
|
+
* rotation at an arbitrary physical time from exposure start.
|
|
78
|
+
*
|
|
79
|
+
* The initial image point defines the world ray in the camera frame at t=0.
|
|
80
|
+
* Constant angular velocity is integrated as one axis-angle rotation vector,
|
|
81
|
+
* avoiding Euler-order dependence. The stationary world ray is then expressed
|
|
82
|
+
* in the rotated camera frame using the inverse camera rotation and projected
|
|
83
|
+
* rectilinearly back onto the image plane.
|
|
84
|
+
*
|
|
85
|
+
* This function models rotation only. It deliberately excludes camera
|
|
86
|
+
* translation because translational optical flow depends on scene depth.
|
|
87
|
+
*
|
|
88
|
+
* @returns Field-position-dependent image-plane mapping and displacement.
|
|
89
|
+
*/
|
|
90
|
+
export declare function calculateCameraRotationImageMapping(input: CalculateCameraRotationImageMappingInput): CalculationResult<CameraRotationImageMapping>;
|
|
91
|
+
//# sourceMappingURL=camera-rotation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camera-rotation.d.ts","sourceRoot":"","sources":["../../src/motion/camera-rotation.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AAOvC,MAAM,WAAW,8BAA8B;IAC7C,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAC;IACZ,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,6EAA6E;IAC7E,CAAC,EAAE,MAAM,CAAC;IACV,6EAA6E;IAC7E,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,4BAA4B;IAC3C,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,wCAAwC;IACvD,4CAA4C;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,YAAY,EAAE,iBAAiB,CAAC;IAChC;;OAEG;IACH,4BAA4B,EAAE,MAAM,CAAC;IACrC;;;;;OAKG;IACH,wBAAwB,EAAE,8BAA8B,CAAC;IACzD,2EAA2E;IAC3E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,4BAA4B,CAAC;CACzD;AAED,MAAM,WAAW,0BAA0B;IACzC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,4BAA4B,EAAE,MAAM,CAAC;IACrC,sBAAsB,EAAE;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,kBAAkB,EAAE,iBAAiB,CAAC;IACtC,OAAO,EAAE;QACP,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF;;;OAGG;IACH,sBAAsB,CAAC,EAAE;QACvB,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAkFD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,wCAAwC,GAC9C,iBAAiB,CAAC,0BAA0B,CAAC,CAkJ/C"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
import { calculatedResult } from "../core/calculation-result.js";
|
|
3
|
+
import { InvalidScientificInputError, requirePositiveFinite } from "../core/validation.js";
|
|
4
|
+
import { calculateThinLensImageDistance } from "../optics/thin-lens.js";
|
|
5
|
+
function requireFinite(name, value) {
|
|
6
|
+
if (!Number.isFinite(value)) {
|
|
7
|
+
throw new InvalidScientificInputError(`${name} must be finite.`);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
function requireNonNegativeFinite(name, value) {
|
|
11
|
+
if (!Number.isFinite(value) || value < 0) {
|
|
12
|
+
throw new InvalidScientificInputError(`${name} must be finite and greater than or equal to zero.`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function rotateVectorByAxisAngle(vector, axis, angleRad) {
|
|
16
|
+
if (angleRad === 0) {
|
|
17
|
+
return { ...vector };
|
|
18
|
+
}
|
|
19
|
+
const cosine = Math.cos(angleRad);
|
|
20
|
+
const sine = Math.sin(angleRad);
|
|
21
|
+
const oneMinusCosine = 1 - cosine;
|
|
22
|
+
const dot = axis.x * vector.x +
|
|
23
|
+
axis.y * vector.y +
|
|
24
|
+
axis.z * vector.z;
|
|
25
|
+
const cross = {
|
|
26
|
+
x: axis.y * vector.z - axis.z * vector.y,
|
|
27
|
+
y: axis.z * vector.x - axis.x * vector.z,
|
|
28
|
+
z: axis.x * vector.y - axis.y * vector.x
|
|
29
|
+
};
|
|
30
|
+
return {
|
|
31
|
+
x: vector.x * cosine +
|
|
32
|
+
cross.x * sine +
|
|
33
|
+
axis.x * dot * oneMinusCosine,
|
|
34
|
+
y: vector.y * cosine +
|
|
35
|
+
cross.y * sine +
|
|
36
|
+
axis.y * dot * oneMinusCosine,
|
|
37
|
+
z: vector.z * cosine +
|
|
38
|
+
cross.z * sine +
|
|
39
|
+
axis.z * dot * oneMinusCosine
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function resolveProjectionDistanceMm(focalLengthMm, focusDistanceM) {
|
|
43
|
+
const projection = focusDistanceM === undefined
|
|
44
|
+
? undefined
|
|
45
|
+
: calculateThinLensImageDistance({
|
|
46
|
+
focalLengthMm,
|
|
47
|
+
objectDistanceM: focusDistanceM
|
|
48
|
+
});
|
|
49
|
+
return {
|
|
50
|
+
projectionDistanceMm: projection?.value.imageDistanceMm ?? focalLengthMm,
|
|
51
|
+
focusAware: projection !== undefined
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Maps one stationary-world ray to its image-plane location after pure camera
|
|
56
|
+
* rotation at an arbitrary physical time from exposure start.
|
|
57
|
+
*
|
|
58
|
+
* The initial image point defines the world ray in the camera frame at t=0.
|
|
59
|
+
* Constant angular velocity is integrated as one axis-angle rotation vector,
|
|
60
|
+
* avoiding Euler-order dependence. The stationary world ray is then expressed
|
|
61
|
+
* in the rotated camera frame using the inverse camera rotation and projected
|
|
62
|
+
* rectilinearly back onto the image plane.
|
|
63
|
+
*
|
|
64
|
+
* This function models rotation only. It deliberately excludes camera
|
|
65
|
+
* translation because translational optical flow depends on scene depth.
|
|
66
|
+
*
|
|
67
|
+
* @returns Field-position-dependent image-plane mapping and displacement.
|
|
68
|
+
*/
|
|
69
|
+
export function calculateCameraRotationImageMapping(input) {
|
|
70
|
+
requirePositiveFinite("focalLengthMm", input.focalLengthMm);
|
|
71
|
+
requireFinite("imagePointMm.x", input.imagePointMm.x);
|
|
72
|
+
requireFinite("imagePointMm.y", input.imagePointMm.y);
|
|
73
|
+
requireNonNegativeFinite("timeSecondsFromExposureStart", input.timeSecondsFromExposureStart);
|
|
74
|
+
requireFinite("angularVelocityRadPerSec.pitch", input.angularVelocityRadPerSec.pitch);
|
|
75
|
+
requireFinite("angularVelocityRadPerSec.yaw", input.angularVelocityRadPerSec.yaw);
|
|
76
|
+
requireFinite("angularVelocityRadPerSec.roll", input.angularVelocityRadPerSec.roll);
|
|
77
|
+
if (input.samplingPitchMicrometers !== undefined) {
|
|
78
|
+
requirePositiveFinite("samplingPitchMicrometers.x", input.samplingPitchMicrometers.x);
|
|
79
|
+
requirePositiveFinite("samplingPitchMicrometers.y", input.samplingPitchMicrometers.y);
|
|
80
|
+
}
|
|
81
|
+
const { projectionDistanceMm, focusAware } = resolveProjectionDistanceMm(input.focalLengthMm, input.focusDistanceM);
|
|
82
|
+
const angularDisplacementRad = {
|
|
83
|
+
pitch: input.angularVelocityRadPerSec.pitch *
|
|
84
|
+
input.timeSecondsFromExposureStart,
|
|
85
|
+
yaw: input.angularVelocityRadPerSec.yaw *
|
|
86
|
+
input.timeSecondsFromExposureStart,
|
|
87
|
+
roll: input.angularVelocityRadPerSec.roll *
|
|
88
|
+
input.timeSecondsFromExposureStart
|
|
89
|
+
};
|
|
90
|
+
const angularMagnitude = Math.hypot(angularDisplacementRad.pitch, angularDisplacementRad.yaw, angularDisplacementRad.roll);
|
|
91
|
+
const initialRay = {
|
|
92
|
+
x: input.imagePointMm.x / projectionDistanceMm,
|
|
93
|
+
y: input.imagePointMm.y / projectionDistanceMm,
|
|
94
|
+
z: 1
|
|
95
|
+
};
|
|
96
|
+
let mappedRay = initialRay;
|
|
97
|
+
if (angularMagnitude !== 0) {
|
|
98
|
+
const inverseAxis = {
|
|
99
|
+
x: angularDisplacementRad.pitch / angularMagnitude,
|
|
100
|
+
y: angularDisplacementRad.yaw / angularMagnitude,
|
|
101
|
+
z: angularDisplacementRad.roll / angularMagnitude
|
|
102
|
+
};
|
|
103
|
+
mappedRay = rotateVectorByAxisAngle(initialRay, inverseAxis, -angularMagnitude);
|
|
104
|
+
}
|
|
105
|
+
if (!Number.isFinite(mappedRay.z) || mappedRay.z <= 0) {
|
|
106
|
+
throw new InvalidScientificInputError("Camera rotation maps the requested world ray to or behind the camera plane.");
|
|
107
|
+
}
|
|
108
|
+
const mappedImagePointMm = {
|
|
109
|
+
x: projectionDistanceMm * (mappedRay.x / mappedRay.z),
|
|
110
|
+
y: projectionDistanceMm * (mappedRay.y / mappedRay.z)
|
|
111
|
+
};
|
|
112
|
+
const deltaMm = {
|
|
113
|
+
x: mappedImagePointMm.x - input.imagePointMm.x,
|
|
114
|
+
y: mappedImagePointMm.y - input.imagePointMm.y,
|
|
115
|
+
distance: Math.hypot(mappedImagePointMm.x - input.imagePointMm.x, mappedImagePointMm.y - input.imagePointMm.y)
|
|
116
|
+
};
|
|
117
|
+
let deltaImagePlaneSamples;
|
|
118
|
+
if (input.samplingPitchMicrometers !== undefined) {
|
|
119
|
+
const pitchXmm = input.samplingPitchMicrometers.x / 1000;
|
|
120
|
+
const pitchYmm = input.samplingPitchMicrometers.y / 1000;
|
|
121
|
+
const sampleX = deltaMm.x / pitchXmm;
|
|
122
|
+
const sampleY = deltaMm.y / pitchYmm;
|
|
123
|
+
deltaImagePlaneSamples = {
|
|
124
|
+
x: sampleX,
|
|
125
|
+
y: sampleY,
|
|
126
|
+
distance: Math.hypot(sampleX, sampleY)
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return calculatedResult({
|
|
130
|
+
projectionDistanceMm,
|
|
131
|
+
timeSecondsFromExposureStart: input.timeSecondsFromExposureStart,
|
|
132
|
+
angularDisplacementRad: {
|
|
133
|
+
...angularDisplacementRad,
|
|
134
|
+
magnitude: angularMagnitude
|
|
135
|
+
},
|
|
136
|
+
startImagePointMm: { ...input.imagePointMm },
|
|
137
|
+
mappedImagePointMm,
|
|
138
|
+
deltaMm,
|
|
139
|
+
...(deltaImagePlaneSamples === undefined
|
|
140
|
+
? {}
|
|
141
|
+
: { deltaImagePlaneSamples })
|
|
142
|
+
}, focusAware
|
|
143
|
+
? "focus-aware-spatial-camera-rotation-mapping"
|
|
144
|
+
: "spatial-camera-rotation-mapping", "1.0.0", [
|
|
145
|
+
"Ideal rectilinear projection",
|
|
146
|
+
focusAware
|
|
147
|
+
? "Thin-lens image distance for the selected focus plane is used as the projection distance"
|
|
148
|
+
: "Nominal focal length is used as the infinity-focus projection distance",
|
|
149
|
+
"Camera angular velocity is constant during the evaluated interval",
|
|
150
|
+
"Angular velocity components are resolved in the camera axes at exposure start and integrated as one axis-angle vector",
|
|
151
|
+
"Positive pitch/yaw/roll follow the right-hand rule about camera +X/+Y/+Z",
|
|
152
|
+
"The world ray is stationary; subject motion is not included",
|
|
153
|
+
"Camera translation and depth-dependent parallax are not modeled",
|
|
154
|
+
"The stationary world ray is transformed by the inverse camera rotation before rectilinear projection"
|
|
155
|
+
]);
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=camera-rotation.js.map
|
|
@@ -0,0 +1 @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culation-result.js";
|
|
2
|
+
export interface CalculateFocusBreathingProjectionInput {
|
|
3
|
+
/** Physical lens focal length in millimetres. This value is never rewritten. */
|
|
4
|
+
focalLengthMm: number;
|
|
5
|
+
/** Selected focus distance in metres. */
|
|
6
|
+
focusDistanceM: number;
|
|
7
|
+
/**
|
|
8
|
+
* Caller-declared projection scale for this focus state, relative to the
|
|
9
|
+
* ideal thin-lens image distance.
|
|
10
|
+
*
|
|
11
|
+
* 1 means no additional breathing relative to the current thin-lens model.
|
|
12
|
+
* Values above 1 narrow framing / increase magnification; values below 1
|
|
13
|
+
* widen framing / reduce magnification.
|
|
14
|
+
*/
|
|
15
|
+
breathingProjectionScale: number;
|
|
16
|
+
}
|
|
17
|
+
export interface FocusBreathingProjection {
|
|
18
|
+
/** Authoritative physical focal length supplied by the caller. */
|
|
19
|
+
physicalFocalLengthMm: number;
|
|
20
|
+
focusDistanceM: number;
|
|
21
|
+
/** Ideal Gaussian thin-lens image distance before breathing adjustment. */
|
|
22
|
+
idealProjectionDistanceMm: number;
|
|
23
|
+
/**
|
|
24
|
+
* Effective projection distance used by the generic breathing model.
|
|
25
|
+
*
|
|
26
|
+
* This is a projection/magnification parameter, not a replacement physical
|
|
27
|
+
* focal length.
|
|
28
|
+
*/
|
|
29
|
+
effectiveProjectionDistanceMm: number;
|
|
30
|
+
/** Caller-declared scale relative to ideal thin-lens projection. */
|
|
31
|
+
breathingProjectionScale: number;
|
|
32
|
+
/** Ideal Gaussian thin-lens magnification at the selected focus distance. */
|
|
33
|
+
idealMagnification: number;
|
|
34
|
+
/** Generic breathing-adjusted magnification. */
|
|
35
|
+
effectiveMagnification: number;
|
|
36
|
+
}
|
|
37
|
+
export interface CalculateFocusBreathingFieldOfViewInput extends CalculateFocusBreathingProjectionInput {
|
|
38
|
+
/** Sensor/capture dimension corresponding to the requested FOV, in millimetres. */
|
|
39
|
+
sensorDimensionMm: number;
|
|
40
|
+
}
|
|
41
|
+
export interface FocusBreathingFieldOfView {
|
|
42
|
+
physicalFocalLengthMm: number;
|
|
43
|
+
focusDistanceM: number;
|
|
44
|
+
sensorDimensionMm: number;
|
|
45
|
+
breathingProjectionScale: number;
|
|
46
|
+
idealProjectionDistanceMm: number;
|
|
47
|
+
effectiveProjectionDistanceMm: number;
|
|
48
|
+
idealDegrees: number;
|
|
49
|
+
effectiveDegrees: number;
|
|
50
|
+
deltaDegrees: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Applies a caller-declared focus-breathing projection scale to the ideal
|
|
54
|
+
* Gaussian thin-lens projection for one focus state.
|
|
55
|
+
*
|
|
56
|
+
* Photivra does not infer the scale from focal length, focus distance, lens
|
|
57
|
+
* identity, or marketing data. A value of 1 exactly preserves the current
|
|
58
|
+
* thin-lens projection.
|
|
59
|
+
*
|
|
60
|
+
* This is a generic approximation of focus-dependent projection/magnification,
|
|
61
|
+
* not a calibrated real-lens model. The physical focal length remains
|
|
62
|
+
* authoritative and unchanged.
|
|
63
|
+
*/
|
|
64
|
+
export declare function calculateFocusBreathingProjection(input: CalculateFocusBreathingProjectionInput): CalculationResult<FocusBreathingProjection>;
|
|
65
|
+
/**
|
|
66
|
+
* Calculates one-axis field of view for the generic declared-scale focus-
|
|
67
|
+
* breathing projection and reports the corresponding ideal thin-lens FOV.
|
|
68
|
+
*
|
|
69
|
+
* A breathingProjectionScale of 1 reproduces the current focus-aware
|
|
70
|
+
* thin-lens field-of-view result exactly.
|
|
71
|
+
*/
|
|
72
|
+
export declare function calculateFocusBreathingFieldOfView(input: CalculateFocusBreathingFieldOfViewInput): CalculationResult<FocusBreathingFieldOfView>;
|
|
73
|
+
//# sourceMappingURL=focus-breathing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-breathing.d.ts","sourceRoot":"","sources":["../../src/optics/focus-breathing.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AAIvC,MAAM,WAAW,sC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/calculation-result.js";
|
|
3
|
+
import { requirePositiveFinite } from "../core/validation.js";
|
|
4
|
+
import { calculateThinLensImageDistance } from "./thin-lens.js";
|
|
5
|
+
/**
|
|
6
|
+
* Applies a caller-declared focus-breathing projection scale to the ideal
|
|
7
|
+
* Gaussian thin-lens projection for one focus state.
|
|
8
|
+
*
|
|
9
|
+
* Photivra does not infer the scale from focal length, focus distance, lens
|
|
10
|
+
* identity, or marketing data. A value of 1 exactly preserves the current
|
|
11
|
+
* thin-lens projection.
|
|
12
|
+
*
|
|
13
|
+
* This is a generic approximation of focus-dependent projection/magnification,
|
|
14
|
+
* not a calibrated real-lens model. The physical focal length remains
|
|
15
|
+
* authoritative and unchanged.
|
|
16
|
+
*/
|
|
17
|
+
export function calculateFocusBreathingProjection(input) {
|
|
18
|
+
requirePositiveFinite("focalLengthMm", input.focalLengthMm);
|
|
19
|
+
requirePositiveFinite("focusDistanceM", input.focusDistanceM);
|
|
20
|
+
requirePositiveFinite("breathingProjectionScale", input.breathingProjectionScale);
|
|
21
|
+
const thinLens = calculateThinLensImageDistance({
|
|
22
|
+
focalLengthMm: input.focalLengthMm,
|
|
23
|
+
objectDistanceM: input.focusDistanceM
|
|
24
|
+
});
|
|
25
|
+
const idealProjectionDistanceMm = thinLens.value.imageDistanceMm;
|
|
26
|
+
const effectiveProjectionDistanceMm = idealProjectionDistanceMm * input.breathingProjectionScale;
|
|
27
|
+
const objectDistanceMm = input.focusDistanceM * 1000;
|
|
28
|
+
return approximationResult({
|
|
29
|
+
physicalFocalLengthMm: input.focalLengthMm,
|
|
30
|
+
focusDistanceM: input.focusDistanceM,
|
|
31
|
+
idealProjectionDistanceMm,
|
|
32
|
+
effectiveProjectionDistanceMm,
|
|
33
|
+
breathingProjectionScale: input.breathingProjectionScale,
|
|
34
|
+
idealMagnification: thinLens.value.magnification,
|
|
35
|
+
effectiveMagnification: effectiveProjectionDistanceMm / objectDistanceMm
|
|
36
|
+
}, "declared-scale-focus-breathing-projection", "1.0.0", [
|
|
37
|
+
"Base projection is the ideal Gaussian thin-lens image distance for the selected focus distance",
|
|
38
|
+
"The focus-breathing projection scale is supplied explicitly by the caller and is not inferred",
|
|
39
|
+
"One declared scale applies uniformly to the current focus state",
|
|
40
|
+
"Physical focal length remains unchanged and authoritative",
|
|
41
|
+
"The model represents focus-dependent framing/magnification only; distortion, pupil magnification, aberrations, and named-lens calibration are not modeled"
|
|
42
|
+
]);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Calculates one-axis field of view for the generic declared-scale focus-
|
|
46
|
+
* breathing projection and reports the corresponding ideal thin-lens FOV.
|
|
47
|
+
*
|
|
48
|
+
* A breathingProjectionScale of 1 reproduces the current focus-aware
|
|
49
|
+
* thin-lens field-of-view result exactly.
|
|
50
|
+
*/
|
|
51
|
+
export function calculateFocusBreathingFieldOfView(input) {
|
|
52
|
+
requirePositiveFinite("sensorDimensionMm", input.sensorDimensionMm);
|
|
53
|
+
const projection = calculateFocusBreathingProjection(input);
|
|
54
|
+
const idealRadians = 2 *
|
|
55
|
+
Math.atan(input.sensorDimensionMm /
|
|
56
|
+
(2 * projection.value.idealProjectionDistanceMm));
|
|
57
|
+
const effectiveRadians = 2 *
|
|
58
|
+
Math.atan(input.sensorDimensionMm /
|
|
59
|
+
(2 * projection.value.effectiveProjectionDistanceMm));
|
|
60
|
+
const idealDegrees = (idealRadians * 180) / Math.PI;
|
|
61
|
+
const effectiveDegrees = (effectiveRadians * 180) / Math.PI;
|
|
62
|
+
return approximationResult({
|
|
63
|
+
physicalFocalLengthMm: input.focalLengthMm,
|
|
64
|
+
focusDistanceM: input.focusDistanceM,
|
|
65
|
+
sensorDimensionMm: input.sensorDimensionMm,
|
|
66
|
+
breathingProjectionScale: input.breathingProjectionScale,
|
|
67
|
+
idealProjectionDistanceMm: projection.value.idealProjectionDistanceMm,
|
|
68
|
+
effectiveProjectionDistanceMm: projection.value.effectiveProjectionDistanceMm,
|
|
69
|
+
idealDegrees,
|
|
70
|
+
effectiveDegrees,
|
|
71
|
+
deltaDegrees: effectiveDegrees - idealDegrees
|
|
72
|
+
}, "declared-scale-focus-breathing-field-of-view", "1.0.0", [
|
|
73
|
+
...(projection.provenance.assumptions ?? []),
|
|
74
|
+
"Rectilinear field of view is calculated from the declared sensor/capture dimension and effective projection distance"
|
|
75
|
+
]);
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=focus-breathing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-breathing.js","sourceRoot":"","sources":["../../src/optics/focus-breathing.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC,OAAO,EACL,mBAAmB,EAEpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAyDhE;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iCAAiC,CAC/C,KAA6C;IAE7C,qBAAqB,CAAC,eAAe,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAC5D,qBAAqB,CAAC,gBAAgB,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC9D,qBAAqB,CACnB,0BAA0B,EAC1B,KAAK,CAAC,wBAAwB,CAC/B,CAAC;IAEF,MAAM,QAAQ,GAAG,8BAA8B,CAAC;QAC9C,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,eAAe,EAAE,KAAK,CAAC,cAAc;KACtC,CAAC,CAAC;IACH,MAAM,yBAAyB,GAAG,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC;IACjE,MAAM,6BAA6B,GACjC,yBAAyB,GAAG,KAAK,CAAC,wBAAwB,CAAC;IAC7D,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;IAErD,OAAO,mBAAmB,CACxB;QACE,qBAAqB,EAAE,KAAK,CAAC,aAAa;QAC1C,cAAc,EAAE,KAAK,CAAC,c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C3B,UAAU,CAAC,KAAK,CAAC,6BAA6B;QAChD,YAAY;QACZ,gBAAgB;QAChB,YAAY,EAAE,gBAAgB,GAAG,YAAY;KAC9C,EACD,8CAA8C,EAC9C,OAAO,EACP;QACE,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,IAAI,EAAE,CAAC;QAC5C,sHAAsH;KACvH,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type CalculationResult } from "../core/calculation-result.js";
|
|
2
|
+
import type { LensFieldPointMm } from "./radial-distortion.js";
|
|
3
|
+
export interface IlluminationVignettingCoefficients {
|
|
4
|
+
/** Coefficient on normalized radius squared. */
|
|
5
|
+
r2: number;
|
|
6
|
+
/** Coefficient on normalized radius to the fourth power. */
|
|
7
|
+
r4: number;
|
|
8
|
+
/** Coefficient on normalized radius to the sixth power. */
|
|
9
|
+
r6: number;
|
|
10
|
+
}
|
|
11
|
+
export interface IlluminationVignettingProfile {
|
|
12
|
+
/** Physical image-plane radius used to normalize field position, in mm. */
|
|
13
|
+
normalizationRadiusMm: number;
|
|
14
|
+
/** Maximum normalized image-plane radius over which the profile is valid. */
|
|
15
|
+
maximumNormalizedRadius: number;
|
|
16
|
+
/**
|
|
17
|
+
* Generic radial relative-illumination coefficients.
|
|
18
|
+
*
|
|
19
|
+
* Relative linear throughput is:
|
|
20
|
+
* 1 + r2 * rho^2 + r4 * rho^4 + r6 * rho^6
|
|
21
|
+
*
|
|
22
|
+
* where rho is physical image-plane radius / normalizationRadiusMm.
|
|
23
|
+
*/
|
|
24
|
+
coefficients: IlluminationVignettingCoefficients;
|
|
25
|
+
}
|
|
26
|
+
export interface CalculateIlluminationVignettingInput {
|
|
27
|
+
/**
|
|
28
|
+
* Ideal image-plane field position relative to the optical axis, in mm.
|
|
29
|
+
*
|
|
30
|
+
* This slice evaluates throughput from the declared ideal field coordinate;
|
|
31
|
+
* it does not apply or invert geometric distortion.
|
|
32
|
+
*/
|
|
33
|
+
imagePointMm: LensFieldPointMm;
|
|
34
|
+
profile: IlluminationVignettingProfile;
|
|
35
|
+
}
|
|
36
|
+
export interface IlluminationVignetting {
|
|
37
|
+
imagePointMm: LensFieldPointMm;
|
|
38
|
+
normalizedRadius: number;
|
|
39
|
+
/**
|
|
40
|
+
* Multiplicative factor for scene-linear/channel-linear signal.
|
|
41
|
+
*
|
|
42
|
+
* 1 means no attenuation; values are required to remain in (0, 1].
|
|
43
|
+
*/
|
|
44
|
+
linearThroughputFactor: number;
|
|
45
|
+
/** Positive exposure loss relative to the optical axis, in stops. */
|
|
46
|
+
attenuationStops: number;
|
|
47
|
+
profileMinimumThroughputFactor: number;
|
|
48
|
+
profileMaximumThroughputFactor: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Calculates generic field-dependent illumination falloff as a multiplicative
|
|
52
|
+
* linear-light throughput factor.
|
|
53
|
+
*
|
|
54
|
+
* The profile is accepted only when its relative throughput remains strictly
|
|
55
|
+
* positive and never exceeds the optical-axis normalization of 1 throughout
|
|
56
|
+
* the complete declared operating envelope.
|
|
57
|
+
*/
|
|
58
|
+
export declare function calculateIlluminationVignetting(input: CalculateIlluminationVignettingInput): CalculationResult<IlluminationVignetting>;
|
|
59
|
+
//# sourceMappingURL=illumination-vignetting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"illumination-vignetting.d.ts","sourceRoot":"","sources":["../../src/optics/illumination-vignetting.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AAKvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,WAAW,kCAAkC;IACjD,gDAAgD;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,2DAA2D;IAC3D,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,6BAA6B;IAC5C,2EAA2E;IAC3E,qBAAqB,EAAE,MAAM,CAAC;IAC9B,6EAA6E;IAC7E,uBAAuB,EAAE,MAAM,CAAC;IAChC;;;;;;;OAOG;IACH,YAAY,EAAE,kCAAkC,CAAC;CAClD;AAED,MAAM,WAAW,oCAAoC;IACnD;;;;;OAKG;IACH,YAAY,EAAE,gBAAgB,CAAC;IAC/B,OAAO,EAAE,6BAA6B,CAAC;CACxC;AAED,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,gBAAgB,CAAC;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAC/B,qEAAqE;IACrE,gBAAgB,EAAE,MAAM,CAAC;IACzB,8BAA8B,EAAE,MAAM,CAAC;IACvC,8BAA8B,EAAE,MAAM,CAAC;CACxC;AA0HD;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,oCAAoC,GAC1C,iBAAiB,CAAC,sBAAsB,CAAC,CAsC3C"}
|