MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / buildCameras

Function buildCameras

src/parsers/colmapRoundTrip.test.ts:40–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38];
39
40function buildCameras(): Map<CameraId, Camera> {
41 const cameras = new Map<CameraId, Camera>();
42 MODELS_11_TO_17.forEach(({ modelId, params }, i) => {
43 // Self-check: the fixture matches the registry's param count (guards typos and
44 // keeps binary read alignment honest).
45 expect(params, `model ${modelId} param count`).toHaveLength(getCameraModelNumParams(modelId));
46 const cameraId = i + 1;
47 cameras.set(cameraId, buildCamera({ cameraId, modelId, width: 4096, height: 2048, params }));
48 });
49 return cameras;
50}
51
52function assertRoundTrip(original: Map<CameraId, Camera>, reparsed: Map<CameraId, Camera>): void {
53 expect(reparsed.size).toBe(original.size);

Callers 1

Calls 2

getCameraModelNumParamsFunction · 0.90
buildCameraFunction · 0.90

Tested by

no test coverage detected