Skip to content

Commit b27b313

Browse files
committed
check for pnp calibration mode
1 parent 695fb52 commit b27b313

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

photon-client/src/components/cameras/CameraCalibrationCard.vue

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -181,24 +181,25 @@ const isCalibrating = computed(
181181
182182
const startCalibration = () => {
183183
const currentRes = useCameraSettingsStore().currentVideoFormat.resolution;
184-
if (currentRes.width > 640 || currentRes.height > 480) {
184+
const calMode = useCameraSettingsStore().isCalibrationMode;
185+
if ((calMode && currentRes.width > 640) || (calMode && currentRes.height > 480)) {
185186
useStateStore().showSnackbarMessage({
186187
color: "error",
187188
message:
188-
"The selected resolution is too low to gather any useful data. Update your resolution settings and try again."
189+
"The selected resolution is too low to gather any useful data for 3D calibration. Update your resolution settings and try again."
189190
});
190191
return;
192+
} else {
193+
useCameraSettingsStore().startPnPCalibration({
194+
squareSizeIn: squareSizeIn.value,
195+
markerSizeIn: markerSizeIn.value,
196+
patternHeight: patternHeight.value,
197+
patternWidth: patternWidth.value,
198+
boardType: boardType.value,
199+
useOldPattern: useOldPattern.value,
200+
tagFamily: tagFamily.value
201+
});
191202
}
192-
193-
useCameraSettingsStore().startPnPCalibration({
194-
squareSizeIn: squareSizeIn.value,
195-
markerSizeIn: markerSizeIn.value,
196-
patternHeight: patternHeight.value,
197-
patternWidth: patternWidth.value,
198-
boardType: boardType.value,
199-
useOldPattern: useOldPattern.value,
200-
tagFamily: tagFamily.value
201-
});
202203
// The Start PnP method already handles updating the backend so only a store update is required
203204
useCameraSettingsStore().currentCameraSettings.currentPipelineIndex = WebsocketPipelineType.Calib3d;
204205
// isCalibrating.value = true;

0 commit comments

Comments
 (0)