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

Function performConversion

src/utils/cameraModelConversions.ts:109–129  ·  view source on GitHub ↗
(
  from: CameraModelId,
  to: CameraModelId,
  params: number[],
  threshold: number
)

Source from the content-addressed store, hash-verified

107}
108
109function performConversion(
110 from: CameraModelId,
111 to: CameraModelId,
112 params: number[],
113 threshold: number
114): ConversionResult {
115 const perspectiveResult = convertPerspectiveCameraModel(from, to, params, threshold);
116 if (perspectiveResult) {
117 return perspectiveResult;
118 }
119
120 const fisheyeResult = convertFisheyeCameraModel(from, to, params, threshold);
121 if (fisheyeResult) {
122 return fisheyeResult;
123 }
124
125 return {
126 type: 'incompatible',
127 reason: `Conversion from ${getModelName(from)} to ${getModelName(to)} not implemented`,
128 };
129}
130
131/**
132 * Validate conversion accuracy by computing reprojection error.

Callers 1

convertCameraModelFunction · 0.85

Calls 2

Tested by

no test coverage detected