mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-23 01:21:40 +00:00
manual merge of speckle rejection into new ui and updated ui to include speckle slider
This commit is contained in:
@@ -15,6 +15,7 @@ public class Pipeline {
|
||||
public List<Number> area = Arrays.asList(0.0, 100.0);
|
||||
public List<Number> ratio = Arrays.asList(0.0, 20.0);
|
||||
public List<Number> extent = Arrays.asList(0, 100);
|
||||
public Number speckle = 5;
|
||||
public boolean isBinary = false;
|
||||
public SortMode sortMode = SortMode.Largest;
|
||||
public TargetGroup targetGroup = TargetGroup.Single;
|
||||
|
||||
@@ -24,6 +24,7 @@ public class CVProcess {
|
||||
private Mat binaryMat = new Mat();
|
||||
private List<MatOfPoint> filteredContours = new ArrayList<>();
|
||||
private Comparator<RotatedRect> sortByCentermostComparator = Comparator.comparingDouble(this::calcDistance);
|
||||
private List<MatOfPoint> speckleRejectedContours = new ArrayList<>();
|
||||
private Comparator<MatOfPoint> sortByMomentsX = Comparator.comparingDouble(this::calcMomentsX);
|
||||
private List<RotatedRect> finalCountours = new ArrayList<>();
|
||||
private MatOfPoint2f intersectMatA = new MatOfPoint2f();
|
||||
@@ -85,6 +86,20 @@ public class CVProcess {
|
||||
}
|
||||
return filteredContours;
|
||||
}
|
||||
List<MatOfPoint> rejectSpeckles(List<MatOfPoint> inputContours, Double minimumPercentOfAverage) {
|
||||
double averageArea = 0.0;
|
||||
for(MatOfPoint c : inputContours) {
|
||||
averageArea += Imgproc.contourArea(c);
|
||||
}
|
||||
averageArea /= inputContours.size();
|
||||
var minimumAllowableArea = minimumPercentOfAverage / 100.0 * averageArea;
|
||||
speckleRejectedContours.clear();
|
||||
for(MatOfPoint c : inputContours) {
|
||||
if(Imgproc.contourArea(c) >= minimumAllowableArea) speckleRejectedContours.add(c);
|
||||
}
|
||||
return speckleRejectedContours;
|
||||
}
|
||||
|
||||
|
||||
private double calcDistance(RotatedRect rect) {
|
||||
return FastMath.sqrt(FastMath.pow(cameraValues.CenterX - rect.center.x, 2) + FastMath.pow(cameraValues.CenterY - rect.center.y, 2));
|
||||
@@ -119,7 +134,7 @@ public class CVProcess {
|
||||
List<RotatedRect> groupTargets(List<MatOfPoint> inputContours, TargetIntersection intersectionPoint, TargetGroup targetGroup) {
|
||||
finalCountours.clear();
|
||||
if (targetGroup.equals(TargetGroup.Dual)) {
|
||||
inputContours.sort(sortByMomentsX);
|
||||
// inputContours.sort(sortByMomentsX);
|
||||
for (var i = 0; i < inputContours.size(); i++) {
|
||||
List<Point> FinalContourList = new ArrayList<>(inputContours.get(i).toList());
|
||||
try {
|
||||
|
||||
@@ -33,6 +33,7 @@ public class VisionProcess implements Runnable {
|
||||
// pipeline process items
|
||||
private List<MatOfPoint> foundContours = new ArrayList<>();
|
||||
private List<MatOfPoint> filteredContours = new ArrayList<>();
|
||||
private List<MatOfPoint> deSpeckledContours = new ArrayList<>();
|
||||
private List<RotatedRect> groupedContours = new ArrayList<>();
|
||||
private Mat cameraInputMat = new Mat();
|
||||
private Mat hsvThreshMat = new Mat();
|
||||
@@ -148,7 +149,7 @@ public class VisionProcess implements Runnable {
|
||||
|
||||
cvProcess.hsvThreshold(inputImage, hsvThreshMat, hsvLower, hsvUpper, currentPipeline.erode, currentPipeline.dilate);
|
||||
|
||||
if (currentPipeline.isBinary == true) {
|
||||
if (currentPipeline.isBinary) {
|
||||
Imgproc.cvtColor(hsvThreshMat, outputImage, Imgproc.COLOR_GRAY2BGR, 3);
|
||||
} else {
|
||||
inputImage.copyTo(outputImage);
|
||||
@@ -157,23 +158,26 @@ public class VisionProcess implements Runnable {
|
||||
if (foundContours.size() > 0) {
|
||||
filteredContours = cvProcess.filterContours(foundContours, currentPipeline.area, currentPipeline.ratio, currentPipeline.extent);
|
||||
if (filteredContours.size() > 0) {
|
||||
groupedContours = cvProcess.groupTargets(filteredContours, currentPipeline.targetIntersection, currentPipeline.targetGroup);
|
||||
if (groupedContours.size() > 0) {
|
||||
var finalRect = cvProcess.sortTargetsToOne(groupedContours, currentPipeline.sortMode);
|
||||
// System.out.printf("Largest Contour Area: %.2f\n", finalRect.size.area());
|
||||
pipelineResult.RawPoint = finalRect;
|
||||
pipelineResult.IsValid = true;
|
||||
if (!currentPipeline.isCalibrated) {
|
||||
pipelineResult.CalibratedX = camera.getCamVals().CenterX;
|
||||
pipelineResult.CalibratedY = camera.getCamVals().CenterY;
|
||||
} else {
|
||||
pipelineResult.CalibratedX = (finalRect.center.y - currentPipeline.b) / currentPipeline.m;
|
||||
pipelineResult.CalibratedY = (finalRect.center.x * currentPipeline.m) + currentPipeline.b;
|
||||
deSpeckledContours = cvProcess.rejectSpeckles(filteredContours, currentPipeline.speckle.doubleValue());
|
||||
if (deSpeckledContours.size() > 0){
|
||||
groupedContours = cvProcess.groupTargets(deSpeckledContours, currentPipeline.targetIntersection, currentPipeline.targetGroup);
|
||||
if (groupedContours.size() > 0) {
|
||||
var finalRect = cvProcess.sortTargetsToOne(groupedContours, currentPipeline.sortMode);
|
||||
// System.out.printf("Largest Contour Area: %.2f\n", finalRect.size.area());
|
||||
pipelineResult.RawPoint = finalRect;
|
||||
pipelineResult.IsValid = true;
|
||||
if (!currentPipeline.isCalibrated) {
|
||||
pipelineResult.CalibratedX = camera.getCamVals().CenterX;
|
||||
pipelineResult.CalibratedY = camera.getCamVals().CenterY;
|
||||
} else {
|
||||
pipelineResult.CalibratedX = (finalRect.center.y - currentPipeline.b) / currentPipeline.m;
|
||||
pipelineResult.CalibratedY = (finalRect.center.x * currentPipeline.m) + currentPipeline.b;
|
||||
}
|
||||
pipelineResult.Pitch = camera.getCamVals().CalculatePitch(finalRect.center.y, pipelineResult.CalibratedY);
|
||||
pipelineResult.Yaw = camera.getCamVals().CalculateYaw(finalRect.center.x, pipelineResult.CalibratedX);
|
||||
pipelineResult.Area = finalRect.size.area();
|
||||
drawContour(outputImage, finalRect);
|
||||
}
|
||||
pipelineResult.Pitch = camera.getCamVals().CalculatePitch(finalRect.center.y, pipelineResult.CalibratedY);
|
||||
pipelineResult.Yaw = camera.getCamVals().CalculateYaw(finalRect.center.x, pipelineResult.CalibratedX);
|
||||
pipelineResult.Area = finalRect.size.area();
|
||||
drawContour(outputImage, finalRect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.png><title>Chameleon Vision</title><link rel=stylesheet href=/Roboto.css><link href=/css/chunk-234aed0c.62cd23bf.css rel=prefetch><link href=/css/chunk-28383ebf.5bdfa61d.css rel=prefetch><link href=/css/chunk-38331e86.3e507f7b.css rel=prefetch><link href=/css/chunk-4b541045.d47fe89d.css rel=prefetch><link href=/css/chunk-716fb61c.ab43288b.css rel=prefetch><link href=/css/chunk-79b72a3d.52ef46aa.css rel=prefetch><link href=/css/chunk-7a810817.e757f52a.css rel=prefetch><link href=/css/chunk-7cf477eb.a93b3047.css rel=prefetch><link href=/css/chunk-b1313c74.5ff143a4.css rel=prefetch><link href=/js/chunk-1a7066d8.baa45f6a.js rel=prefetch><link href=/js/chunk-234aed0c.fbf7ad5e.js rel=prefetch><link href=/js/chunk-28383ebf.4e54b6b9.js rel=prefetch><link href=/js/chunk-2d0d3320.bae28379.js rel=prefetch><link href=/js/chunk-38331e86.2606c966.js rel=prefetch><link href=/js/chunk-4b541045.d5203d49.js rel=prefetch><link href=/js/chunk-716fb61c.84a36d26.js rel=prefetch><link href=/js/chunk-79b72a3d.aeb36768.js rel=prefetch><link href=/js/chunk-7a810817.bca05c28.js rel=prefetch><link href=/js/chunk-7cf477eb.de18472d.js rel=prefetch><link href=/js/chunk-b1313c74.f1793c21.js rel=prefetch><link href=/css/app.eb572613.css rel=preload as=style><link href=/css/chunk-vendors.97f47167.css rel=preload as=style><link href=/js/app.68d051af.js rel=preload as=script><link href=/js/chunk-vendors.6cb32058.js rel=preload as=script><link href=/css/chunk-vendors.97f47167.css rel=stylesheet><link href=/css/app.eb572613.css rel=stylesheet></head><body><noscript><strong>We're sorry but Chameleon Vision doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.6cb32058.js></script><script src=/js/app.68d051af.js></script></body></html>
|
||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.png><title>Chameleon Vision</title><link rel=stylesheet href=/Roboto.css><link href=/css/chunk-234aed0c.62cd23bf.css rel=prefetch><link href=/css/chunk-28383ebf.5bdfa61d.css rel=prefetch><link href=/css/chunk-402ab08c.d47fe89d.css rel=prefetch><link href=/css/chunk-716fb61c.ab43288b.css rel=prefetch><link href=/css/chunk-79b72a3d.52ef46aa.css rel=prefetch><link href=/css/chunk-7a810817.e757f52a.css rel=prefetch><link href=/css/chunk-7cf477eb.a93b3047.css rel=prefetch><link href=/css/chunk-c11abc1e.550a8275.css rel=prefetch><link href=/css/chunk-c44c6306.3e507f7b.css rel=prefetch><link href=/js/chunk-234aed0c.fbf7ad5e.js rel=prefetch><link href=/js/chunk-28383ebf.c8baa1ad.js rel=prefetch><link href=/js/chunk-3ae1c3ad.6979650a.js rel=prefetch><link href=/js/chunk-402ab08c.dd7b432d.js rel=prefetch><link href=/js/chunk-716fb61c.84a36d26.js rel=prefetch><link href=/js/chunk-79b72a3d.aeb36768.js rel=prefetch><link href=/js/chunk-7a810817.bca05c28.js rel=prefetch><link href=/js/chunk-7cf477eb.de18472d.js rel=prefetch><link href=/js/chunk-98e0c8cc.240c79a9.js rel=prefetch><link href=/js/chunk-c11abc1e.fa113e7a.js rel=prefetch><link href=/js/chunk-c44c6306.d9c69fb0.js rel=prefetch><link href=/css/app.eb572613.css rel=preload as=style><link href=/css/chunk-vendors.97f47167.css rel=preload as=style><link href=/js/app.4f397bab.js rel=preload as=script><link href=/js/chunk-vendors.6cb32058.js rel=preload as=script><link href=/css/chunk-vendors.97f47167.css rel=stylesheet><link href=/css/app.eb572613.css rel=stylesheet></head><body><noscript><strong>We're sorry but Chameleon Vision doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.6cb32058.js></script><script src=/js/app.4f397bab.js></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
1
Main/src/main/resources/web/js/app.4f397bab.js.map
Normal file
1
Main/src/main/resources/web/js/app.4f397bab.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d3320"],{"5c73":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("CVrangeSlider",{attrs:{name:"Area",min:0,max:100,step:.1},on:{input:function(t){return e.handleInput("area",e.value.area)}},model:{value:e.value.area,callback:function(t){e.$set(e.value,"area",t)},expression:"value.area"}}),a("CVrangeSlider",{attrs:{name:"Ratio (W/H)",min:0,max:100,step:.1},on:{input:function(t){return e.handleInput("ratio",e.value.ratio)}},model:{value:e.value.ratio,callback:function(t){e.$set(e.value,"ratio",t)},expression:"value.ratio"}}),a("CVrangeSlider",{attrs:{name:"Extent",min:0,max:100},on:{input:function(t){return e.handleInput("extent",e.value.extent)}},model:{value:e.value.extent,callback:function(t){e.$set(e.value,"extent",t)},expression:"value.extent"}}),a("CVselect",{attrs:{name:"Target Group",list:["Single","Dual"]},on:{input:function(t){return e.handleInput("targetGroup",e.value.targetGroup)}},model:{value:e.value.targetGroup,callback:function(t){e.$set(e.value,"targetGroup",t)},expression:"value.targetGroup"}}),a("CVselect",{attrs:{name:"Target Intersection",list:["None","Up","Down","Left","Right"],disabled:e.isDisabled},on:{input:function(t){return e.handleInput("targetIntersection",e.value.targetIntersection)}},model:{value:e.value.targetIntersection,callback:function(t){e.$set(e.value,"targetIntersection",t)},expression:"value.targetIntersection"}})],1)},r=[],u=a("1029"),l=a("8384"),o={name:"Contours",props:["value"],components:{CVrangeSlider:u["a"],CVselect:l["a"]},data(){return{}},computed:{isDisabled(){return 0===this.value.targetGroup}}},i=o,s=a("2877"),c=Object(s["a"])(i,n,r,!1,null,"4f8edba3",null);t["default"]=c.exports}}]);
|
||||
//# sourceMappingURL=chunk-2d0d3320.bae28379.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-38331e86"],{"4c92":function(t,i,s){"use strict";s.r(i);var e=function(){var t=this,i=t.$createElement,s=t._self._c||i;return s("div",[s("CVselect",{attrs:{name:"SortMode",list:["Largest","Smallest","Highest","Lowest","Rightmost","Leftmost","Closest"]},on:{input:function(i){return t.handleInput("sortMode",t.value.sortMode)}},model:{value:t.value.sortMode,callback:function(i){t.$set(t.value,"sortMode",i)},expression:"value.sortMode"}}),s("span",[t._v("Calibrate:")]),s("v-divider",{attrs:{dark:"",color:"white"}}),s("v-row",{attrs:{align:"center",justify:"start"}},[s("v-col",{staticStyle:{"padding-right":"0px"},attrs:{cols:3}},[s("v-btn",{attrs:{small:"",color:"#4baf62"},on:{click:t.takePointA}},[t._v("Take Point A")])],1),s("v-col",{staticStyle:{"margin-left":"0px"},attrs:{cols:3}},[s("v-btn",{attrs:{small:"",color:"#4baf62"},on:{click:t.takePointB}},[t._v("Take Point B")])],1),s("v-col",[s("v-btn",{attrs:{small:"",color:"yellow darken-3"},on:{click:t.clearSlope}},[t._v("Clear All Points")])],1)],1),s("v-snackbar",{attrs:{timeout:3e3,top:"",color:"error"},model:{value:t.snackbar,callback:function(i){t.snackbar=i},expression:"snackbar"}},[s("span",{staticStyle:{color:"#000"}},[t._v("Points are too close")]),s("v-btn",{attrs:{color:"black",text:""},on:{click:function(i){t.snackbar=!1}}},[t._v("Close")])],1)],1)},o=[],a=s("8384"),n={name:"Output",props:["value"],components:{CVselect:a["a"]},methods:{takePointA(){this.pointA=this.rawPoint,this.calcSlope()},takePointB(){this.pointB=this.rawPoint,this.calcSlope()},calcSlope(){if(void 0!==this.pointA&&void 0!==this.pointB){let t=(this.pointB[1]-this.pointA[1])/(this.pointB[0]-this.pointA[0]),i=this.pointA[1]-t*this.pointA[0];!1===isNaN(t)&&!1===isNaN(i)?this.sendSlope(t,i,!0):this.snackbar=!0,this.pointA=void 0,this.pointB=void 0}},sendSlope(t,i,s){this.handleInput("m",t),this.handleInput("b",i),this.handleInput("isCalibrated",s)},clearSlope(){this.sendSlope(1,0,!1),this.pointA=void 0,this.pointB=void 0}},data(){return{snackbar:!1,pointA:void 0,pointB:void 0}},computed:{rawPoint:{get(){return this.$store.state.point.rawPoint}}}},c=n,l=s("2877"),r=s("6544"),h=s.n(r),v=s("8336"),u=s("62ad"),d=s("ce7e"),p=s("0fd9"),k=(s("ca71"),s("a9ad")),m=s("f2e7"),b=s("fe6c"),f=s("58df"),w=s("d9bd"),A=Object(f["a"])(k["a"],m["a"],Object(b["b"])(["absolute","top","bottom","left","right"])).extend({name:"v-snackbar",props:{multiLine:Boolean,timeout:{type:Number,default:6e3},vertical:Boolean},data:()=>({activeTimeout:-1}),computed:{classes(){return{"v-snack--active":this.isActive,"v-snack--absolute":this.absolute,"v-snack--bottom":this.bottom||!this.top,"v-snack--left":this.left,"v-snack--multi-line":this.multiLine&&!this.vertical,"v-snack--right":this.right,"v-snack--top":this.top,"v-snack--vertical":this.vertical}}},watch:{isActive(){this.setTimeout()}},created(){this.$attrs.hasOwnProperty("auto-height")&&Object(w["d"])("auto-height",this)},mounted(){this.setTimeout()},methods:{setTimeout(){window.clearTimeout(this.activeTimeout),this.isActive&&this.timeout&&(this.activeTimeout=window.setTimeout(()=>{this.isActive=!1},this.timeout))}},render(t){return t("transition",{attrs:{name:"v-snack-transition"}},[this.isActive&&t("div",{staticClass:"v-snack",class:this.classes,on:this.$listeners},[t("div",this.setBackgroundColor(this.color,{staticClass:"v-snack__wrapper"}),[t("div",{staticClass:"v-snack__content"},this.$slots.default)])])])}}),g=Object(l["a"])(c,e,o,!1,null,"58812995",null);i["default"]=g.exports;h()(g,{VBtn:v["a"],VCol:u["a"],VDivider:d["a"],VRow:p["a"],VSnackbar:A})},ca71:function(t,i,s){}}]);
|
||||
//# sourceMappingURL=chunk-38331e86.2606c966.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3ae1c3ad"],{1447:function(e,t,a){"use strict";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-row",{attrs:{dense:"",align:"center"}},[a("v-col",{attrs:{cols:2}},[a("span",[e._v(e._s(e.name))])]),a("v-col",{attrs:{cols:10}},[a("v-slider",{staticClass:"align-center",attrs:{value:e.localValue,dark:"",max:e.max,min:e.min,"hide-details":"",color:"#4baf62",step:e.step},on:{input:e.handleInput},scopedSlots:e._u([{key:"append",fn:function(){return[a("v-text-field",{staticClass:"mt-0 pt-0",staticStyle:{width:"50px"},attrs:{dark:"",max:e.max,min:e.min,value:e.localValue,"hide-details":"","single-line":"",type:"number",step:e.step},on:{input:e.handleChange,focus:function(t){e.isFocused=!0},blur:function(t){e.isFocused=!1}}})]},proxy:!0}])})],1)],1)],1)},l=[],u={name:"Slider",props:["min","max","name","value","step"],data(){return{isFocused:!1}},methods:{handleChange(e){this.isFocused&&(this.localValue=parseFloat(e))},handleInput(e){this.isFocused||(this.localValue=e)}},computed:{localValue:{get(){return this.value},set(e){this.$emit("input",e)}}}},r=u,s=a("2877"),i=a("6544"),o=a.n(i),c=a("62ad"),p=a("0fd9"),d=a("ba0d"),v=a("8654"),m=Object(s["a"])(r,n,l,!1,null,"5b310213",null);t["a"]=m.exports;o()(m,{VCol:c["a"],VRow:p["a"],VSlider:d["a"],VTextField:v["a"]})},"5c73":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("CVrangeSlider",{attrs:{name:"Area",min:0,max:100,step:.1},on:{input:function(t){return e.handleInput("area",e.value.area)}},model:{value:e.value.area,callback:function(t){e.$set(e.value,"area",t)},expression:"value.area"}}),a("CVrangeSlider",{attrs:{name:"Ratio (W/H)",min:0,max:100,step:.1},on:{input:function(t){return e.handleInput("ratio",e.value.ratio)}},model:{value:e.value.ratio,callback:function(t){e.$set(e.value,"ratio",t)},expression:"value.ratio"}}),a("CVrangeSlider",{attrs:{name:"Extent",min:0,max:100},on:{input:function(t){return e.handleInput("extent",e.value.extent)}},model:{value:e.value.extent,callback:function(t){e.$set(e.value,"extent",t)},expression:"value.extent"}}),a("CVslider",{attrs:{name:"Speckle Rejection",min:0,max:100},on:{input:function(t){return e.handleInput("speckle",e.value.speckle)}},model:{value:e.value.speckle,callback:function(t){e.$set(e.value,"speckle",t)},expression:"value.speckle"}}),a("CVselect",{attrs:{name:"Target Group",list:["Single","Dual"]},on:{input:function(t){return e.handleInput("targetGroup",e.value.targetGroup)}},model:{value:e.value.targetGroup,callback:function(t){e.$set(e.value,"targetGroup",t)},expression:"value.targetGroup"}}),a("CVselect",{attrs:{name:"Target Intersection",list:["None","Up","Down","Left","Right"],disabled:e.isDisabled},on:{input:function(t){return e.handleInput("targetIntersection",e.value.targetIntersection)}},model:{value:e.value.targetIntersection,callback:function(t){e.$set(e.value,"targetIntersection",t)},expression:"value.targetIntersection"}})],1)},l=[],u=a("1029"),r=a("8384"),s=a("1447"),i={name:"Contours",props:["value"],components:{CVrangeSlider:u["a"],CVselect:r["a"],CVslider:s["a"]},data(){return{}},computed:{isDisabled(){return 0===this.value.targetGroup}}},o=i,c=a("2877"),p=Object(c["a"])(o,n,l,!1,null,"be9f115a",null);t["default"]=p.exports}}]);
|
||||
//# sourceMappingURL=chunk-3ae1c3ad.6979650a.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1a7066d8"],{"0b81":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("CVselect",{attrs:{name:"Camera",list:e.cameraList},model:{value:e.currentCameraIndex,callback:function(t){e.currentCameraIndex=t},expression:"currentCameraIndex"}}),a("CVselect",{attrs:{name:"Resolution",list:e.resolutionList},model:{value:e.cameraSettings.resolution,callback:function(t){e.$set(e.cameraSettings,"resolution",t)},expression:"cameraSettings.resolution"}}),a("CVselect",{attrs:{name:"Stream Resolution",list:["1:1","1:2","1:4","1:6"]},model:{value:e.cameraSettings.streamDivisor,callback:function(t){e.$set(e.cameraSettings,"streamDivisor",t)},expression:"cameraSettings.streamDivisor"}}),a("CVnumberinput",{attrs:{name:"Diagonal FOV"},model:{value:e.cameraSettings.fov,callback:function(t){e.$set(e.cameraSettings,"fov",t)},expression:"cameraSettings.fov"}}),a("v-btn",{staticStyle:{"margin-top":"10px"},attrs:{small:"",color:"#4baf62"},on:{click:e.sendCameraSettings}},[e._v("Save Camera Settings")])],1)},n=[],r=a("8384"),i=a("9696"),l={name:"CameraSettings",components:{CVselect:r["a"],CVnumberinput:i["a"]},data(){return{}},methods:{sendCameraSettings(){this.handleInput("cameraSettings",this.cameraSettings)}},computed:{currentCameraIndex:{get(){return this.$store.state.currentCameraIndex},set(e){this.$store.commit("currentCameraIndex",e)}},cameraList:{get(){return this.$store.state.cameraList},set(e){this.$store.commit("cameraList",e)}},resolutionList:{get(){return this.$store.state.resolutionList}},cameraSettings:{get(){return this.$store.state.cameraSettings},set(e){this.$store.commit("cameraSettings",e)}}}},c=l,o=a("2877"),m=a("6544"),u=a.n(m),d=a("8336"),p=Object(o["a"])(c,s,n,!1,null,"6fff04fd",null);t["default"]=p.exports;u()(p,{VBtn:d["a"]})},9696:function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-row",{attrs:{dense:"",align:"center"}},[a("v-col",{attrs:{cols:2}},[a("span",[e._v(e._s(e.name))])]),a("v-col",[a("v-text-field",{staticClass:"mt-0 pt-0",staticStyle:{width:"70px"},attrs:{dark:"","hide-details":"","single-line":"",type:"number"},model:{value:e.localValue,callback:function(t){e.localValue=t},expression:"localValue"}})],1)],1)],1)},n=[],r={name:"NumberInput",props:["name","value"],data(){return{}},computed:{localValue:{get(){return this.value},set(e){this.$emit("input",parseInt(e))}}}},i=r,l=a("2877"),c=a("6544"),o=a.n(c),m=a("62ad"),u=a("0fd9"),d=a("8654"),p=Object(l["a"])(i,s,n,!1,null,"10e05c36",null);t["a"]=p.exports;o()(p,{VCol:m["a"],VRow:u["a"],VTextField:d["a"]})}}]);
|
||||
//# sourceMappingURL=chunk-1a7066d8.baa45f6a.js.map
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-98e0c8cc"],{"0b81":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("CVselect",{attrs:{name:"Camera",list:e.cameraList},model:{value:e.currentCameraIndex,callback:function(t){e.currentCameraIndex=t},expression:"currentCameraIndex"}}),a("CVselect",{attrs:{name:"Resolution",list:e.resolutionList},model:{value:e.cameraSettings.resolution,callback:function(t){e.$set(e.cameraSettings,"resolution",t)},expression:"cameraSettings.resolution"}}),a("CVselect",{attrs:{name:"Stream Resolution",list:["1:1","1:2","1:4","1:6"]},model:{value:e.cameraSettings.streamDivisor,callback:function(t){e.$set(e.cameraSettings,"streamDivisor",t)},expression:"cameraSettings.streamDivisor"}}),a("CVnumberinput",{attrs:{name:"Diagonal FOV"},model:{value:e.cameraSettings.fov,callback:function(t){e.$set(e.cameraSettings,"fov",t)},expression:"cameraSettings.fov"}}),a("v-btn",{staticStyle:{"margin-top":"10px"},attrs:{small:"",color:"#4baf62"},on:{click:e.sendCameraSettings}},[e._v("Save Camera Settings")])],1)},n=[],r=a("8384"),i=a("9696"),c={name:"CameraSettings",components:{CVselect:r["a"],CVnumberinput:i["a"]},data(){return{}},methods:{sendCameraSettings(){this.handleInput("cameraSettings",this.cameraSettings)}},computed:{currentCameraIndex:{get(){return this.$store.state.currentCameraIndex},set(e){this.$store.commit("currentCameraIndex",e)}},cameraList:{get(){return this.$store.state.cameraList},set(e){this.$store.commit("cameraList",e)}},resolutionList:{get(){return this.$store.state.resolutionList}},cameraSettings:{get(){return this.$store.state.cameraSettings},set(e){this.$store.commit("cameraSettings",e)}}}},l=c,o=a("2877"),m=a("6544"),u=a.n(m),d=a("8336"),p=Object(o["a"])(l,s,n,!1,null,"6fff04fd",null);t["default"]=p.exports;u()(p,{VBtn:d["a"]})},9696:function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-row",{attrs:{dense:"",align:"center"}},[a("v-col",{attrs:{cols:2}},[a("span",[e._v(e._s(e.name))])]),a("v-col",[a("v-text-field",{staticClass:"mt-0 pt-0",staticStyle:{width:"70px"},attrs:{dark:"","hide-details":"","single-line":"",type:"number"},model:{value:e.localValue,callback:function(t){e.localValue=t},expression:"localValue"}})],1)],1)],1)},n=[],r={name:"NumberInput",props:["name","value"],data(){return{}},computed:{localValue:{get(){return this.value},set(e){this.$emit("input",parseInt(e))}}}},i=r,c=a("2877"),l=a("6544"),o=a.n(l),m=a("62ad"),u=a("0fd9"),d=a("8654"),p=Object(c["a"])(i,s,n,!1,null,"10e05c36",null);t["a"]=p.exports;o()(p,{VCol:m["a"],VRow:u["a"],VTextField:d["a"]})}}]);
|
||||
//# sourceMappingURL=chunk-98e0c8cc.240c79a9.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c44c6306"],{"2db4":function(t,i,s){"use strict";s("ca71");var e=s("a9ad"),o=s("f2e7"),a=s("fe6c"),n=s("58df"),c=s("d9bd");i["a"]=Object(n["a"])(e["a"],o["a"],Object(a["b"])(["absolute","top","bottom","left","right"])).extend({name:"v-snackbar",props:{multiLine:Boolean,timeout:{type:Number,default:6e3},vertical:Boolean},data:()=>({activeTimeout:-1}),computed:{classes(){return{"v-snack--active":this.isActive,"v-snack--absolute":this.absolute,"v-snack--bottom":this.bottom||!this.top,"v-snack--left":this.left,"v-snack--multi-line":this.multiLine&&!this.vertical,"v-snack--right":this.right,"v-snack--top":this.top,"v-snack--vertical":this.vertical}}},watch:{isActive(){this.setTimeout()}},created(){this.$attrs.hasOwnProperty("auto-height")&&Object(c["d"])("auto-height",this)},mounted(){this.setTimeout()},methods:{setTimeout(){window.clearTimeout(this.activeTimeout),this.isActive&&this.timeout&&(this.activeTimeout=window.setTimeout(()=>{this.isActive=!1},this.timeout))}},render(t){return t("transition",{attrs:{name:"v-snack-transition"}},[this.isActive&&t("div",{staticClass:"v-snack",class:this.classes,on:this.$listeners},[t("div",this.setBackgroundColor(this.color,{staticClass:"v-snack__wrapper"}),[t("div",{staticClass:"v-snack__content"},this.$slots.default)])])])}})},"4c92":function(t,i,s){"use strict";s.r(i);var e=function(){var t=this,i=t.$createElement,s=t._self._c||i;return s("div",[s("CVselect",{attrs:{name:"SortMode",list:["Largest","Smallest","Highest","Lowest","Rightmost","Leftmost","Closest"]},on:{input:function(i){return t.handleInput("sortMode",t.value.sortMode)}},model:{value:t.value.sortMode,callback:function(i){t.$set(t.value,"sortMode",i)},expression:"value.sortMode"}}),s("span",[t._v("Calibrate:")]),s("v-divider",{attrs:{dark:"",color:"white"}}),s("v-row",{attrs:{align:"center",justify:"start"}},[s("v-col",{staticStyle:{"padding-right":"0px"},attrs:{cols:3}},[s("v-btn",{attrs:{small:"",color:"#4baf62"},on:{click:t.takePointA}},[t._v("Take Point A")])],1),s("v-col",{staticStyle:{"margin-left":"0px"},attrs:{cols:3}},[s("v-btn",{attrs:{small:"",color:"#4baf62"},on:{click:t.takePointB}},[t._v("Take Point B")])],1),s("v-col",[s("v-btn",{attrs:{small:"",color:"yellow darken-3"},on:{click:t.clearSlope}},[t._v("Clear All Points")])],1)],1),s("v-snackbar",{attrs:{timeout:3e3,top:"",color:"error"},model:{value:t.snackbar,callback:function(i){t.snackbar=i},expression:"snackbar"}},[s("span",{staticStyle:{color:"#000"}},[t._v("Points are too close")]),s("v-btn",{attrs:{color:"black",text:""},on:{click:function(i){t.snackbar=!1}}},[t._v("Close")])],1)],1)},o=[],a=s("8384"),n={name:"Output",props:["value"],components:{CVselect:a["a"]},methods:{takePointA(){this.pointA=this.rawPoint,this.calcSlope()},takePointB(){this.pointB=this.rawPoint,this.calcSlope()},calcSlope(){if(void 0!==this.pointA&&void 0!==this.pointB){let t=(this.pointB[1]-this.pointA[1])/(this.pointB[0]-this.pointA[0]),i=this.pointA[1]-t*this.pointA[0];!1===isNaN(t)&&!1===isNaN(i)?this.sendSlope(t,i,!0):this.snackbar=!0,this.pointA=void 0,this.pointB=void 0}},sendSlope(t,i,s){this.handleInput("m",t),this.handleInput("b",i),this.handleInput("isCalibrated",s)},clearSlope(){this.sendSlope(1,0,!1),this.pointA=void 0,this.pointB=void 0}},data(){return{snackbar:!1,pointA:void 0,pointB:void 0}},computed:{rawPoint:{get(){return this.$store.state.point.rawPoint}}}},c=n,l=s("2877"),r=s("6544"),h=s.n(r),v=s("8336"),u=s("62ad"),d=s("ce7e"),p=s("0fd9"),k=s("2db4"),m=Object(l["a"])(c,e,o,!1,null,"58812995",null);i["default"]=m.exports;h()(m,{VBtn:v["a"],VCol:u["a"],VDivider:d["a"],VRow:p["a"],VSnackbar:k["a"]})},ca71:function(t,i,s){}}]);
|
||||
//# sourceMappingURL=chunk-c44c6306.d9c69fb0.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -29,6 +29,7 @@ export default new Vuex.Store({
|
||||
area:[0,12],
|
||||
ratio:[0,12],
|
||||
extent:[0,12],
|
||||
speckle:5,
|
||||
targetGrouping:0,
|
||||
targetIntersection:0,
|
||||
sortMode:0,
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<CVrangeSlider v-model="value.area" name="Area" :min="0" :max="100" :step="0.1" @input="handleInput('area',value.area)"></CVrangeSlider>
|
||||
<CVrangeSlider v-model="value.ratio" name="Ratio (W/H)" :min="0" :max="100" :step="0.1" @input="handleInput('ratio',value.ratio)"></CVrangeSlider>
|
||||
<CVrangeSlider v-model="value.extent" name="Extent" :min="0" :max="100" @input="handleInput('extent',value.extent)"></CVrangeSlider>
|
||||
<CVslider name="Speckle Rejection" :min="0" :max="100" v-model="value.speckle" @input="handleInput('speckle',value.speckle)"></CVslider>
|
||||
<CVselect name="Target Group" :list="['Single','Dual']" v-model="value.targetGroup" @input="handleInput('targetGroup',value.targetGroup)"></CVselect>
|
||||
<CVselect name="Target Intersection" :list="['None','Up','Down','Left','Right']" :disabled="isDisabled" v-model="value.targetIntersection" @input="handleInput('targetIntersection',value.targetIntersection)"></CVselect>
|
||||
|
||||
@@ -12,12 +13,14 @@
|
||||
<script>
|
||||
import CVrangeSlider from '../../components/cv-range-slider'
|
||||
import CVselect from '../../components/cv-select'
|
||||
import CVslider from '../../components/cv-slider'
|
||||
export default {
|
||||
name: 'Contours',
|
||||
props:['value'],
|
||||
components:{
|
||||
CVrangeSlider,
|
||||
CVselect
|
||||
CVselect,
|
||||
CVslider
|
||||
},
|
||||
|
||||
data() {
|
||||
|
||||
Reference in New Issue
Block a user