mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
Full rewrite of camera system
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package com.chameleonvision.vision.camera;
|
||||
|
||||
import edu.wpi.cscore.VideoMode;
|
||||
|
||||
public class CamVideoMode {
|
||||
public final int fps;
|
||||
public final int width;
|
||||
public final int height;
|
||||
public final String pixel_format;
|
||||
|
||||
public CamVideoMode(VideoMode videoMode) {
|
||||
fps = videoMode.fps;
|
||||
width = videoMode.width;
|
||||
height = videoMode.height;
|
||||
pixel_format = videoMode.pixelFormat.name();
|
||||
}
|
||||
|
||||
public VideoMode.PixelFormat getActualPixelFormat() {
|
||||
return VideoMode.PixelFormat.valueOf(pixel_format);
|
||||
}
|
||||
|
||||
public boolean isEqualToVideoMode(VideoMode videoMode) {
|
||||
return videoMode.fps == fps && videoMode.width == width && videoMode.height == height && videoMode.pixelFormat == getActualPixelFormat();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user