Class CameraConfiguration
java.lang.Object
org.photonvision.common.configuration.CameraConfiguration
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionint
boolean
Deactivated vision modules do not open camera hardware or lock USB portsdouble
The info of the camera we last matched to.User-set nicknameint
A unique name (ostensibly an opaque UUID) to identify this particular configuration -
Constructor Summary
ConstructorDescriptionCameraConfiguration
(String uniqueName, PVCameraInfo camInfo) CameraConfiguration
(String uniqueName, PVCameraInfo matchedCameraInfo, String nickname, boolean deactivated, QuirkyCamera cameraQuirks, double FOV, List<CameraCalibrationCoefficients> calibrations, int currentPipelineIndex) CameraConfiguration
(PVCameraInfo camInfo) Constructor for when we don't know anything about the camera yet.CameraConfiguration
(PVCameraInfo cameraInfo, String uniqueName, String nickname) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCalibration
(CameraCalibrationCoefficients calibration) Replace a calibration in our list with the same unrotatedImageSize with a new one, or add it if none exists yet.void
addPipelineSetting
(CVPipelineSettings setting) void
addPipelineSettings
(List<CVPipelineSettings> settings) cscore will auto-reconnect to the camera path we give it.void
setPipelineSettings
(List<CVPipelineSettings> settings) toString()
UICameraConfiguration has some stuff particular to VisionModule, but enough of it's common to warrant this helper
-
Field Details
-
uniqueName
A unique name (ostensibly an opaque UUID) to identify this particular configuration -
matchedCameraInfo
The info of the camera we last matched to. We still match by unique path (where we can), but this is useful to provide warnings to users -
nickname
User-set nickname -
deactivated
public boolean deactivatedDeactivated vision modules do not open camera hardware or lock USB ports -
cameraQuirks
-
FOV
public double FOV -
calibrations
-
currentPipelineIndex
public int currentPipelineIndex -
streamIndex
public int streamIndex -
pipelineSettings
-
driveModeSettings
-
-
Constructor Details
-
CameraConfiguration
-
CameraConfiguration
public CameraConfiguration(String uniqueName, PVCameraInfo matchedCameraInfo, String nickname, boolean deactivated, QuirkyCamera cameraQuirks, double FOV, List<CameraCalibrationCoefficients> calibrations, int currentPipelineIndex) -
CameraConfiguration
-
CameraConfiguration
Constructor for when we don't know anything about the camera yet. Generates a UUID for the unique name
-
-
Method Details
-
addPipelineSettings
-
addPipelineSetting
-
setPipelineSettings
-
addCalibration
Replace a calibration in our list with the same unrotatedImageSize with a new one, or add it if none exists yet. If we are replacing an existing calibration, the old one will be "released" and the underlying data matrices will become invalid.- Parameters:
calibration
- The calibration to add.
-
getDevicePath
cscore will auto-reconnect to the camera path we give it. v4l does not guarantee that if i swap cameras around, the same /dev/videoN ID will be assigned to that camera. So instead default to pinning to a particular USB port, or by "path" (appears to be a global identifier on Windows).This represents our best guess at an immutable path to detect a camera at.
-
toShortString
-
toString
-
toUiConfig
UICameraConfiguration has some stuff particular to VisionModule, but enough of it's common to warrant this helper
-