Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- FreeIMU
- BMP085
- Barometer
- Triple Axis Magnetometer
- ITG3200
- imu
- xloader
- 9DOF
- Arduino 328p
- multiwii
- WinARM
- Digital Pressure Sensor
- atmega1280
- AT91
- Honeywell
- Sebastian Madgwick
- AVR
- javacv
- java
- atmega
- 멀티위
- Bosch
- atmega168
- capture
- QuadricopterX
- WinAVR
- HMC5883L
- BMA180
- HMC5843
- arduino
Archives
- Today
- Total
스나군 작업실
JavaCV : Capture Image from webcam 본문
원문 : http://ganeshtiwaridotcomdotnp.blogspot.com/2011/12/javacv-capture-image-from-webcam.html
Java Code for capturing image from webcam- uses JavaCV (java wrapper for OpenCV) library
Working CODE:
import com.googlecode.javacv.OpenCVFrameGrabber;
import com.googlecode.javacv.cpp.opencv_core.IplImage;
import static com.googlecode.javacv.cpp.opencv_highgui.*;
public class CaptureImage {
private static void captureFrame() {
// 0-default camera, 1 - next...so on
final OpenCVFrameGrabber grabber = new OpenCVFrameGrabber(0);
try {
grabber.start();
IplImage img = grabber.grab();
if (img != null) {
cvSaveImage("capture.jpg", img);
}
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
captureFrame();
}
}
'Java > 라이브러리' 카테고리의 다른 글
JavaCV: Capture/save/flip image and show live image on CanvasFrame from camera (0) | 2012.01.04 |
---|---|
OpenCV-JavaCV : eclipse project configuration windows 7 (0) | 2012.01.04 |
Comments