Hi, I’m pretty new to coding with java and followed the guide on using the CameraServer class to set up a simple stream of a USB cam to the SmartDashboard. However, the dimensions of the streamed image is tiny (~160x~200). Is there any way to make this bigger without losing quality?
Are you talking about making the image displayed on SmartDashboard bigger, or changing the resolution of the image?
You should be able to click and drag to resize the image on SmartDashboard. I might be thinking of shuffleboard, but you may have to enter edit mode (ctrl-e) to be able to move and resize.
If you’re looking to change the resolution, or if the image after resizing is pixelated, you can increase the resolution in code. startAutomaticCapture() returns a UsbCamera object that has a setResolution method which can be used to change resolution. All together, starting a camera stream of a specific size might look like: CameraServer.getInstance().startAutomaticCapture().setResolution(640, 480);
Sorry if I was not clear enough with my question. I was asking about increasing the resolution in code. Thanks for helping with that.