blob: 1414b3520e99f58109fed2ea75d2146e8eb2a5ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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() {
}
}
|