-
Notifications
You must be signed in to change notification settings - Fork 264
Clean up front end, remove decision margin and error bits, remove target family selector #652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d19af30
clean up front end ui
mdurrani808 d564bcb
address changes
mdurrani808 178d0f1
Merge branch 'master' into frontendCleanup
gerth2 eb0a3d3
Further tweaks to camera default gains to help make sure users get a …
gerth2 ac59465
even more saner defaults
gerth2 c08b03f
Even even more camera sane defaults
gerth2 2be04e7
lint
gerth2 cbec96d
lint pt 2
gerth2 732467d
unit test fixup
gerth2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
316 changes: 143 additions & 173 deletions
316
photon-client/src/views/PipelineViews/AprilTagTab.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,196 +1,166 @@ | ||
| <template> | ||
| <div> | ||
| <v-select | ||
| v-model="selectedFamily" | ||
| dark | ||
| color="accent" | ||
| item-color="secondary" | ||
| label="Select target family" | ||
| :items="familyList" | ||
| @input="handlePipelineUpdate('tagFamily', familyList.indexOf(selectedFamily))" | ||
| /> | ||
| <v-select | ||
| v-model="selectedModel" | ||
| dark | ||
| color="accent" | ||
| item-color="secondary" | ||
| label="Select a target model" | ||
| :items="targetList" | ||
| item-text="name" | ||
| item-value="data" | ||
| @input="handlePipelineUpdate('targetModel', targetList.indexOf(selectedModel) + 6)" | ||
| v-model="selectedFamily" | ||
| dark | ||
| color="accent" | ||
| item-color="secondary" | ||
| label="Select target family" | ||
| :items="familyList" | ||
| @input="handlePipelineUpdate('tagFamily', familyList.indexOf(selectedFamily))" | ||
| /> | ||
| <CVslider | ||
| v-model="decimate" | ||
| class="pt-2" | ||
| slider-cols="8" | ||
| name="Decimate" | ||
| min="1" | ||
| max="8" | ||
| step="1.0" | ||
| tooltip="Increases FPS at the expense of range by reducing image resolution initially" | ||
| @input="handlePipelineData('decimate')" | ||
| v-model="decimate" | ||
| class="pt-2" | ||
| slider-cols="8" | ||
| name="Decimate" | ||
| min="1" | ||
| max="8" | ||
| step="1.0" | ||
| tooltip="Increases FPS at the expense of range by reducing image resolution initially" | ||
| @input="handlePipelineData('decimate')" | ||
| /> | ||
| <CVslider | ||
| v-model="blur" | ||
| class="pt-2" | ||
| slider-cols="8" | ||
| name="Blur" | ||
| min="0" | ||
| max="5" | ||
| step=".01" | ||
| tooltip="Gaussian blur added to the image, high FPS cost for slightly decreased noise" | ||
| @input="handlePipelineData('blur')" | ||
| v-model="blur" | ||
| class="pt-2" | ||
| slider-cols="8" | ||
| name="Blur" | ||
| min="0" | ||
| max="5" | ||
| step=".01" | ||
| tooltip="Gaussian blur added to the image, high FPS cost for slightly decreased noise" | ||
| @input="handlePipelineData('blur')" | ||
| /> | ||
| <CVslider | ||
| v-model="threads" | ||
| class="pt-2" | ||
| slider-cols="8" | ||
| name="Threads" | ||
| min="1" | ||
| max="8" | ||
| step="1" | ||
| tooltip="Number of threads spawned by the AprilTag detector" | ||
| @input="handlePipelineData('threads')" | ||
| v-model="threads" | ||
| class="pt-2" | ||
| slider-cols="8" | ||
| name="Threads" | ||
| min="1" | ||
| max="8" | ||
| step="1" | ||
| tooltip="Number of threads spawned by the AprilTag detector" | ||
| @input="handlePipelineData('threads')" | ||
| /> | ||
| <CVswitch | ||
| v-model="refineEdges" | ||
| class="pt-2" | ||
| slider-cols="8" | ||
| name="Refine Edges" | ||
| tooltip="Further refines the apriltag corner position initial estimate, suggested left on" | ||
| @input="handlePipelineData('refineEdges')" | ||
| /> | ||
| <CVslider | ||
| v-model="hammingDist" | ||
| class="pt-2 pb-4" | ||
| slider-cols="8" | ||
| name="Max error bits" | ||
| min="0" | ||
| max="10" | ||
| step="1" | ||
| tooltip="Maximum number of error bits to correct; potential tags with more will be thrown out. For smaller tags (like 16h5), set this as low as possible." | ||
| @input="handlePipelineData('hammingDist')" | ||
| v-model="refineEdges" | ||
| class="pt-2" | ||
| slider-cols="8" | ||
| name="Refine Edges" | ||
| tooltip="Further refines the apriltag corner position initial estimate, suggested left on" | ||
| @input="handlePipelineData('refineEdges')" | ||
| /> | ||
| <CVslider | ||
| v-model="decisionMargin" | ||
| class="pt-2 pb-4" | ||
| slider-cols="8" | ||
| name="Decision Margin Cutoff" | ||
| min="0" | ||
| max="250" | ||
| step="1" | ||
| tooltip="Tags with a 'margin' (decoding quality score) less than this wil be rejected. Increase this to reduce the number of false positive detections" | ||
| @input="handlePipelineData('decisionMargin')" | ||
| v-model="decisionMargin" | ||
| class="pt-2 pb-4" | ||
| slider-cols="8" | ||
| name="Decision Margin Cutoff" | ||
| min="0" | ||
| max="250" | ||
| step="1" | ||
| tooltip="Tags with a 'margin' (decoding quality score) less than this wil be rejected. Increase this to reduce the number of false positive detections" | ||
| @input="handlePipelineData('decisionMargin')" | ||
| /> | ||
| <CVslider | ||
| v-model="numIterations" | ||
| class="pt-2 pb-4" | ||
| slider-cols="8" | ||
| name="Pose Estimation Iterations" | ||
| min="0" | ||
| max="500" | ||
| step="1" | ||
| tooltip="Number of iterations the pose estimation algorithm will run, 50-100 is a good starting point" | ||
| @input="handlePipelineData('numIterations')" | ||
| v-model="numIterations" | ||
| class="pt-2 pb-4" | ||
| slider-cols="8" | ||
| name="Pose Estimation Iterations" | ||
| min="0" | ||
| max="500" | ||
| step="1" | ||
| tooltip="Number of iterations the pose estimation algorithm will run, 50-100 is a good starting point" | ||
| @input="handlePipelineData('numIterations')" | ||
| /> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script> | ||
| import CVslider from '../../components/common/cv-slider' | ||
| import CVswitch from '../../components/common/cv-switch' | ||
| import CVslider from '../../components/common/cv-slider' | ||
| import CVswitch from '../../components/common/cv-switch' | ||
|
|
||
| export default { | ||
| name: "AprilTag", | ||
| components: { | ||
| CVslider, | ||
| CVswitch, | ||
| }, | ||
| data() { | ||
| return { | ||
| familyList: ["tag36h11", "tag25h9", "tag16h5"], | ||
| // Selected model is offset (ew) by 6 from the photon ordinal, as we only wanna show the 36h11 and 16h5 options | ||
| targetList: ['6.5in (36h11) AprilTag', '6in (16h5) AprilTag'], //Keep in sync with TargetModel.java | ||
| } | ||
| }, | ||
| computed: { | ||
| selectedModel: { | ||
| get() { | ||
| let ret = this.$store.getters.currentPipelineSettings.targetModel - 6 | ||
| return this.targetList[ret]; | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"targetModel": this.targetList.indexOf(val) + 6}) | ||
| } | ||
| }, | ||
| selectedFamily: { | ||
| get() { | ||
| let ret = this.$store.getters.currentPipelineSettings.tagFamily | ||
| return this.familyList[ret]; | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"tagFamily": this.familyList.indexOf(val)}) | ||
| } | ||
| }, | ||
| decimate: { | ||
| get() { | ||
| return this.$store.getters.currentPipelineSettings.decimate | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"decimate": val}); | ||
| } | ||
| }, | ||
| hammingDist: { | ||
| get() { | ||
| return this.$store.getters.currentPipelineSettings.hammingDist | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"hammingDist": val}); | ||
| } | ||
| }, | ||
| decisionMargin: { | ||
| get() { | ||
| return this.$store.getters.currentPipelineSettings.decisionMargin | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"decisionMargin": val}); | ||
| } | ||
| }, | ||
| numIterations: { | ||
| get() { | ||
| return this.$store.getters.currentPipelineSettings.numIterations | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"numIterations": val}); | ||
| } | ||
| }, | ||
| blur: { | ||
| get() { | ||
| return this.$store.getters.currentPipelineSettings.blur | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"blur": val}); | ||
| } | ||
| }, | ||
| threads: { | ||
| get() { | ||
| return this.$store.getters.currentPipelineSettings.threads | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"threads": val}); | ||
| } | ||
| }, | ||
| refineEdges: { | ||
| get() { | ||
| return this.$store.getters.currentPipelineSettings.refineEdges | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"refineEdges": val}); | ||
| } | ||
| }, | ||
| }, | ||
| methods: { | ||
| } | ||
| export default { | ||
| name: "AprilTag", | ||
| components: { | ||
| CVslider, | ||
| CVswitch, | ||
| }, | ||
| data() { | ||
| return { | ||
| familyList: ["tag36h11", "tag25h9", "tag16h5"], | ||
| // Selected model is offset (ew) by 6 from the photon ordinal, as we only wanna show the 36h11 and 16h5 options | ||
| targetList: ['6in (16h5) AprilTag'], //Keep in sync with TargetModel.java | ||
| } | ||
| }, | ||
| computed: { | ||
| selectedModel: { | ||
| get() { | ||
| let ret = this.$store.getters.currentPipelineSettings.targetModel - 6 | ||
| return this.targetList[ret]; | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"targetModel": this.targetList.indexOf(val) + 6}) | ||
| } | ||
| }, | ||
| selectedFamily: { | ||
| get() { | ||
| let ret = this.$store.getters.currentPipelineSettings.tagFamily | ||
| return this.familyList[ret]; | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"tagFamily": this.familyList.indexOf(val)}) | ||
| } | ||
| }, | ||
| decimate: { | ||
| get() { | ||
| return this.$store.getters.currentPipelineSettings.decimate | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"decimate": val}); | ||
| } | ||
| }, | ||
| decisionMargin: { | ||
| get() { | ||
| return this.$store.getters.currentPipelineSettings.decisionMargin | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"decisionMargin": val}); | ||
| } | ||
| }, | ||
| numIterations: { | ||
| get() { | ||
| return this.$store.getters.currentPipelineSettings.numIterations | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"numIterations": val}); | ||
| } | ||
| }, | ||
| blur: { | ||
| get() { | ||
| return this.$store.getters.currentPipelineSettings.blur | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"blur": val}); | ||
| } | ||
| }, | ||
| threads: { | ||
| get() { | ||
| return this.$store.getters.currentPipelineSettings.threads | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"threads": val}); | ||
| } | ||
| }, | ||
| refineEdges: { | ||
| get() { | ||
| return this.$store.getters.currentPipelineSettings.refineEdges | ||
| }, | ||
| set(val) { | ||
| this.$store.commit("mutatePipeline", {"refineEdges": val}); | ||
| } | ||
| }, | ||
| }, | ||
| methods: { | ||
| } | ||
| } | ||
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.