summaryrefslogtreecommitdiff
path: root/WPIJavaCV/src/edu/wpi/first/wpijavacv/WPILaptopCamera.java
diff options
context:
space:
mode:
authorBrad Miller <brad@bradhouse.com>2014-10-01 06:32:22 -0400
committerBrad Miller <brad@bradhouse.com>2014-10-01 06:32:22 -0400
commit8533eb7d10c59cdcd6023e2c1a9edb19f16af756 (patch)
treeff4a79dcbc609fd40523ee9d74c098c2eb7b26aa /WPIJavaCV/src/edu/wpi/first/wpijavacv/WPILaptopCamera.java
parentb44483d04ecee7a5378255da8fe4cdf62ea2dfae (diff)
Initial commit of files from FIRSTForge project
Diffstat (limited to 'WPIJavaCV/src/edu/wpi/first/wpijavacv/WPILaptopCamera.java')
-rw-r--r--WPIJavaCV/src/edu/wpi/first/wpijavacv/WPILaptopCamera.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/WPIJavaCV/src/edu/wpi/first/wpijavacv/WPILaptopCamera.java b/WPIJavaCV/src/edu/wpi/first/wpijavacv/WPILaptopCamera.java
new file mode 100644
index 0000000..1414b35
--- /dev/null
+++ b/WPIJavaCV/src/edu/wpi/first/wpijavacv/WPILaptopCamera.java
@@ -0,0 +1,28 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package edu.wpi.first.wpijavacv;
+
+import static com.googlecode.javacv.cpp.opencv_highgui.*;
+/**
+ * A class used to gather images from cameras connected to the laptop
+ * @author Greg
+ */
+public class WPILaptopCamera extends WPIDisposable {
+ CvCapture cam;
+
+ public WPILaptopCamera() {
+ cam = cvCreateCameraCapture(0);
+ }
+
+ public WPIColorImage getCurrentFrame(){
+ return new WPIColorImage(cvQueryFrame(cam));
+ }
+
+ @Override
+ protected void disposed() {
+ }
+
+}