mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-02 02:51:40 +00:00
Merge branch 'dev' of https://github.com/Chameleon-Vision/chameleon-vision into dev
This commit is contained in:
@@ -40,13 +40,13 @@
|
|||||||
if (isNaN(m) === false && isNaN(b) === false) {
|
if (isNaN(m) === false && isNaN(b) === false) {
|
||||||
this.sendSlope(m, b, true);
|
this.sendSlope(m, b, true);
|
||||||
} else {
|
} else {
|
||||||
this.$emit('snackbar');
|
this.$emit('snackbar',"Points are too close");
|
||||||
}
|
}
|
||||||
this.pointA = undefined;
|
this.pointA = undefined;
|
||||||
this.pointB = undefined;
|
this.pointB = undefined;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sendSlope(m, b, valid) {
|
sendSlope(m, b) {
|
||||||
this.handleInput('dualTargetCalibrationM', m);
|
this.handleInput('dualTargetCalibrationM', m);
|
||||||
this.handleInput('dualTargetCalibrationB', b);
|
this.handleInput('dualTargetCalibrationB', b);
|
||||||
this.$emit('update');
|
this.$emit('update');
|
||||||
|
|||||||
@@ -21,20 +21,11 @@
|
|||||||
this.$emit('update');
|
this.$emit('update');
|
||||||
},
|
},
|
||||||
takePoint() {
|
takePoint() {
|
||||||
let hasNaN = false;
|
if (this.rawPoint[0] && this.rawPoint[1]) {
|
||||||
console.log(this.rawPoint);
|
|
||||||
for (let i = 0; i < this.rawPoint.length&&!hasNaN; i++) {
|
|
||||||
hasNaN = !(this.rawPoint[i]||this.rawPoint[i]===0);
|
|
||||||
}
|
|
||||||
if(!hasNaN){//if array doesnt have undefined values
|
|
||||||
console.log("sending points");
|
|
||||||
this.handleInput('point', this.rawPoint);
|
this.handleInput('point', this.rawPoint);
|
||||||
this.$emit('update');
|
this.$emit('update');
|
||||||
}
|
} else {
|
||||||
else
|
this.$emit('snackbar',"No target found");
|
||||||
{
|
|
||||||
console.log("sending error");
|
|
||||||
this.$emit('snackbar');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,13 +96,15 @@
|
|||||||
<!-- camera image tabs -->
|
<!-- camera image tabs -->
|
||||||
<v-tabs background-color="#212121" dark height="48" slider-color="#4baf62" centered
|
<v-tabs background-color="#212121" dark height="48" slider-color="#4baf62" centered
|
||||||
style="padding-bottom:10px" v-model="isBinaryNumber"
|
style="padding-bottom:10px" v-model="isBinaryNumber"
|
||||||
@change="handleInput('isBinary',pipeline.isBinary)">
|
@change="handleInput('isBinary',pipeline.isBinary)" v-if="currentPipelineIndex !== 0">
|
||||||
<v-tab>Normal</v-tab>
|
<v-tab>Normal</v-tab>
|
||||||
<v-tab>Threshold</v-tab>
|
<v-tab>Threshold</v-tab>
|
||||||
</v-tabs>
|
</v-tabs>
|
||||||
|
<div v-else style="height: 58px"></div>
|
||||||
<!-- camera image stream -->
|
<!-- camera image stream -->
|
||||||
<div class="videoClass">
|
<div class="videoClass">
|
||||||
<img id="CameraStream" v-if="cameraList.length > 0" :src="streamAddress" @click="onImageClick" crossorigin="Anonymous"/>
|
<img id="CameraStream" v-if="cameraList.length > 0" :src="streamAddress" @click="onImageClick"
|
||||||
|
crossorigin="Anonymous"/>
|
||||||
<span v-else>No Cameras Are connected</span>
|
<span v-else>No Cameras Are connected</span>
|
||||||
<h5 id="Point">{{point}}</h5>
|
<h5 id="Point">{{point}}</h5>
|
||||||
</div>
|
</div>
|
||||||
@@ -157,8 +159,8 @@
|
|||||||
CVinput
|
CVinput
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onImageClick(event){
|
onImageClick(event) {
|
||||||
if(this.selectedTab ===1){
|
if (this.selectedTab === 1) {
|
||||||
this.$refs.component.onClick(event);
|
this.$refs.component.onClick(event);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -337,7 +339,7 @@
|
|||||||
|
|
||||||
.videoClass img {
|
.videoClass img {
|
||||||
max-height: 70vh;
|
max-height: 70vh;
|
||||||
max-width:70%;
|
max-width: 70%;
|
||||||
width: 70%;
|
width: 70%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
<v-divider dark color="white"/>
|
<v-divider dark color="white"/>
|
||||||
<CVselect name="Calibration Mode" v-model="value.calibrationMode" :list="['None','Single point','Dual point']"
|
<CVselect name="Calibration Mode" v-model="value.calibrationMode" :list="['None','Single point','Dual point']"
|
||||||
@input="handleData('calibrationMode')"/>
|
@input="handleData('calibrationMode')"/>
|
||||||
<component :raw-point="rawPoint" :is="selectedComponent" @update="doUpdate" @snackbar="snackbar=true"/>
|
<component :raw-point="rawPoint" :is="selectedComponent" @update="doUpdate" @snackbar="showSnackbar"/>
|
||||||
<v-snackbar :timeout="3000" v-model="snackbar" top color="error">
|
<v-snackbar :timeout="3000" v-model="snackbar" top color="error">
|
||||||
<span style="color:#000">{{getErrorMsg()}}</span>
|
<span style="color:#000">{{snackbarText}}</span>
|
||||||
<v-btn color="black" text @click="snackbar = false">Close</v-btn>
|
<v-btn color="black" text @click="snackbar = false">Close</v-btn>
|
||||||
</v-snackbar>
|
</v-snackbar>
|
||||||
</div>
|
</div>
|
||||||
@@ -41,20 +41,16 @@
|
|||||||
doUpdate() {
|
doUpdate() {
|
||||||
this.$emit('update')
|
this.$emit('update')
|
||||||
},
|
},
|
||||||
getErrorMsg()
|
showSnackbar(message){
|
||||||
{
|
this.snackbarText = message;
|
||||||
switch (this.value.calibrationMode) {
|
this.snackbar = true;
|
||||||
case 1:
|
},
|
||||||
return "No target found";
|
|
||||||
case 2:
|
|
||||||
return "Points are too close"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
snackbar: false,
|
snackbar: false,
|
||||||
|
snackbarText:""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
Reference in New Issue
Block a user