generated from DeepBlueRobotics/EmptyProject2024
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from DeepBlueRobotics/camera-skt
Camera skt
- Loading branch information
Showing
7 changed files
with
33 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.carlmontrobotics.subsystems; | ||
import edu.wpi.first.cscore.CvSink; | ||
import edu.wpi.first.cscore.CvSource; | ||
import edu.wpi.first.cscore.MjpegServer; | ||
import edu.wpi.first.cscore.UsbCamera; | ||
import edu.wpi.first.cscore.UsbCameraInfo; | ||
import edu.wpi.first.util.PixelFormat; | ||
public class Camera { | ||
public Camera(){ | ||
UsbCamera usbCamera = new UsbCamera("USB Camera 0", 0); | ||
MjpegServer mjpegServer1 = new MjpegServer("serve_USB Camera 0", 1 | ||
); | ||
mjpegServer1.setSource(usbCamera); | ||
|
||
// Creates the CvSink and connects it to the UsbCamera | ||
CvSink cvSink = new CvSink("opencv_USB Camera 0"); | ||
cvSink.setSource(usbCamera); | ||
|
||
// Creates the CvSource and MjpegServer [2] and connects them | ||
CvSource outputStream = new CvSource("Blur", PixelFormat.kMJPEG, 640, 480, 30); | ||
MjpegServer mjpegServer2 = new MjpegServer("serve_Blur", 2); | ||
mjpegServer2.setSource(outputStream); | ||
|
||
|
||
//OR | ||
|
||
} | ||
|
||
} |