public class Camera extends Object
Camera is a
convenience class that makes use of Demuxer to retrieve images from
input devices.| Constructor and Description |
|---|
Camera(String device,
String source)
Creates a new
Camera capture for specified device that captures frames
from the specified source. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the camera and free associated memory.
|
BufferedImage |
getImage()
Retrieve one picture from this camera.
|
String |
getName()
Get the camera name or identifier.
|
boolean |
isOpen()
Checks whether this camera is opened.
|
void |
open(int width,
int height,
double frameRate)
Open the camera with specified image size and capture frame rate.
|
public String getName()
public BufferedImage getImage() throws JavaAVException
3BYTE_BGR.null if an error occurs.JavaAVExceptionpublic void open(int width,
int height,
double frameRate)
throws JavaAVException
width - the image width.height - the image height.frameRate - the capture frame rate.JavaAVException - if camera could not be opened.public void close()
getImage()
will return null.public boolean isOpen()
Copyright © 2013. All Rights Reserved.