Skip to content

Commit

Permalink
Run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Jan 12, 2024
1 parent a5f3ca1 commit b899257
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 21 deletions.
11 changes: 9 additions & 2 deletions photon-client/src/components/dashboard/ConfigOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const allTabs = Object.freeze({
dnnTab: {
tabName: "DNN",
component: DnnTab
},
}
});
const selectedTabs = ref([0, 0, 0, 0]);
Expand Down Expand Up @@ -88,7 +88,14 @@ const getTabGroups = (): ConfigOption[][] => {
} else if (lgAndDown) {
return [
[allTabs.inputTab],
[allTabs.thresholdTab, allTabs.contoursTab, allTabs.apriltagTab, allTabs.arucoTab, allTabs.dnnTab, allTabs.outputTab],
[
allTabs.thresholdTab,
allTabs.contoursTab,
allTabs.apriltagTab,
allTabs.arucoTab,
allTabs.dnnTab,
allTabs.outputTab
],
[allTabs.targetsTab, allTabs.pnpTab, allTabs.map3dTab]
];
} else if (xl) {
Expand Down
6 changes: 3 additions & 3 deletions photon-client/src/components/dashboard/tabs/DnnTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ const interactiveCols = computed(
: 8;
const models = () => {
return ["a", "bcd"]
}
return ["a", "bcd"];
};
</script>

<template>
<div v-if="currentPipelineSettings.pipelineType === PipelineType.Dnn">
<pv-select
v-model="currentPipelineSettings.modelIndex"
label="Model Index"
:items = "models"
:items="models"
:select-cols="interactiveCols"
@input="(value) => useCameraSettingsStore().changeCurrentPipelineSetting({ tagFamily: value }, false)"
/>
Expand Down
12 changes: 7 additions & 5 deletions photon-client/src/components/dashboard/tabs/TargetsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ const resetCurrentBuffer = () => {
>
Fiducial ID
</th>
<template
v-if="currentPipelineSettings.pipelineType === PipelineType.Dnn"
>
<template v-if="currentPipelineSettings.pipelineType === PipelineType.Dnn">
<th class="text-center white--text">Class ID</th>
<th class="text-center white--text">Confidence</th>
</template>
Expand Down Expand Up @@ -91,8 +89,12 @@ const resetCurrentBuffer = () => {
>
{{ target.fiducialId }}
</td>
<td v-if="currentPipelineSettings.pipelineType === PipelineType.Dnn" class="text-center white--text"> {{ target.classId }} </td>
<td v-if="currentPipelineSettings.pipelineType === PipelineType.Dnn" class="text-center white--text"> {{ target.confidence.toFixed(2) }} </td>
<td v-if="currentPipelineSettings.pipelineType === PipelineType.Dnn" class="text-center white--text">
{{ target.classId }}
</td>
<td v-if="currentPipelineSettings.pipelineType === PipelineType.Dnn" class="text-center white--text">
{{ target.confidence.toFixed(2) }}
</td>
<template v-if="!useCameraSettingsStore().currentPipelineSettings.solvePNPEnabled">
<td class="text-center">{{ target.pitch.toFixed(2) }}&deg;</td>
<td class="text-center">{{ target.yaw.toFixed(2) }}&deg;</td>
Expand Down
4 changes: 2 additions & 2 deletions photon-client/src/types/PhotonTrackingTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ export interface PhotonTarget {
// -1 if not set
fiducialId: number;
// undefined if 3d isn't enabled
pose?: Transform3d,
pose?: Transform3d;

confidence: number,
confidence: number;
classId: number;
}

Expand Down
4 changes: 2 additions & 2 deletions photon-client/src/types/PipelineTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ export const DefaultAprilTagPipelineSettings: AprilTagPipelineSettings = {

export interface DnnPipelineSettings extends PipelineSettings {
pipelineType: PipelineType.Dnn;
modelIndex: number
confidence: number
modelIndex: number;
confidence: number;
}
export type ConfigurableDnnPipelineSettings = Partial<Omit<DnnPipelineSettings, "pipelineType">> &
ConfigurablePipelineSettings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@

import java.util.ArrayList;
import java.util.List;
import org.opencv.core.Point;
import org.opencv.core.Scalar;
import org.opencv.imgproc.Imgproc;
import org.photonvision.common.util.ColorHelper;
import org.photonvision.vision.frame.Frame;
import org.photonvision.vision.frame.FrameThresholdType;
import org.photonvision.vision.pipe.CVPipe.CVPipeResult;
Expand Down Expand Up @@ -50,7 +46,7 @@ public OpencvDnnPipeline(DnnPipelineSettings settings) {

@Override
protected void setPipeParamsImpl() {
dnnPipe.setParams(new OpencvDnnPipeParams(settings.modelPath, (float)settings.confidence));
dnnPipe.setParams(new OpencvDnnPipeParams(settings.modelPath, (float) settings.confidence));
}

@Override
Expand All @@ -73,7 +69,8 @@ protected CVPipelineResult process(Frame input_frame, DnnPipelineSettings settin
int i = 0;
for (var t : targetList) {
// Imgproc.rectangle(
// input_frame.processedImage.getMat(), t.box.tl(), t.box.br(), new Scalar(0, 0, 255), 2);
// input_frame.processedImage.getMat(), t.box.tl(), t.box.br(), new Scalar(0, 0, 255),
// 2);

// Let the draw pipeline deal with this all for us
// var name = String.format("%d (%f)", i, t.confidence);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@ public HashMap<String, Object> toHashMap() {
ret.put("confidence", m_confidence);
ret.put("classId", m_classId);


return ret;
}

Expand Down

0 comments on commit b899257

Please sign in to comment.