Skip to content

Commit

Permalink
crop pipe dimensions can now not be bellow 16
Browse files Browse the repository at this point in the history
  • Loading branch information
GGreenix committed Dec 22, 2024
1 parent 6d8981a commit 2b191fe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
6 changes: 3 additions & 3 deletions photon-client/src/components/dashboard/tabs/CropTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const interactiveCols = computed(() =>
);
</script>
<template>
<div v-if="currentPipelineSettings.pipelineType !== PipelineType.Reflective">
<div>
<v-card-subtitle class="white--text">Static Crop</v-card-subtitle>
<pv-slider
v-model="currentPipelineSettings.static_x"
Expand All @@ -43,7 +43,7 @@ const interactiveCols = computed(() =>
:slider-cols="interactiveCols"
label="Width"
tooltip="The width of the statically cropped area"
:min="1"
:min="16"
:max="frame_width"
@input="(value) => useCameraSettingsStore().changeCurrentPipelineSetting({ static_width: value }, false)"
/>
Expand All @@ -52,7 +52,7 @@ const interactiveCols = computed(() =>
:slider-cols="interactiveCols"
label="Height"
tooltip="The height of the statically cropped area"
:min="1"
:min="16"
:max="frame_height"
@input="(value) => useCameraSettingsStore().changeCurrentPipelineSetting({ static_height: value }, false)"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,14 @@ protected CVMat process(CVMat in) {
public static boolean fullyCovers(Rect rect, Mat mat) {
return rect.x <= 0 && rect.y <= 0 && rect.width >= mat.width() && rect.height >= mat.height();
}
@Override
public void setParams(Rect params) {
if(params.width < 16 || params.height < 16)
{
params.width = 16;
params.height = 16;
}

super.setParams(params);
}
}
7 changes: 1 addition & 6 deletions photon-server/src/main/resources/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@
<link rel="icon" href="./favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Photon Client</title>
<<<<<<< Updated upstream
<script type="module" crossorigin src="./assets/index-BTy8hED9.js"></script>
<script type="module" crossorigin src="./assets/index-BeeNQFhs.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-CpPy_30g.css">
=======
<script type="module" crossorigin src="./assets/index-M9117pRA.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-DRL4wOwv.css">
>>>>>>> Stashed changes
</head>
<body>
<div id="app"></div>
Expand Down

0 comments on commit 2b191fe

Please sign in to comment.