Enum Class TargetModel

java.lang.Object
java.lang.Enum<TargetModel>
org.photonvision.vision.target.TargetModel
All Implemented Interfaces:
Serializable, Comparable<TargetModel>, Constable, Releasable

public enum TargetModel extends Enum<TargetModel> implements Releasable
A model representing the vertices of targets with known shapes. The vertices are in the EDN coordinate system. When creating a TargetModel, the vertices must be supplied in a certain order to ensure correct correspondence with corners detected in 2D for use with SolvePNP. For planar targets, we expect the target's Z-axis to point towards the camera.

SolvePNPPipe expects 3d object points to correspond to the CornerDetectionPipe implementation. The 2d corner detection finds the 4 extreme corners (bottom-left, bottom-right, top-right, top-left). To match our expectations, this means the model vertices would look like:

  • (+x, +y, 0)
  • (-x, +y, 0)
  • (-x, -y, 0)
  • (+x, -y, 0)

AprilTag models are currently only used for drawing on the output stream.