fixed problem with clear points in single point calibration

This commit is contained in:
Omer
2019-12-05 23:01:27 +02:00
parent 7bec1bfdfe
commit 2040620270
3 changed files with 11 additions and 1 deletions

View File

@@ -47,6 +47,11 @@ public class Collect2dTargetsPipe implements Pipe<Pair<List<RotatedRect>, Captur
t.rawPoint = r;
switch (this.calibrationMode) {
case Single:
if(this.calibrationPoint.isEmpty())
{
this.calibrationPoint.add(camProps.centerX);
this.calibrationPoint.add(camProps.centerY);
}
t.calibratedX = this.calibrationPoint.get(0).doubleValue();
t.calibratedY = this.calibrationPoint.get(1).doubleValue();
break;

View File

@@ -49,6 +49,11 @@ public class Draw2dCrosshairPipe implements Pipe<Pair<Mat, List<CVPipeline2d.Tar
y = image.rows() / 2;
switch (this.calibrationMode) {
case Single:
if(this.calibrationPoint.isEmpty())
{
this.calibrationPoint.add(x);
this.calibrationPoint.add(y);
}
x = this.calibrationPoint.get(0).intValue();
y = this.calibrationPoint.get(1).intValue();
break;