@depz/camera-sdk 0.0.0-stage → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +136 -2
- package/dist/calibration.d.ts +168 -0
- package/dist/calibration.js +251 -0
- package/dist/cameras.d.ts +91 -0
- package/dist/cameras.js +118 -0
- package/dist/errors.d.ts +25 -0
- package/dist/errors.js +71 -0
- package/dist/frames.d.ts +108 -0
- package/dist/frames.js +184 -0
- package/dist/generated/constants.g.d.ts +158 -0
- package/dist/generated/constants.g.js +171 -0
- package/dist/generated/error_code.g.d.ts +86 -0
- package/dist/generated/error_code.g.js +133 -0
- package/dist/generated/records.g.d.ts +708 -0
- package/dist/generated/records.g.js +20 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +81 -0
- package/dist/inference.d.ts +175 -0
- package/dist/inference.js +223 -0
- package/dist/native.d.ts +136 -0
- package/dist/native.js +38 -0
- package/dist/pipeline.d.ts +225 -0
- package/dist/pipeline.js +384 -0
- package/dist/settings.d.ts +64 -0
- package/dist/settings.js +154 -0
- package/dist/sources.d.ts +137 -0
- package/dist/sources.js +229 -0
- package/package.json +40 -4
package/dist/frames.js
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RawFrame = exports.FramePacket = exports.ImageView = void 0;
|
|
4
|
+
exports.imageOf = imageOf;
|
|
5
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
// Frames: a pipeline's FramePacket and a source's RawFrame, their images (ImageView: typed arrays
|
|
7
|
+
// over the frame's own memory, no copy; each holds the frame until it is garbage collected) and
|
|
8
|
+
// their timing (FrameTiming).
|
|
9
|
+
const C = require("./generated/constants.g");
|
|
10
|
+
const calibration_1 = require("./calibration");
|
|
11
|
+
const native_1 = require("./native");
|
|
12
|
+
const FORMATS = { [C.DEPZ_PIX_BGR8]: "bgr8", [C.DEPZ_PIX_F32]: "f32", [C.DEPZ_PIX_XYZ_F32]: "xyz_f32" };
|
|
13
|
+
const CHANNELS = { bgr8: 3, f32: 1, xyz_f32: 3 };
|
|
14
|
+
const KINDS = {
|
|
15
|
+
raw: C.DEPZ_IMAGE_RAW, left: C.DEPZ_IMAGE_LEFT, right: C.DEPZ_IMAGE_RIGHT,
|
|
16
|
+
rectified_left: C.DEPZ_IMAGE_RECTIFIED_LEFT, rectified_right: C.DEPZ_IMAGE_RECTIFIED_RIGHT,
|
|
17
|
+
disparity: C.DEPZ_IMAGE_DISPARITY, depth: C.DEPZ_IMAGE_DEPTH, point_cloud: C.DEPZ_IMAGE_POINT_CLOUD,
|
|
18
|
+
};
|
|
19
|
+
/** One image of a frame: rows of strideBytes over the frame's memory (no copy). */
|
|
20
|
+
class ImageView {
|
|
21
|
+
width;
|
|
22
|
+
height;
|
|
23
|
+
strideBytes;
|
|
24
|
+
format;
|
|
25
|
+
/** The frame's bytes, height x strideBytes (the frame lives while this buffer does). */
|
|
26
|
+
buffer;
|
|
27
|
+
/** @internal */
|
|
28
|
+
constructor(width, height, strideBytes, format, buffer) {
|
|
29
|
+
this.width = width;
|
|
30
|
+
this.height = height;
|
|
31
|
+
this.strideBytes = strideBytes;
|
|
32
|
+
this.format = format;
|
|
33
|
+
this.buffer = buffer;
|
|
34
|
+
}
|
|
35
|
+
/** Values per pixel: 3 (BGR, XYZ) or 1. */
|
|
36
|
+
get channels() {
|
|
37
|
+
return CHANNELS[this.format];
|
|
38
|
+
}
|
|
39
|
+
/** Bytes per pixel. */
|
|
40
|
+
get bytesPerPixel() {
|
|
41
|
+
return this.format === "bgr8" ? 3 : 4 * this.channels;
|
|
42
|
+
}
|
|
43
|
+
/** The bytes, rows of strideBytes (a view, no copy). */
|
|
44
|
+
get bytes() {
|
|
45
|
+
return new Uint8Array(this.buffer, 0, this.strideBytes * this.height);
|
|
46
|
+
}
|
|
47
|
+
/** The pixels row by row without the rows' padding: a view when the rows are packed, else a copy.
|
|
48
|
+
* Uint8Array for BGR8, Float32Array for the float images. */
|
|
49
|
+
pixels() {
|
|
50
|
+
const row = this.width * this.bytesPerPixel;
|
|
51
|
+
const packed = this.strideBytes === row ? this.bytes : this.packedCopy(row);
|
|
52
|
+
return this.format === "bgr8"
|
|
53
|
+
? packed
|
|
54
|
+
: new Float32Array(packed.buffer, packed.byteOffset, (row * this.height) / 4);
|
|
55
|
+
}
|
|
56
|
+
packedCopy(row) {
|
|
57
|
+
const out = new Uint8Array(row * this.height);
|
|
58
|
+
const src = this.bytes;
|
|
59
|
+
for (let y = 0; y < this.height; y++)
|
|
60
|
+
out.set(src.subarray(y * this.strideBytes, y * this.strideBytes + row), y * row);
|
|
61
|
+
return out;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.ImageView = ImageView;
|
|
65
|
+
/** The image of a kind, or null when the frame does not carry that stream. Internal. */
|
|
66
|
+
function imageOf(frame, kind) {
|
|
67
|
+
const im = native_1.native.depz_frame_image(frame, KINDS[kind]);
|
|
68
|
+
if (im === null)
|
|
69
|
+
return null;
|
|
70
|
+
return new ImageView(im.width, im.height, im.strideBytes, FORMATS[im.format], im.buffer);
|
|
71
|
+
}
|
|
72
|
+
function timingOf(t) {
|
|
73
|
+
if (t === null)
|
|
74
|
+
return null;
|
|
75
|
+
const domains = {
|
|
76
|
+
[C.DEPZ_CLOCK_LINUX_MONOTONIC]: "linux_monotonic", [C.DEPZ_CLOCK_WINDOWS_QPC]: "windows_qpc", [C.DEPZ_CLOCK_MACOS_MACH]: "macos_mach",
|
|
77
|
+
};
|
|
78
|
+
const sources = { [C.DEPZ_TIME_DEVICE_CLOCK]: "device_clock", [C.DEPZ_TIME_ARRIVAL]: "arrival" };
|
|
79
|
+
return Object.freeze({
|
|
80
|
+
exposureStartNs: t.exposureStartNs, exposureEndNs: t.exposureEndNs, midExposureNs: t.midExposureNs,
|
|
81
|
+
exposureNs: t.exposureNs, rowTimeNs: t.rowTimeNs, timestampUncertaintyNs: t.timestampUncertaintyNs,
|
|
82
|
+
exposureUncertaintyNs: t.exposureUncertaintyNs, clockDomain: domains[t.clockDomain] ?? "unknown",
|
|
83
|
+
timeSource: sources[t.timeSource] ?? "unknown", utcOffsetNs: t.hasUtcOffset ? t.utcOffsetNs : null, rows: t.rows,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/** What a frame shares, a pipeline's or a source's. */
|
|
87
|
+
class FrameBase {
|
|
88
|
+
/** @internal */
|
|
89
|
+
_h;
|
|
90
|
+
/** @internal */
|
|
91
|
+
_i;
|
|
92
|
+
/** @internal */
|
|
93
|
+
constructor(handle) {
|
|
94
|
+
this._h = handle;
|
|
95
|
+
this._i = native_1.native.depz_frame_info(handle);
|
|
96
|
+
}
|
|
97
|
+
/** Source-local time of the capture, µs. */
|
|
98
|
+
get ptsUs() {
|
|
99
|
+
return this._i.ptsUs;
|
|
100
|
+
}
|
|
101
|
+
/** The frame's index in a recording; null live. */
|
|
102
|
+
get sourceFrameIdx() {
|
|
103
|
+
return this._i.sourceFrameIndex < 0 ? null : this._i.sourceFrameIndex;
|
|
104
|
+
}
|
|
105
|
+
/** When its rows were exposed; null for a frame without timing. */
|
|
106
|
+
get timing() {
|
|
107
|
+
return timingOf(native_1.native.depz_frame_timing(this._h));
|
|
108
|
+
}
|
|
109
|
+
/** The image of a kind; null when the frame does not carry it. */
|
|
110
|
+
image(kind) {
|
|
111
|
+
return imageOf(this._h, kind);
|
|
112
|
+
}
|
|
113
|
+
/** Releases the frame's reference now (its images stay valid while their buffers live). */
|
|
114
|
+
release() {
|
|
115
|
+
this._h.release();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/** One frame of a pipeline (the reference's FramePacket). */
|
|
119
|
+
class FramePacket extends FrameBase {
|
|
120
|
+
/** The pipeline's counter. */
|
|
121
|
+
get frameNumber() {
|
|
122
|
+
return this._i.frameNumber;
|
|
123
|
+
}
|
|
124
|
+
get left() {
|
|
125
|
+
return this.image("left");
|
|
126
|
+
}
|
|
127
|
+
get right() {
|
|
128
|
+
return this.image("right");
|
|
129
|
+
}
|
|
130
|
+
get rectifiedLeft() {
|
|
131
|
+
return this.image("rectified_left");
|
|
132
|
+
}
|
|
133
|
+
get rectifiedRight() {
|
|
134
|
+
return this.image("rectified_right");
|
|
135
|
+
}
|
|
136
|
+
get disparity() {
|
|
137
|
+
return this.image("disparity");
|
|
138
|
+
}
|
|
139
|
+
get depth() {
|
|
140
|
+
return this.image("depth");
|
|
141
|
+
}
|
|
142
|
+
get pointCloud() {
|
|
143
|
+
return this.image("point_cloud");
|
|
144
|
+
}
|
|
145
|
+
/** The eye depth and the point cloud are in. */
|
|
146
|
+
get eye() {
|
|
147
|
+
return (0, calibration_1.eyeOf)(this._i.eye);
|
|
148
|
+
}
|
|
149
|
+
/** The pipeline's disparity offset. */
|
|
150
|
+
get rightShiftPx() {
|
|
151
|
+
return this._i.rightShiftPx;
|
|
152
|
+
}
|
|
153
|
+
get isSnapshot() {
|
|
154
|
+
return this._i.isSnapshot !== 0;
|
|
155
|
+
}
|
|
156
|
+
/** The part of the rectified frame its maps cover (fractions); null for the whole frame. */
|
|
157
|
+
get roi() {
|
|
158
|
+
const i = this._i;
|
|
159
|
+
return i.hasRoi ? Object.freeze({ x: i.roiX, y: i.roiY, w: i.roiW, h: i.roiH }) : null;
|
|
160
|
+
}
|
|
161
|
+
/** The intrinsics of its images; null for a source without a calibration. */
|
|
162
|
+
get intrinsics() {
|
|
163
|
+
const i = this._i;
|
|
164
|
+
return i.hasIntrinsics ? Object.freeze({ fx: i.intrinsicsFx, fy: i.intrinsicsFy, cx: i.intrinsicsCx, cy: i.intrinsicsCy }) : null;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
exports.FramePacket = FramePacket;
|
|
168
|
+
/** One frame grabbed from a source (the reference's RawFrame). */
|
|
169
|
+
class RawFrame extends FrameBase {
|
|
170
|
+
/** The grab counter (1 for the first grab). */
|
|
171
|
+
get sequence() {
|
|
172
|
+
return this._i.sequence;
|
|
173
|
+
}
|
|
174
|
+
/** The decoded picture (side by side for stereo). */
|
|
175
|
+
get picture() {
|
|
176
|
+
return this.image("raw");
|
|
177
|
+
}
|
|
178
|
+
/** The bytes as the camera sent them (MJPEG, YUYV), no copy; null when none. */
|
|
179
|
+
get payload() {
|
|
180
|
+
const b = native_1.native.depz_frame_payload(this._h);
|
|
181
|
+
return b === null ? null : new Uint8Array(b);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
exports.RawFrame = RawFrame;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
export declare const DEPZ_API_VERSION = 1;
|
|
2
|
+
export declare const DEPZ_MAX_INPUT_SIZES = 64;
|
|
3
|
+
export declare const DEPZ_MAX_REGION_SIZES = 64;
|
|
4
|
+
export declare const DEPZ_OK = 0;
|
|
5
|
+
export declare const DEPZ_E_ABORTED = 1;
|
|
6
|
+
export declare const DEPZ_E_DOWNLOAD_FAILED = 2;
|
|
7
|
+
export declare const DEPZ_E_LEGACY_CAMERA = 3;
|
|
8
|
+
export declare const DEPZ_E_INVALID_SERIAL = 4;
|
|
9
|
+
export declare const DEPZ_E_UNRECOGNISED_CAMERA = 5;
|
|
10
|
+
export declare const DEPZ_E_CAMERA_NOT_FOUND = 6;
|
|
11
|
+
export declare const DEPZ_E_CAMERA_BUSY = 7;
|
|
12
|
+
export declare const DEPZ_E_CAMERA_PERMISSION_DENIED = 8;
|
|
13
|
+
export declare const DEPZ_E_NO_CALIBRATION = 9;
|
|
14
|
+
export declare const DEPZ_E_UNSUPPORTED_SCHEME = 10;
|
|
15
|
+
export declare const DEPZ_E_UNKNOWN_CAMERA_FAMILY = 11;
|
|
16
|
+
export declare const DEPZ_E_USB_BANDWIDTH = 12;
|
|
17
|
+
export declare const DEPZ_E_NO_FRAMES = 13;
|
|
18
|
+
export declare const DEPZ_E_CAPTURE_STOPPED = 14;
|
|
19
|
+
export declare const DEPZ_E_RECORDING_NEEDS_MIGRATION = 15;
|
|
20
|
+
export declare const DEPZ_E_RECALIBRATION_DEFERRED = 16;
|
|
21
|
+
export declare const DEPZ_E_MODEL_NEEDS_STEREO = 17;
|
|
22
|
+
export declare const DEPZ_E_RECORDING_UNSUPPORTED = 18;
|
|
23
|
+
export declare const DEPZ_E_MODEL_NOT_OFFERED = 19;
|
|
24
|
+
export declare const DEPZ_E_MODE_NOT_OFFERED = 20;
|
|
25
|
+
export declare const DEPZ_E_CALIBRATION_MALFORMED = 21;
|
|
26
|
+
export declare const DEPZ_E_CALIBRATION_WEB = 22;
|
|
27
|
+
export declare const DEPZ_E_FLASH_DEVICE = 23;
|
|
28
|
+
export declare const DEPZ_E_FIRMWARE_IMAGE = 24;
|
|
29
|
+
export declare const DEPZ_E_FLASH_ABORTED = 25;
|
|
30
|
+
export declare const DEPZ_E_UNAVAILABLE = 26;
|
|
31
|
+
export declare const DEPZ_E_UNSUPPORTED_PLATFORM = 27;
|
|
32
|
+
export declare const DEPZ_E_INVALID_ARGUMENT = 28;
|
|
33
|
+
export declare const DEPZ_E_NOT_FOUND = 29;
|
|
34
|
+
export declare const DEPZ_E_IO_ERROR = 30;
|
|
35
|
+
export declare const DEPZ_E_TIMEOUT = 31;
|
|
36
|
+
export declare const DEPZ_E_INTERNAL = 32;
|
|
37
|
+
export declare const DEPZ_E_INVALID_STATE = 33;
|
|
38
|
+
export declare const DEPZ_E_BUSY = 34;
|
|
39
|
+
export declare const DEPZ_E_NOT_IMPLEMENTED = 35;
|
|
40
|
+
export declare const DEPZ_E_UNSUPPORTED_VERSION = 36;
|
|
41
|
+
export declare const DEPZ_E_END_OF_STREAM = 37;
|
|
42
|
+
export declare const DEPZ_E_ENGINE_BUILD_FAILED = 38;
|
|
43
|
+
export declare const DEPZ_E_INVALID_DATA = 39;
|
|
44
|
+
export declare const DEPZ_E_CALIBRATION_FAILED = 40;
|
|
45
|
+
export declare const DEPZ_LOG_DEBUG = 10;
|
|
46
|
+
export declare const DEPZ_LOG_INFO = 20;
|
|
47
|
+
export declare const DEPZ_LOG_WARNING = 30;
|
|
48
|
+
export declare const DEPZ_LOG_ERROR = 40;
|
|
49
|
+
export declare const DEPZ_SWITCH_DEFAULT = 0;
|
|
50
|
+
export declare const DEPZ_SWITCH_ON = 1;
|
|
51
|
+
export declare const DEPZ_SWITCH_OFF = 2;
|
|
52
|
+
export declare const DEPZ_RECAL_AUTO = 0;
|
|
53
|
+
export declare const DEPZ_RECAL_OFF = 1;
|
|
54
|
+
export declare const DEPZ_RECAL_MANUAL = 2;
|
|
55
|
+
export declare const DEPZ_RECAL_CONTINUOUS = 3;
|
|
56
|
+
export declare const DEPZ_TERM_PITCH = 1;
|
|
57
|
+
export declare const DEPZ_TERM_ROLL = 2;
|
|
58
|
+
export declare const DEPZ_TERM_YAW = 4;
|
|
59
|
+
export declare const DEPZ_TERM_TY = 8;
|
|
60
|
+
export declare const DEPZ_CAMERA_USABLE = 0;
|
|
61
|
+
export declare const DEPZ_CAMERA_NEEDS_UPDATE = 1;
|
|
62
|
+
export declare const DEPZ_CAMERA_UNUSABLE = 2;
|
|
63
|
+
export declare const DEPZ_CAMERA_BUSY = 3;
|
|
64
|
+
export declare const DEPZ_CALIBRATION_SOURCE_NONE = 0;
|
|
65
|
+
export declare const DEPZ_CALIBRATION_SOURCE_NAME = 1;
|
|
66
|
+
export declare const DEPZ_CALIBRATION_SOURCE_FLASH = 2;
|
|
67
|
+
export declare const DEPZ_CALIBRATION_SOURCE_WEB = 3;
|
|
68
|
+
export declare const DEPZ_PIX_BGR8 = 1;
|
|
69
|
+
export declare const DEPZ_PIX_F32 = 2;
|
|
70
|
+
export declare const DEPZ_PIX_XYZ_F32 = 3;
|
|
71
|
+
export declare const DEPZ_IMAGE_RAW = 1;
|
|
72
|
+
export declare const DEPZ_IMAGE_LEFT = 2;
|
|
73
|
+
export declare const DEPZ_IMAGE_RIGHT = 3;
|
|
74
|
+
export declare const DEPZ_IMAGE_RECTIFIED_LEFT = 4;
|
|
75
|
+
export declare const DEPZ_IMAGE_RECTIFIED_RIGHT = 5;
|
|
76
|
+
export declare const DEPZ_IMAGE_DISPARITY = 6;
|
|
77
|
+
export declare const DEPZ_IMAGE_DEPTH = 7;
|
|
78
|
+
export declare const DEPZ_IMAGE_POINT_CLOUD = 8;
|
|
79
|
+
export declare const DEPZ_IMAGE_CANVAS_LEFT = 9;
|
|
80
|
+
export declare const DEPZ_IMAGE_CANVAS_RIGHT = 10;
|
|
81
|
+
export declare const DEPZ_EYE_DEFAULT = 0;
|
|
82
|
+
export declare const DEPZ_EYE_LEFT = 1;
|
|
83
|
+
export declare const DEPZ_EYE_RIGHT = 2;
|
|
84
|
+
export declare const DEPZ_CLOCK_LINUX_MONOTONIC = 1;
|
|
85
|
+
export declare const DEPZ_CLOCK_WINDOWS_QPC = 2;
|
|
86
|
+
export declare const DEPZ_CLOCK_MACOS_MACH = 3;
|
|
87
|
+
export declare const DEPZ_TIME_DEVICE_CLOCK = 1;
|
|
88
|
+
export declare const DEPZ_TIME_ARRIVAL = 2;
|
|
89
|
+
export declare const DEPZ_REPLAY_REALTIME = 0;
|
|
90
|
+
export declare const DEPZ_REPLAY_EVERY_FRAME = 1;
|
|
91
|
+
export declare const DEPZ_STREAM_RAW = 1;
|
|
92
|
+
export declare const DEPZ_STREAM_RECTIFIED = 2;
|
|
93
|
+
export declare const DEPZ_STREAM_DISPARITY = 4;
|
|
94
|
+
export declare const DEPZ_STREAM_DEPTH = 8;
|
|
95
|
+
export declare const DEPZ_STREAM_CLOUD = 16;
|
|
96
|
+
export declare const DEPZ_DROP_OLDEST = 0;
|
|
97
|
+
export declare const DEPZ_DROP_BLOCK = 1;
|
|
98
|
+
export declare const DEPZ_DROP_SOURCE_DEFAULT = 2;
|
|
99
|
+
export declare const DEPZ_PROFILE_DEFAULT = 0;
|
|
100
|
+
export declare const DEPZ_PROFILE_NORMAL = 1;
|
|
101
|
+
export declare const DEPZ_PROFILE_LIGHT = 2;
|
|
102
|
+
export declare const DEPZ_SCOPE_PIPELINE = 1;
|
|
103
|
+
export declare const DEPZ_SCOPE_INFERENCE = 2;
|
|
104
|
+
export declare const DEPZ_SCOPE_CALIBRATION = 3;
|
|
105
|
+
export declare const DEPZ_SCOPE_CAMERA = 4;
|
|
106
|
+
export declare const DEPZ_SCOPE_FILTER = 5;
|
|
107
|
+
export declare const DEPZ_SCOPE_RECALIBRATION = 6;
|
|
108
|
+
export declare const DEPZ_SCOPE_STAGE = 7;
|
|
109
|
+
export declare const DEPZ_CONTROL_INT = 1;
|
|
110
|
+
export declare const DEPZ_CONTROL_FLOAT = 2;
|
|
111
|
+
export declare const DEPZ_CONTROL_BOOL = 3;
|
|
112
|
+
export declare const DEPZ_CONTROL_ENUM = 4;
|
|
113
|
+
export declare const DEPZ_RECAL_STATE_UNAVAILABLE = 0;
|
|
114
|
+
export declare const DEPZ_RECAL_STATE_OFF = 1;
|
|
115
|
+
export declare const DEPZ_RECAL_STATE_STARTING = 2;
|
|
116
|
+
export declare const DEPZ_RECAL_STATE_NO_TEXTURE = 3;
|
|
117
|
+
export declare const DEPZ_RECAL_STATE_ALIGNED = 4;
|
|
118
|
+
export declare const DEPZ_RECAL_STATE_ADJUSTING = 5;
|
|
119
|
+
export declare const DEPZ_RECAL_STATE_DRIFT = 6;
|
|
120
|
+
export declare const DEPZ_RECAL_STATE_MISALIGNED = 7;
|
|
121
|
+
export declare const DEPZ_GRADE_UNKNOWN = 0;
|
|
122
|
+
export declare const DEPZ_GRADE_GOOD = 1;
|
|
123
|
+
export declare const DEPZ_GRADE_FAIR = 2;
|
|
124
|
+
export declare const DEPZ_GRADE_POOR = 3;
|
|
125
|
+
export declare const DEPZ_RECAL_EVENT_AUTO = 1;
|
|
126
|
+
export declare const DEPZ_RECAL_EVENT_MANUAL = 2;
|
|
127
|
+
export declare const DEPZ_RECAL_EVENT_RESTORE = 3;
|
|
128
|
+
export declare const DEPZ_RECAL_EVENT_REFERENCE = 4;
|
|
129
|
+
export declare const DEPZ_RECAL_EVENT_RESET = 5;
|
|
130
|
+
export declare const DEPZ_RECAL_EVENT_ROLLBACK = 6;
|
|
131
|
+
export declare const DEPZ_CANVAS_EYE_LEFT = 1;
|
|
132
|
+
export declare const DEPZ_CANVAS_EYE_RIGHT = 2;
|
|
133
|
+
export declare const DEPZ_DEFAULT_FOR_NONE = 0;
|
|
134
|
+
export declare const DEPZ_DEFAULT_FOR_STEREO = 1;
|
|
135
|
+
export declare const DEPZ_DEFAULT_FOR_MONO = 2;
|
|
136
|
+
export declare const DEPZ_ENGINE_CLASS_UNKNOWN = 0;
|
|
137
|
+
export declare const DEPZ_ENGINE_CLASS_CPU = 1;
|
|
138
|
+
export declare const DEPZ_ENGINE_CLASS_IGPU = 2;
|
|
139
|
+
export declare const DEPZ_ENGINE_CLASS_NVIDIA = 3;
|
|
140
|
+
export declare const DEPZ_INPUT_SIZE_LISTED = 0;
|
|
141
|
+
export declare const DEPZ_INPUT_SIZE_ANY = 1;
|
|
142
|
+
export declare const DEPZ_CPUS_DEFAULT = 0;
|
|
143
|
+
export declare const DEPZ_CPUS_BIG = 1;
|
|
144
|
+
export declare const DEPZ_CPUS_LITTLE = 2;
|
|
145
|
+
export declare const DEPZ_CPUS_ALL = 3;
|
|
146
|
+
export declare const DEPZ_CPUS_LIST = 4;
|
|
147
|
+
export declare const DEPZ_TENSOR_F32 = 1;
|
|
148
|
+
export declare const DEPZ_TENSOR_F16 = 2;
|
|
149
|
+
export declare const DEPZ_TENSOR_U8 = 3;
|
|
150
|
+
export declare const DEPZ_TENSOR_I32 = 4;
|
|
151
|
+
export declare const DEPZ_TENSOR_I64 = 5;
|
|
152
|
+
export declare const DEPZ_REGION_SUPPORTED = 0;
|
|
153
|
+
export declare const DEPZ_REGION_REFUSED_WIDE_ANGLE = 1;
|
|
154
|
+
export declare const DEPZ_REGION_NO_SMALLER_SIZE = 2;
|
|
155
|
+
export declare const DEPZ_REGION_NO_INPUT_SIZE = 3;
|
|
156
|
+
export declare const DEPZ_FILTER_DISPARITY = 0;
|
|
157
|
+
export declare const DEPZ_FILTER_DEPTH = 1;
|
|
158
|
+
export declare const DEPZ_FILTER_POINT_CLOUD = 2;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
// GENERATED by packages/depz-camera-sdk-ts/tools/gen_bindings.py from contracts/sdk/include/depz/{depz,inference,depth}.h and contracts/errors.json. Do not edit: change the contract, then run the generator.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.DEPZ_SWITCH_ON = exports.DEPZ_SWITCH_DEFAULT = exports.DEPZ_LOG_ERROR = exports.DEPZ_LOG_WARNING = exports.DEPZ_LOG_INFO = exports.DEPZ_LOG_DEBUG = exports.DEPZ_E_CALIBRATION_FAILED = exports.DEPZ_E_INVALID_DATA = exports.DEPZ_E_ENGINE_BUILD_FAILED = exports.DEPZ_E_END_OF_STREAM = exports.DEPZ_E_UNSUPPORTED_VERSION = exports.DEPZ_E_NOT_IMPLEMENTED = exports.DEPZ_E_BUSY = exports.DEPZ_E_INVALID_STATE = exports.DEPZ_E_INTERNAL = exports.DEPZ_E_TIMEOUT = exports.DEPZ_E_IO_ERROR = exports.DEPZ_E_NOT_FOUND = exports.DEPZ_E_INVALID_ARGUMENT = exports.DEPZ_E_UNSUPPORTED_PLATFORM = exports.DEPZ_E_UNAVAILABLE = exports.DEPZ_E_FLASH_ABORTED = exports.DEPZ_E_FIRMWARE_IMAGE = exports.DEPZ_E_FLASH_DEVICE = exports.DEPZ_E_CALIBRATION_WEB = exports.DEPZ_E_CALIBRATION_MALFORMED = exports.DEPZ_E_MODE_NOT_OFFERED = exports.DEPZ_E_MODEL_NOT_OFFERED = exports.DEPZ_E_RECORDING_UNSUPPORTED = exports.DEPZ_E_MODEL_NEEDS_STEREO = exports.DEPZ_E_RECALIBRATION_DEFERRED = exports.DEPZ_E_RECORDING_NEEDS_MIGRATION = exports.DEPZ_E_CAPTURE_STOPPED = exports.DEPZ_E_NO_FRAMES = exports.DEPZ_E_USB_BANDWIDTH = exports.DEPZ_E_UNKNOWN_CAMERA_FAMILY = exports.DEPZ_E_UNSUPPORTED_SCHEME = exports.DEPZ_E_NO_CALIBRATION = exports.DEPZ_E_CAMERA_PERMISSION_DENIED = exports.DEPZ_E_CAMERA_BUSY = exports.DEPZ_E_CAMERA_NOT_FOUND = exports.DEPZ_E_UNRECOGNISED_CAMERA = exports.DEPZ_E_INVALID_SERIAL = exports.DEPZ_E_LEGACY_CAMERA = exports.DEPZ_E_DOWNLOAD_FAILED = exports.DEPZ_E_ABORTED = exports.DEPZ_OK = exports.DEPZ_MAX_REGION_SIZES = exports.DEPZ_MAX_INPUT_SIZES = exports.DEPZ_API_VERSION = void 0;
|
|
6
|
+
exports.DEPZ_PROFILE_NORMAL = exports.DEPZ_PROFILE_DEFAULT = exports.DEPZ_DROP_SOURCE_DEFAULT = exports.DEPZ_DROP_BLOCK = exports.DEPZ_DROP_OLDEST = exports.DEPZ_STREAM_CLOUD = exports.DEPZ_STREAM_DEPTH = exports.DEPZ_STREAM_DISPARITY = exports.DEPZ_STREAM_RECTIFIED = exports.DEPZ_STREAM_RAW = exports.DEPZ_REPLAY_EVERY_FRAME = exports.DEPZ_REPLAY_REALTIME = exports.DEPZ_TIME_ARRIVAL = exports.DEPZ_TIME_DEVICE_CLOCK = exports.DEPZ_CLOCK_MACOS_MACH = exports.DEPZ_CLOCK_WINDOWS_QPC = exports.DEPZ_CLOCK_LINUX_MONOTONIC = exports.DEPZ_EYE_RIGHT = exports.DEPZ_EYE_LEFT = exports.DEPZ_EYE_DEFAULT = exports.DEPZ_IMAGE_CANVAS_RIGHT = exports.DEPZ_IMAGE_CANVAS_LEFT = exports.DEPZ_IMAGE_POINT_CLOUD = exports.DEPZ_IMAGE_DEPTH = exports.DEPZ_IMAGE_DISPARITY = exports.DEPZ_IMAGE_RECTIFIED_RIGHT = exports.DEPZ_IMAGE_RECTIFIED_LEFT = exports.DEPZ_IMAGE_RIGHT = exports.DEPZ_IMAGE_LEFT = exports.DEPZ_IMAGE_RAW = exports.DEPZ_PIX_XYZ_F32 = exports.DEPZ_PIX_F32 = exports.DEPZ_PIX_BGR8 = exports.DEPZ_CALIBRATION_SOURCE_WEB = exports.DEPZ_CALIBRATION_SOURCE_FLASH = exports.DEPZ_CALIBRATION_SOURCE_NAME = exports.DEPZ_CALIBRATION_SOURCE_NONE = exports.DEPZ_CAMERA_BUSY = exports.DEPZ_CAMERA_UNUSABLE = exports.DEPZ_CAMERA_NEEDS_UPDATE = exports.DEPZ_CAMERA_USABLE = exports.DEPZ_TERM_TY = exports.DEPZ_TERM_YAW = exports.DEPZ_TERM_ROLL = exports.DEPZ_TERM_PITCH = exports.DEPZ_RECAL_CONTINUOUS = exports.DEPZ_RECAL_MANUAL = exports.DEPZ_RECAL_OFF = exports.DEPZ_RECAL_AUTO = exports.DEPZ_SWITCH_OFF = void 0;
|
|
7
|
+
exports.DEPZ_TENSOR_I32 = exports.DEPZ_TENSOR_U8 = exports.DEPZ_TENSOR_F16 = exports.DEPZ_TENSOR_F32 = exports.DEPZ_CPUS_LIST = exports.DEPZ_CPUS_ALL = exports.DEPZ_CPUS_LITTLE = exports.DEPZ_CPUS_BIG = exports.DEPZ_CPUS_DEFAULT = exports.DEPZ_INPUT_SIZE_ANY = exports.DEPZ_INPUT_SIZE_LISTED = exports.DEPZ_ENGINE_CLASS_NVIDIA = exports.DEPZ_ENGINE_CLASS_IGPU = exports.DEPZ_ENGINE_CLASS_CPU = exports.DEPZ_ENGINE_CLASS_UNKNOWN = exports.DEPZ_DEFAULT_FOR_MONO = exports.DEPZ_DEFAULT_FOR_STEREO = exports.DEPZ_DEFAULT_FOR_NONE = exports.DEPZ_CANVAS_EYE_RIGHT = exports.DEPZ_CANVAS_EYE_LEFT = exports.DEPZ_RECAL_EVENT_ROLLBACK = exports.DEPZ_RECAL_EVENT_RESET = exports.DEPZ_RECAL_EVENT_REFERENCE = exports.DEPZ_RECAL_EVENT_RESTORE = exports.DEPZ_RECAL_EVENT_MANUAL = exports.DEPZ_RECAL_EVENT_AUTO = exports.DEPZ_GRADE_POOR = exports.DEPZ_GRADE_FAIR = exports.DEPZ_GRADE_GOOD = exports.DEPZ_GRADE_UNKNOWN = exports.DEPZ_RECAL_STATE_MISALIGNED = exports.DEPZ_RECAL_STATE_DRIFT = exports.DEPZ_RECAL_STATE_ADJUSTING = exports.DEPZ_RECAL_STATE_ALIGNED = exports.DEPZ_RECAL_STATE_NO_TEXTURE = exports.DEPZ_RECAL_STATE_STARTING = exports.DEPZ_RECAL_STATE_OFF = exports.DEPZ_RECAL_STATE_UNAVAILABLE = exports.DEPZ_CONTROL_ENUM = exports.DEPZ_CONTROL_BOOL = exports.DEPZ_CONTROL_FLOAT = exports.DEPZ_CONTROL_INT = exports.DEPZ_SCOPE_STAGE = exports.DEPZ_SCOPE_RECALIBRATION = exports.DEPZ_SCOPE_FILTER = exports.DEPZ_SCOPE_CAMERA = exports.DEPZ_SCOPE_CALIBRATION = exports.DEPZ_SCOPE_INFERENCE = exports.DEPZ_SCOPE_PIPELINE = exports.DEPZ_PROFILE_LIGHT = void 0;
|
|
8
|
+
exports.DEPZ_FILTER_POINT_CLOUD = exports.DEPZ_FILTER_DEPTH = exports.DEPZ_FILTER_DISPARITY = exports.DEPZ_REGION_NO_INPUT_SIZE = exports.DEPZ_REGION_NO_SMALLER_SIZE = exports.DEPZ_REGION_REFUSED_WIDE_ANGLE = exports.DEPZ_REGION_SUPPORTED = exports.DEPZ_TENSOR_I64 = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
// Every integer constant of the C headers (the #defines, then the enums by header).
|
|
11
|
+
exports.DEPZ_API_VERSION = 1;
|
|
12
|
+
exports.DEPZ_MAX_INPUT_SIZES = 64;
|
|
13
|
+
exports.DEPZ_MAX_REGION_SIZES = 64;
|
|
14
|
+
// depz.h
|
|
15
|
+
exports.DEPZ_OK = 0;
|
|
16
|
+
exports.DEPZ_E_ABORTED = 1;
|
|
17
|
+
exports.DEPZ_E_DOWNLOAD_FAILED = 2;
|
|
18
|
+
exports.DEPZ_E_LEGACY_CAMERA = 3;
|
|
19
|
+
exports.DEPZ_E_INVALID_SERIAL = 4;
|
|
20
|
+
exports.DEPZ_E_UNRECOGNISED_CAMERA = 5;
|
|
21
|
+
exports.DEPZ_E_CAMERA_NOT_FOUND = 6;
|
|
22
|
+
exports.DEPZ_E_CAMERA_BUSY = 7;
|
|
23
|
+
exports.DEPZ_E_CAMERA_PERMISSION_DENIED = 8;
|
|
24
|
+
exports.DEPZ_E_NO_CALIBRATION = 9;
|
|
25
|
+
exports.DEPZ_E_UNSUPPORTED_SCHEME = 10;
|
|
26
|
+
exports.DEPZ_E_UNKNOWN_CAMERA_FAMILY = 11;
|
|
27
|
+
exports.DEPZ_E_USB_BANDWIDTH = 12;
|
|
28
|
+
exports.DEPZ_E_NO_FRAMES = 13;
|
|
29
|
+
exports.DEPZ_E_CAPTURE_STOPPED = 14;
|
|
30
|
+
exports.DEPZ_E_RECORDING_NEEDS_MIGRATION = 15;
|
|
31
|
+
exports.DEPZ_E_RECALIBRATION_DEFERRED = 16;
|
|
32
|
+
exports.DEPZ_E_MODEL_NEEDS_STEREO = 17;
|
|
33
|
+
exports.DEPZ_E_RECORDING_UNSUPPORTED = 18;
|
|
34
|
+
exports.DEPZ_E_MODEL_NOT_OFFERED = 19;
|
|
35
|
+
exports.DEPZ_E_MODE_NOT_OFFERED = 20;
|
|
36
|
+
exports.DEPZ_E_CALIBRATION_MALFORMED = 21;
|
|
37
|
+
exports.DEPZ_E_CALIBRATION_WEB = 22;
|
|
38
|
+
exports.DEPZ_E_FLASH_DEVICE = 23;
|
|
39
|
+
exports.DEPZ_E_FIRMWARE_IMAGE = 24;
|
|
40
|
+
exports.DEPZ_E_FLASH_ABORTED = 25;
|
|
41
|
+
exports.DEPZ_E_UNAVAILABLE = 26;
|
|
42
|
+
exports.DEPZ_E_UNSUPPORTED_PLATFORM = 27;
|
|
43
|
+
exports.DEPZ_E_INVALID_ARGUMENT = 28;
|
|
44
|
+
exports.DEPZ_E_NOT_FOUND = 29;
|
|
45
|
+
exports.DEPZ_E_IO_ERROR = 30;
|
|
46
|
+
exports.DEPZ_E_TIMEOUT = 31;
|
|
47
|
+
exports.DEPZ_E_INTERNAL = 32;
|
|
48
|
+
exports.DEPZ_E_INVALID_STATE = 33;
|
|
49
|
+
exports.DEPZ_E_BUSY = 34;
|
|
50
|
+
exports.DEPZ_E_NOT_IMPLEMENTED = 35;
|
|
51
|
+
exports.DEPZ_E_UNSUPPORTED_VERSION = 36;
|
|
52
|
+
exports.DEPZ_E_END_OF_STREAM = 37;
|
|
53
|
+
exports.DEPZ_E_ENGINE_BUILD_FAILED = 38;
|
|
54
|
+
exports.DEPZ_E_INVALID_DATA = 39;
|
|
55
|
+
exports.DEPZ_E_CALIBRATION_FAILED = 40;
|
|
56
|
+
exports.DEPZ_LOG_DEBUG = 10;
|
|
57
|
+
exports.DEPZ_LOG_INFO = 20;
|
|
58
|
+
exports.DEPZ_LOG_WARNING = 30;
|
|
59
|
+
exports.DEPZ_LOG_ERROR = 40;
|
|
60
|
+
exports.DEPZ_SWITCH_DEFAULT = 0;
|
|
61
|
+
exports.DEPZ_SWITCH_ON = 1;
|
|
62
|
+
exports.DEPZ_SWITCH_OFF = 2;
|
|
63
|
+
exports.DEPZ_RECAL_AUTO = 0;
|
|
64
|
+
exports.DEPZ_RECAL_OFF = 1;
|
|
65
|
+
exports.DEPZ_RECAL_MANUAL = 2;
|
|
66
|
+
exports.DEPZ_RECAL_CONTINUOUS = 3;
|
|
67
|
+
exports.DEPZ_TERM_PITCH = 1;
|
|
68
|
+
exports.DEPZ_TERM_ROLL = 2;
|
|
69
|
+
exports.DEPZ_TERM_YAW = 4;
|
|
70
|
+
exports.DEPZ_TERM_TY = 8;
|
|
71
|
+
exports.DEPZ_CAMERA_USABLE = 0;
|
|
72
|
+
exports.DEPZ_CAMERA_NEEDS_UPDATE = 1;
|
|
73
|
+
exports.DEPZ_CAMERA_UNUSABLE = 2;
|
|
74
|
+
exports.DEPZ_CAMERA_BUSY = 3;
|
|
75
|
+
exports.DEPZ_CALIBRATION_SOURCE_NONE = 0;
|
|
76
|
+
exports.DEPZ_CALIBRATION_SOURCE_NAME = 1;
|
|
77
|
+
exports.DEPZ_CALIBRATION_SOURCE_FLASH = 2;
|
|
78
|
+
exports.DEPZ_CALIBRATION_SOURCE_WEB = 3;
|
|
79
|
+
exports.DEPZ_PIX_BGR8 = 1;
|
|
80
|
+
exports.DEPZ_PIX_F32 = 2;
|
|
81
|
+
exports.DEPZ_PIX_XYZ_F32 = 3;
|
|
82
|
+
exports.DEPZ_IMAGE_RAW = 1;
|
|
83
|
+
exports.DEPZ_IMAGE_LEFT = 2;
|
|
84
|
+
exports.DEPZ_IMAGE_RIGHT = 3;
|
|
85
|
+
exports.DEPZ_IMAGE_RECTIFIED_LEFT = 4;
|
|
86
|
+
exports.DEPZ_IMAGE_RECTIFIED_RIGHT = 5;
|
|
87
|
+
exports.DEPZ_IMAGE_DISPARITY = 6;
|
|
88
|
+
exports.DEPZ_IMAGE_DEPTH = 7;
|
|
89
|
+
exports.DEPZ_IMAGE_POINT_CLOUD = 8;
|
|
90
|
+
exports.DEPZ_IMAGE_CANVAS_LEFT = 9;
|
|
91
|
+
exports.DEPZ_IMAGE_CANVAS_RIGHT = 10;
|
|
92
|
+
exports.DEPZ_EYE_DEFAULT = 0;
|
|
93
|
+
exports.DEPZ_EYE_LEFT = 1;
|
|
94
|
+
exports.DEPZ_EYE_RIGHT = 2;
|
|
95
|
+
exports.DEPZ_CLOCK_LINUX_MONOTONIC = 1;
|
|
96
|
+
exports.DEPZ_CLOCK_WINDOWS_QPC = 2;
|
|
97
|
+
exports.DEPZ_CLOCK_MACOS_MACH = 3;
|
|
98
|
+
exports.DEPZ_TIME_DEVICE_CLOCK = 1;
|
|
99
|
+
exports.DEPZ_TIME_ARRIVAL = 2;
|
|
100
|
+
exports.DEPZ_REPLAY_REALTIME = 0;
|
|
101
|
+
exports.DEPZ_REPLAY_EVERY_FRAME = 1;
|
|
102
|
+
exports.DEPZ_STREAM_RAW = 1;
|
|
103
|
+
exports.DEPZ_STREAM_RECTIFIED = 2;
|
|
104
|
+
exports.DEPZ_STREAM_DISPARITY = 4;
|
|
105
|
+
exports.DEPZ_STREAM_DEPTH = 8;
|
|
106
|
+
exports.DEPZ_STREAM_CLOUD = 16;
|
|
107
|
+
exports.DEPZ_DROP_OLDEST = 0;
|
|
108
|
+
exports.DEPZ_DROP_BLOCK = 1;
|
|
109
|
+
exports.DEPZ_DROP_SOURCE_DEFAULT = 2;
|
|
110
|
+
exports.DEPZ_PROFILE_DEFAULT = 0;
|
|
111
|
+
exports.DEPZ_PROFILE_NORMAL = 1;
|
|
112
|
+
exports.DEPZ_PROFILE_LIGHT = 2;
|
|
113
|
+
exports.DEPZ_SCOPE_PIPELINE = 1;
|
|
114
|
+
exports.DEPZ_SCOPE_INFERENCE = 2;
|
|
115
|
+
exports.DEPZ_SCOPE_CALIBRATION = 3;
|
|
116
|
+
exports.DEPZ_SCOPE_CAMERA = 4;
|
|
117
|
+
exports.DEPZ_SCOPE_FILTER = 5;
|
|
118
|
+
exports.DEPZ_SCOPE_RECALIBRATION = 6;
|
|
119
|
+
exports.DEPZ_SCOPE_STAGE = 7;
|
|
120
|
+
exports.DEPZ_CONTROL_INT = 1;
|
|
121
|
+
exports.DEPZ_CONTROL_FLOAT = 2;
|
|
122
|
+
exports.DEPZ_CONTROL_BOOL = 3;
|
|
123
|
+
exports.DEPZ_CONTROL_ENUM = 4;
|
|
124
|
+
exports.DEPZ_RECAL_STATE_UNAVAILABLE = 0;
|
|
125
|
+
exports.DEPZ_RECAL_STATE_OFF = 1;
|
|
126
|
+
exports.DEPZ_RECAL_STATE_STARTING = 2;
|
|
127
|
+
exports.DEPZ_RECAL_STATE_NO_TEXTURE = 3;
|
|
128
|
+
exports.DEPZ_RECAL_STATE_ALIGNED = 4;
|
|
129
|
+
exports.DEPZ_RECAL_STATE_ADJUSTING = 5;
|
|
130
|
+
exports.DEPZ_RECAL_STATE_DRIFT = 6;
|
|
131
|
+
exports.DEPZ_RECAL_STATE_MISALIGNED = 7;
|
|
132
|
+
exports.DEPZ_GRADE_UNKNOWN = 0;
|
|
133
|
+
exports.DEPZ_GRADE_GOOD = 1;
|
|
134
|
+
exports.DEPZ_GRADE_FAIR = 2;
|
|
135
|
+
exports.DEPZ_GRADE_POOR = 3;
|
|
136
|
+
exports.DEPZ_RECAL_EVENT_AUTO = 1;
|
|
137
|
+
exports.DEPZ_RECAL_EVENT_MANUAL = 2;
|
|
138
|
+
exports.DEPZ_RECAL_EVENT_RESTORE = 3;
|
|
139
|
+
exports.DEPZ_RECAL_EVENT_REFERENCE = 4;
|
|
140
|
+
exports.DEPZ_RECAL_EVENT_RESET = 5;
|
|
141
|
+
exports.DEPZ_RECAL_EVENT_ROLLBACK = 6;
|
|
142
|
+
exports.DEPZ_CANVAS_EYE_LEFT = 1;
|
|
143
|
+
exports.DEPZ_CANVAS_EYE_RIGHT = 2;
|
|
144
|
+
// inference.h
|
|
145
|
+
exports.DEPZ_DEFAULT_FOR_NONE = 0;
|
|
146
|
+
exports.DEPZ_DEFAULT_FOR_STEREO = 1;
|
|
147
|
+
exports.DEPZ_DEFAULT_FOR_MONO = 2;
|
|
148
|
+
exports.DEPZ_ENGINE_CLASS_UNKNOWN = 0;
|
|
149
|
+
exports.DEPZ_ENGINE_CLASS_CPU = 1;
|
|
150
|
+
exports.DEPZ_ENGINE_CLASS_IGPU = 2;
|
|
151
|
+
exports.DEPZ_ENGINE_CLASS_NVIDIA = 3;
|
|
152
|
+
exports.DEPZ_INPUT_SIZE_LISTED = 0;
|
|
153
|
+
exports.DEPZ_INPUT_SIZE_ANY = 1;
|
|
154
|
+
exports.DEPZ_CPUS_DEFAULT = 0;
|
|
155
|
+
exports.DEPZ_CPUS_BIG = 1;
|
|
156
|
+
exports.DEPZ_CPUS_LITTLE = 2;
|
|
157
|
+
exports.DEPZ_CPUS_ALL = 3;
|
|
158
|
+
exports.DEPZ_CPUS_LIST = 4;
|
|
159
|
+
exports.DEPZ_TENSOR_F32 = 1;
|
|
160
|
+
exports.DEPZ_TENSOR_F16 = 2;
|
|
161
|
+
exports.DEPZ_TENSOR_U8 = 3;
|
|
162
|
+
exports.DEPZ_TENSOR_I32 = 4;
|
|
163
|
+
exports.DEPZ_TENSOR_I64 = 5;
|
|
164
|
+
// depth.h
|
|
165
|
+
exports.DEPZ_REGION_SUPPORTED = 0;
|
|
166
|
+
exports.DEPZ_REGION_REFUSED_WIDE_ANGLE = 1;
|
|
167
|
+
exports.DEPZ_REGION_NO_SMALLER_SIZE = 2;
|
|
168
|
+
exports.DEPZ_REGION_NO_INPUT_SIZE = 3;
|
|
169
|
+
exports.DEPZ_FILTER_DISPARITY = 0;
|
|
170
|
+
exports.DEPZ_FILTER_DEPTH = 1;
|
|
171
|
+
exports.DEPZ_FILTER_POINT_CLOUD = 2;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/** A stable error code (contracts/errors.json). Its frozen value is the C status;
|
|
2
|
+
* {@link errorCodeName} gives its name ("camera_busy"). */
|
|
3
|
+
export declare enum ErrorCode {
|
|
4
|
+
/** an operation was cancelled on request (an inference aborted by stop); not a fault */
|
|
5
|
+
Aborted = 1,
|
|
6
|
+
/** a model download failed (network, HTTP status, truncated file, a slug the registry does not resolve, a file or archive whose size or SHA-256 is not the declared one) */
|
|
7
|
+
DownloadFailed = 2,
|
|
8
|
+
/** the camera has old firmware without its calibration (the legacy-v1 firmware); it is used once its firmware is updated */
|
|
9
|
+
LegacyCamera = 3,
|
|
10
|
+
/** the camera's serial is not a valid DEPZ serial (a catalog prefix + 8 characters), or its USB product id is not the one of the serial's variant */
|
|
11
|
+
InvalidSerial = 4,
|
|
12
|
+
/** the camera's name or USB serial number is not of the form a DEPZ camera has, and it is not old firmware either */
|
|
13
|
+
UnrecognisedCamera = 5,
|
|
14
|
+
/** no DEPZ camera is attached, or none with the requested serial */
|
|
15
|
+
CameraNotFound = 6,
|
|
16
|
+
/** the camera did not open after retries: another program holds it, or its USB connection is in a wedged state */
|
|
17
|
+
CameraBusy = 7,
|
|
18
|
+
/** the system refused this program access to the camera (Linux: no permission on its video device; Windows: camera access is off in the privacy settings) */
|
|
19
|
+
CameraPermissionDenied = 8,
|
|
20
|
+
/** the camera has no calibration (number 0), or none of its sources gave one that can be read */
|
|
21
|
+
NoCalibration = 9,
|
|
22
|
+
/** the camera carries a calibration of a scheme this SDK cannot use */
|
|
23
|
+
UnsupportedScheme = 10,
|
|
24
|
+
/** the camera names a camera family this SDK does not know */
|
|
25
|
+
UnknownCameraFamily = 11,
|
|
26
|
+
/** not enough USB bandwidth for this mode: too many cameras on this USB hub/controller, or the mode needs more than the port gives (not another program holding the camera) */
|
|
27
|
+
UsbBandwidth = 12,
|
|
28
|
+
/** a live source delivers no frames although its stream is open (reported while the pipeline runs; nothing is restarted) */
|
|
29
|
+
NoFrames = 13,
|
|
30
|
+
/** the camera's stream stopped while capturing (the device went away or failed) */
|
|
31
|
+
CaptureStopped = 14,
|
|
32
|
+
/** the recording is of schema 3: it is opened once it is migrated to schema 6 */
|
|
33
|
+
RecordingNeedsMigration = 15,
|
|
34
|
+
/** the pipeline cannot take a calibration correction now; retried later */
|
|
35
|
+
RecalibrationDeferred = 16,
|
|
36
|
+
/** a stereo depth model was asked for a source with one eye (a mono camera, a single-eye recording) */
|
|
37
|
+
ModelNeedsStereo = 17,
|
|
38
|
+
/** the file is a recording of a schema that is neither opened nor migrated (1, 2, 4, 5, or newer than the SDK), or no DEPZ recording (no schema tag) */
|
|
39
|
+
RecordingUnsupported = 18,
|
|
40
|
+
/** the model, or the model at this input size, is not offered on the engine (contracts/models/compat.json: never, a TensorRT precision it is not verified for, below the engine's minimum input or at its maximum, a size not built for the Rockchip NPU or measured there outside the tolerance); nothing was downloaded */
|
|
41
|
+
ModelNotOffered = 19,
|
|
42
|
+
/** a capture mode the camera's firmware advertises but the SDK does not offer: its picture is a crop of the sensor's or squeezed unevenly, so the calibration does not map onto it (asked for, or a recording made in one) */
|
|
43
|
+
ModeNotOffered = 20,
|
|
44
|
+
/** a calibration string, record or correction does not follow the format */
|
|
45
|
+
CalibrationMalformed = 21,
|
|
46
|
+
/** the calibration web API did not answer as its contract says */
|
|
47
|
+
CalibrationWeb = 22,
|
|
48
|
+
/** the camera to flash is missing, is not a camera the flasher knows, or does not answer as expected */
|
|
49
|
+
FlashDevice = 23,
|
|
50
|
+
/** the firmware image could not be built or fails a structural check (the camera was not written) */
|
|
51
|
+
FirmwareImage = 24,
|
|
52
|
+
/** a firmware flash, update or restore stopped; the exception's camera_state says what the camera runs now (unchanged, isp: recovery mode, flashed, partial, unknown) */
|
|
53
|
+
FlashAborted = 25,
|
|
54
|
+
/** the system does not offer what was asked (no controls, no serial, no engine) */
|
|
55
|
+
Unavailable = 26,
|
|
56
|
+
/** writing a camera's firmware or calibration is not available on this operating system yet (Windows: until that path is verified on hardware); nothing was written */
|
|
57
|
+
UnsupportedPlatform = 27,
|
|
58
|
+
/** an argument has the wrong type or value, or names a choice that is not one of the allowed ones */
|
|
59
|
+
InvalidArgument = 28,
|
|
60
|
+
/** a file, camera, model, stage, control or other named thing does not exist */
|
|
61
|
+
NotFound = 29,
|
|
62
|
+
/** the operating system refused an operation or a file could not be read or written */
|
|
63
|
+
IoError = 30,
|
|
64
|
+
/** an operation did not finish in time */
|
|
65
|
+
Timeout = 31,
|
|
66
|
+
/** anything else: a bug, or a failure without a more precise code */
|
|
67
|
+
Internal = 32,
|
|
68
|
+
/** the object is not in a state that allows the call: a pipeline started twice or used after stop, a source read while a pipeline owns it, an operation on something closed */
|
|
69
|
+
InvalidState = 33,
|
|
70
|
+
/** another job runs that holds what the call needs (a flash, an update, a calibration, an extension unit another program uses); try again when it ends */
|
|
71
|
+
Busy = 34,
|
|
72
|
+
/** the call is part of the interface but this build of the SDK does not carry it out yet (the native SDK while it is ported); not a fault of the arguments or of the system */
|
|
73
|
+
NotImplemented = 35,
|
|
74
|
+
/** the program and the SDK library do not agree on the interface: the program was built for a newer API version than the library has, or passed a struct whose struct_size is too small to read (the native C interface) */
|
|
75
|
+
UnsupportedVersion = 36,
|
|
76
|
+
/** a finite source (a recording that does not loop) has delivered its last frame: none follows until it is repositioned (a seek, a step) or opened again; not a fault. The reference says it without raising: grab() and the pipeline's get() give None with at_eof set, iterating the pipeline stops; the C interface returns this code there */
|
|
77
|
+
EndOfStream = 37,
|
|
78
|
+
/** an inference engine could not build or compile the model for this device (a TensorRT plan that this GPU, precision and TensorRT version cannot build). It is not a fault of the model file or of the arguments. details: model, precision, gpu, sm, cause (the engine's first error line), and suggestion when another engine is expected to work (tensorrt-fp32 after a failed fp16 build) */
|
|
79
|
+
EngineBuildFailed = 38,
|
|
80
|
+
/** a file or record the call reads does not follow its format (a JSON file of the wrong shape, a lens-model file, settings read from a file); not an argument of the call and not a calibration string (calibration_malformed) */
|
|
81
|
+
InvalidData = 39,
|
|
82
|
+
/** a calibration or a correction could not be computed from what was given: too few usable board views, the cameras never see the board together, the solver found no start, a correction larger than a camera can drift; nothing was changed */
|
|
83
|
+
CalibrationFailed = 40
|
|
84
|
+
}
|
|
85
|
+
/** Every code in the order of errors.json: [code, name, meaning]. */
|
|
86
|
+
export declare const ERROR_CODES: ReadonlyArray<readonly [ErrorCode, string, string]>;
|