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

Function makeReconstruction

src/utils/sim3dNormalization.test.ts:67–89  ·  view source on GitHub ↗
(options: {
  images?: Image[];
  points3D?: Point3D[];
} = {})

Source from the content-addressed store, hash-verified

65});
66
67function makeReconstruction(options: {
68 images?: Image[];
69 points3D?: Point3D[];
70} = {}): Reconstruction {
71 return {
72 cameras: new Map(),
73 images: new Map((options.images ?? []).map((image) => [image.imageId, image])),
74 points3D: options.points3D ? new Map(options.points3D.map((point) => [point.point3DId, point])) : new Map(),
75 imageStats: new Map(),
76 connectedImagesIndex: new Map(),
77 imageToPoint3DIds: new Map(),
78 globalStats: {
79 minError: 0,
80 maxError: 0,
81 avgError: 0,
82 minTrackLength: 0,
83 maxTrackLength: 0,
84 avgTrackLength: 0,
85 totalObservations: 0,
86 totalPoints: options.points3D?.length ?? 0,
87 },
88 };
89}
90
91function makeImage(imageId: number, worldPosition: [number, number, number]): Image {
92 return {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected