mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-21 01:01:41 +00:00
fixed problem with clear points in single point calibration
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user