@photivra/engine 2.11.1 → 2.12.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 +18 -1
- package/CITATION.cff +1 -1
- package/NODE_SUPPORT.md +2 -4
- package/README.md +6 -6
- package/SECURITY.md +1 -1
- package/dist/core/version.d.ts +1 -1
- package/dist/core/version.js +1 -1
- package/dist/core/version.js.map +1 -1
- package/dist/facade/simulate-capture.d.ts +76 -3
- package/dist/facade/simulate-capture.js +79 -10
- package/dist/facade/simulate-capture.js.map +1 -1
- package/dist/facade/simulate-display-view.js +2 -2
- package/dist/facade/simulate-display-view.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/docs/API_REFERENCE.md +3 -1
- package/docs/QUICK_START.md +48 -2
- package/docs/USAGE.md +29 -1
- package/docs/api/core-version.md +1 -1
- package/docs/api/exports.json +12 -2
- package/docs/api/facade-simulate-capture.md +72 -5
- package/package.json +1 -1
package/docs/api/exports.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"packageVersion": "2.
|
|
3
|
-
"engineApiVersion": "2.
|
|
2
|
+
"packageVersion": "2.12.0",
|
|
3
|
+
"engineApiVersion": "2.12.0",
|
|
4
4
|
"exports": [
|
|
5
5
|
{
|
|
6
6
|
"name": "AbsoluteUncertaintyEstimate",
|
|
@@ -8127,6 +8127,16 @@
|
|
|
8127
8127
|
"source": "src/facade/simulate-capture.ts",
|
|
8128
8128
|
"kind": "type"
|
|
8129
8129
|
},
|
|
8130
|
+
{
|
|
8131
|
+
"name": "SimulateCaptureAutoIsoAfterMaximum",
|
|
8132
|
+
"source": "src/facade/simulate-capture.ts",
|
|
8133
|
+
"kind": "type"
|
|
8134
|
+
},
|
|
8135
|
+
{
|
|
8136
|
+
"name": "SimulateCaptureAutoIsoReport",
|
|
8137
|
+
"source": "src/facade/simulate-capture.ts",
|
|
8138
|
+
"kind": "type"
|
|
8139
|
+
},
|
|
8130
8140
|
{
|
|
8131
8141
|
"name": "SimulateCaptureBorderHandling",
|
|
8132
8142
|
"source": "src/facade/simulate-capture.ts",
|
|
@@ -21,8 +21,10 @@ export interface DisplayViewResult {
|
|
|
21
21
|
*/
|
|
22
22
|
view: { width: number; height: number; frameWidth: number; frameHeight: number; scaleX: number; scaleY: number; samplesPerAxis: number;
|
|
23
23
|
region?: { x: number; y: number; width: number; height: number } };
|
|
24
|
-
/** The resolved exposure of the capture this view shows. */
|
|
25
|
-
exposure: { mode: SimulateCaptureExposureMode; settings: { fNumber: number; shutterSeconds: number; iso: number }; ev100: number
|
|
24
|
+
/** The resolved exposure of the capture this view shows; `standardExposureDeviationStops` as in {@link SimulateCaptureResult}. */
|
|
25
|
+
exposure: { mode: SimulateCaptureExposureMode; settings: { fNumber: number; shutterSeconds: number; iso: number }; ev100: number; standardExposureDeviationStops: number | null;
|
|
26
|
+
/** #516: as in the capture result. */
|
|
27
|
+
isoControl: "manual" | "automatic"; autoIso?: SimulateCaptureAutoIsoReport };
|
|
26
28
|
scene: SimulateCaptureResult["scene"];
|
|
27
29
|
/**
|
|
28
30
|
* Work done: real pixels sampled, real-site expectations evaluated, scene queries, display pixels sampled in full (detail) or with
|
|
@@ -53,7 +55,9 @@ export interface IdealReferenceResult {
|
|
|
53
55
|
engineApiVersion: string;
|
|
54
56
|
image: { width: number; height: number; format: SimulateCaptureOutputFormat; samples: Uint8Array | Uint16Array; png?: Uint8Array; colorEncoding?: SimulateCaptureColorEncoding };
|
|
55
57
|
/** The resolved exposure of the capture this reference matches. */
|
|
56
|
-
exposure: { mode: SimulateCaptureExposureMode; settings: { fNumber: number; shutterSeconds: number; iso: number }; ev100: number
|
|
58
|
+
exposure: { mode: SimulateCaptureExposureMode; settings: { fNumber: number; shutterSeconds: number; iso: number }; ev100: number;
|
|
59
|
+
/** #516: as in the capture result. */
|
|
60
|
+
isoControl: "manual" | "automatic"; autoIso?: SimulateCaptureAutoIsoReport };
|
|
57
61
|
scene: SimulateCaptureResult["scene"];
|
|
58
62
|
region?: { x: number; y: number; width: number; height: number; frameWidth: number; frameHeight: number };
|
|
59
63
|
diagnostics: { sampleCount: number; timingsMs: { reference: number; total: number } };
|
|
@@ -163,6 +167,45 @@ export interface SimulateCaptureAssumption {
|
|
|
163
167
|
}
|
|
164
168
|
```
|
|
165
169
|
|
|
170
|
+
## SimulateCaptureAutoIsoAfterMaximum
|
|
171
|
+
|
|
172
|
+
#516: what aperture priority does with Auto ISO once the ISO reaches the body's Auto ISO maximum and the exposure is
|
|
173
|
+
still under the meter target: `"allow-slower-shutter"` lengthens the shutter past the slowest preferred shutter to reach
|
|
174
|
+
the target; `"hold-preferred-shutter"` keeps the preferred shutter and leaves the exposure under target.
|
|
175
|
+
|
|
176
|
+
```ts
|
|
177
|
+
export type SimulateCaptureAutoIsoAfterMaximum = "allow-slower-shutter" | "hold-preferred-shutter";
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## SimulateCaptureAutoIsoReport
|
|
181
|
+
|
|
182
|
+
#516: how Auto ISO chose the ISO (`exposure.iso: "auto"`), reported in the result's `exposure.autoIso`. The full
|
|
183
|
+
resolver output stays in the capture's `exposure.resolution`.
|
|
184
|
+
|
|
185
|
+
```ts
|
|
186
|
+
export interface SimulateCaptureAutoIsoReport {
|
|
187
|
+
/** The ISO the meter target asked for at the resolved aperture and shutter, before the Auto ISO range and the ISO grid. */
|
|
188
|
+
idealIsoBeforeConstraints: number;
|
|
189
|
+
/** The Auto ISO range the ISO was chosen in: the body's Auto ISO bounds, or its ISO range when it declares none (the tiers: ISO 100 to their maximum). */
|
|
190
|
+
autoIsoMinimum: number;
|
|
191
|
+
autoIsoMaximum: number;
|
|
192
|
+
/** Whether the ISO was held at an end of the Auto ISO range. */
|
|
193
|
+
clamped: false | "minimum" | "maximum";
|
|
194
|
+
/**
|
|
195
|
+
* The constraint that limited the resolved exposure: the resolver's `targetResidual.limitingConstraint`, for example
|
|
196
|
+
* `"iso-maximum"` (the exposure stays under target at the Auto ISO maximum), `"iso-grid-quantization"` (the nearest
|
|
197
|
+
* selectable ISO) or `"none"` (on target).
|
|
198
|
+
*/
|
|
199
|
+
limitingConstraint: ExposureResolutionConstraint;
|
|
200
|
+
/** The resolver's residual, log2(target / achieved exposure), in stops: positive when the exposure is under the meter target, negative when over it. */
|
|
201
|
+
residualStops: number;
|
|
202
|
+
/** Aperture priority only: the policy and slowest preferred shutter used, and whether the slower-shutter fallback ran. */
|
|
203
|
+
afterMaximumIso?: SimulateCaptureAutoIsoAfterMaximum;
|
|
204
|
+
slowestPreferredShutterSeconds?: number;
|
|
205
|
+
afterMaximumIsoFallbackUsed?: boolean;
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
166
209
|
## SimulateCaptureBorderHandling
|
|
167
210
|
|
|
168
211
|
`margin` renders extra native sites around the output, as far as the kernel reaches. `mirror` renders
|
|
@@ -338,8 +381,21 @@ export interface SimulateCaptureOptions {
|
|
|
338
381
|
exposure?: {
|
|
339
382
|
/** Default "manual". */
|
|
340
383
|
mode?: SimulateCaptureExposureMode;
|
|
341
|
-
/**
|
|
342
|
-
|
|
384
|
+
/**
|
|
385
|
+
* Default 100. #516: `"auto"` lets the body's Auto ISO choose the ISO from the meter target, within its Auto ISO range
|
|
386
|
+
* (the tiers: ISO 100 to their maximum), in every mode: manual keeps the aperture and shutter; aperture priority keeps the
|
|
387
|
+
* aperture and follows `autoIso`; shutter priority picks the aperture at the lowest Auto ISO (no wider than the target
|
|
388
|
+
* needs, so at most the widest) and raises the ISO for the rest; program picks the program line at the lowest Auto ISO and
|
|
389
|
+
* raises the ISO beyond the line's end. The result reports the ISO in `exposure.settings.iso` and how it was chosen in
|
|
390
|
+
* `exposure.autoIso`.
|
|
391
|
+
*/
|
|
392
|
+
iso?: number | "auto";
|
|
393
|
+
/**
|
|
394
|
+
* #516: aperture priority with `iso: "auto"` only (required there). The shutter gets as long as
|
|
395
|
+
* `slowestPreferredShutterSeconds` (seconds, within the body's shutter range) at the lowest Auto ISO; beyond it the ISO
|
|
396
|
+
* rises; at the Auto ISO maximum `afterMaximumIso` decides (default `"allow-slower-shutter"`).
|
|
397
|
+
*/
|
|
398
|
+
autoIso?: { slowestPreferredShutterSeconds: number; afterMaximumIso?: SimulateCaptureAutoIsoAfterMaximum };
|
|
343
399
|
/** Shutter for manual and shutter-priority modes. Default 1/125 s. */
|
|
344
400
|
shutterSeconds?: number;
|
|
345
401
|
/** Exposure compensation applied to the meter target, in stops. Default 0. */
|
|
@@ -548,7 +604,18 @@ export interface SimulateCaptureResult {
|
|
|
548
604
|
settings: { fNumber: number; shutterSeconds: number; iso: number };
|
|
549
605
|
/** Exposure value at ISO 100 of the settings, log2(N²/t). */
|
|
550
606
|
ev100: number;
|
|
607
|
+
/** #516: `"automatic"` when the request asked for `iso: "auto"`, else `"manual"`. */
|
|
608
|
+
isoControl: "manual" | "automatic";
|
|
609
|
+
/** #516: present with `iso: "auto"`: how Auto ISO chose `settings.iso` and what limited it. */
|
|
610
|
+
autoIso?: SimulateCaptureAutoIsoReport;
|
|
551
611
|
meteredSceneLuminanceCdPerSquareMeter: number;
|
|
612
|
+
/**
|
|
613
|
+
* #515: deviation, in stops, of the exposure used from the CIPA DC-004-2020 standard exposure for the metered luminance L:
|
|
614
|
+
* log2(N²/t) − log2(0.65·L·S/10). Positive is darker than the standard exposure (under), negative brighter (over). In an
|
|
615
|
+
* automatic mode it is the compensation with the opposite sign plus any step or limit the resolver hit. Finite, or null when
|
|
616
|
+
* the metered luminance is 0 (a black scene has no standard exposure).
|
|
617
|
+
*/
|
|
618
|
+
standardExposureDeviationStops: number | null;
|
|
552
619
|
/** Full output of the existing exposure-mode resolver. */
|
|
553
620
|
resolution: unknown;
|
|
554
621
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@photivra/engine",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Scientific TypeScript engine for camera optics, exposure, focus, motion, sensor sampling, diffraction, and digital imaging calculations.",
|
|
6
6
|
"type": "module",
|