mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-21 01:01:41 +00:00
Recreated all pipeline steps as Pipes and set up CVPipeline2d
This commit is contained in:
@@ -31,9 +31,8 @@ public class CameraProperties {
|
||||
public CameraProperties(UsbCamera baseCamera, double fov) {
|
||||
FOV = fov;
|
||||
|
||||
// TODO: determine how to set the initial videomode properly
|
||||
videoModes = filterVideoModes(baseCamera.enumerateVideoModes());
|
||||
|
||||
|
||||
}
|
||||
|
||||
private List<VideoMode> filterVideoModes(VideoMode[] videoModes) {
|
||||
|
||||
@@ -9,8 +9,8 @@ public class CameraStaticProperties {
|
||||
public final int ImageHeight;
|
||||
public final double FOV;
|
||||
public final double ImageArea;
|
||||
public final double CenterX;
|
||||
public final double CenterY;
|
||||
public final double centerX;
|
||||
public final double centerY;
|
||||
public final double HorizontalFocalLength;
|
||||
public final double VerticalFocalLength;
|
||||
|
||||
@@ -19,8 +19,8 @@ public class CameraStaticProperties {
|
||||
ImageHeight = imageHeight;
|
||||
FOV = fov;
|
||||
ImageArea = ImageWidth * ImageHeight;
|
||||
CenterX = ((double) ImageWidth / 2) - 0.5;
|
||||
CenterY = ((double) ImageHeight / 2) - 0.5;
|
||||
centerX = ((double) ImageWidth / 2) - 0.5;
|
||||
centerY = ((double) ImageHeight / 2) - 0.5;
|
||||
|
||||
// pinhole model calculations
|
||||
double diagonalView = FastMath.toRadians(FOV);
|
||||
|
||||
@@ -5,7 +5,7 @@ import edu.wpi.cscore.VideoMode;
|
||||
|
||||
public class USBCamera {
|
||||
private final UsbCamera baseCamera;
|
||||
private final CameraProperties properties;
|
||||
public final CameraProperties properties;
|
||||
|
||||
public USBCamera(UsbCamera camera) {
|
||||
baseCamera = camera;
|
||||
|
||||
Reference in New Issue
Block a user