mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-03 03:01:40 +00:00
Change order of drawing to better show axes (#541)
This commit is contained in:
@@ -118,22 +118,6 @@ public class Draw3dTargetsPipe
|
||||
ColorHelper.colorToScalar(Color.green),
|
||||
3);
|
||||
}
|
||||
for (int i = 0; i < bottomPoints.size(); i++) {
|
||||
Imgproc.line(
|
||||
in.getLeft(),
|
||||
bottomPoints.get(i),
|
||||
topPoints.get(i),
|
||||
ColorHelper.colorToScalar(Color.blue),
|
||||
3);
|
||||
}
|
||||
for (int i = 0; i < topPoints.size(); i++) {
|
||||
Imgproc.line(
|
||||
in.getLeft(),
|
||||
topPoints.get(i),
|
||||
topPoints.get((i + 1) % (bottomPoints.size())),
|
||||
ColorHelper.colorToScalar(Color.orange),
|
||||
3);
|
||||
}
|
||||
|
||||
// Draw X, Y and Z axis
|
||||
MatOfPoint3f pointMat = new MatOfPoint3f();
|
||||
@@ -163,12 +147,6 @@ public class Draw3dTargetsPipe
|
||||
dividePointList(axisPoints);
|
||||
|
||||
// Red = x, green y, blue z
|
||||
Imgproc.line(
|
||||
in.getLeft(),
|
||||
axisPoints.get(0),
|
||||
axisPoints.get(1),
|
||||
ColorHelper.colorToScalar(Color.RED),
|
||||
3);
|
||||
Imgproc.line(
|
||||
in.getLeft(),
|
||||
axisPoints.get(0),
|
||||
@@ -181,6 +159,29 @@ public class Draw3dTargetsPipe
|
||||
axisPoints.get(3),
|
||||
ColorHelper.colorToScalar(Color.BLUE),
|
||||
3);
|
||||
Imgproc.line(
|
||||
in.getLeft(),
|
||||
axisPoints.get(0),
|
||||
axisPoints.get(1),
|
||||
ColorHelper.colorToScalar(Color.RED),
|
||||
3);
|
||||
|
||||
for (int i = 0; i < bottomPoints.size(); i++) {
|
||||
Imgproc.line(
|
||||
in.getLeft(),
|
||||
bottomPoints.get(i),
|
||||
topPoints.get(i),
|
||||
ColorHelper.colorToScalar(Color.blue),
|
||||
3);
|
||||
}
|
||||
for (int i = 0; i < topPoints.size(); i++) {
|
||||
Imgproc.line(
|
||||
in.getLeft(),
|
||||
topPoints.get(i),
|
||||
topPoints.get((i + 1) % (bottomPoints.size())),
|
||||
ColorHelper.colorToScalar(Color.orange),
|
||||
3);
|
||||
}
|
||||
|
||||
tempMat.release();
|
||||
jac.release();
|
||||
|
||||
Reference in New Issue
Block a user