|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jartoolkit.videoinput.videocapturing.JARVideo
Class used for capturing a video using DirectX on Windows.
This class is a native interface to the ARVideo-dll used by the
ARToolKit. This code is based on the ARToolKit 2.65f & DSVideoLib 0.0.5a
modified by Thomas Pintaric from the Vienna University of Technology
(http://www.ims.tuwien.ac.at/~thomas/artoolkit.php). You need
DirectX 9b installed on your maschine, because of using DirectShow for
grabbing the frames. Without a capturing-device this class woun't run, too.
The get an instance of this class you have to call the Create-method. Only
one instance of this class will created. The use JARVideo you
have to do following steps:
Field Summary | |
static java.lang.String |
version
The Version of JARVideo. |
Method Summary | |
static JARVideo |
create()
Create a JARVideo instance. |
static JARVideo |
create(java.lang.String config)
Create a JARVideo instance. |
static JARVideo |
create(java.lang.String config,
int buffer)
Create a JARVideo instance. |
void |
displayProperties()
Print the capturedevice-properties to the console. |
int |
getBitCount()
get the bitdepth of a frame. |
int |
getBitCount(int buffer)
get the bitdepth of a frame. |
void |
getBuffer(int[] pixel)
Get the buffer as an integerarray. |
void |
getBuffer(int[] pixel,
int buffer)
Get the buffer as an integerarray. |
long |
getBufferPointer()
Get the buffer as a longpointer. |
long |
getBufferPointer(int buffer)
Get the buffer as a longpointer. |
long |
getBufferSize()
Get the size of the framebuffer in bytes. |
long |
getBufferSize(int buffer)
Get the size of the framebuffer in bytes. |
int |
getHeight()
Get the height of a frame. |
int |
getHeight(int buffer)
Get the height of a frame. |
void |
getNextBuffer(int[] pixel)
Get the next frame and return the buffer as an integerarray. |
void |
getNextBuffer(int[] pixel,
int buffer)
Get the next frame and return the buffer as an integerarray. |
long |
getNextBufferPointer()
Get the next frame and return the buffer as a longpointer. |
long |
getNextBufferPointer(int buffer)
Get the next frame and return the buffer as a longpointer. |
int |
getWidth()
Get the width of a frame. |
int |
getWidth(int buffer)
Get the width of a frame. |
void |
grabFrame()
Grab next frame from capturedevice. |
void |
grabFrame(int buffer)
Grab next frame from capturedevice. |
void |
setFlippedImage(boolean flip)
Set the flag for flipping the image. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String version
Method Detail |
public static JARVideo create() throws java.lang.InstantiationException
java.lang.InstantiationException
public static JARVideo create(java.lang.String config) throws java.lang.InstantiationException
config
- Configuration for initialising DirectShow (Please refer
video.h by Thomas Pintaric.
java.lang.InstantiationException
public static JARVideo create(java.lang.String config, int buffer) throws java.lang.InstantiationException
config
- Configuration for initialising DirectShow (Please refer
video.h by Thomas Pintaric.buffer
- Used for specify which buffer to use (Refer video.h
by Thomas Pintaric.)
java.lang.InstantiationException
public void displayProperties()
displayProperties
in interface JARPictureSource
public int getBitCount()
getBitCount
in interface JARPictureSource
public int getBitCount(int buffer)
buffer
- Specify left(0) or right(1) buffer of a stereoimage.
public void getBuffer(int[] pixel)
getBuffer
in interface JARPictureSource
pixel
- The buffer in which the framedata will be copied in.public void getBuffer(int[] pixel, int buffer)
pixel
- The buffer in which the framedata will be copied in.buffer
- Specify left(0) or right(1) buffer of a stereoimage.public long getBufferPointer()
getBufferPointer
in interface JARPictureSource
public long getBufferPointer(int buffer)
buffer
- Specify left(0) or right(1) buffer of a stereoimage.
public long getBufferSize()
int size = JARVideo.GetBufferSize(); dataArray = new int[size>>2]; ... JARVideo.GetBuffer(dataArray);
getBufferSize
in interface JARPictureSource
public long getBufferSize(int buffer)
int size = JARVideo.GetBufferSize(); dataArray = new int[size>>2]; ... JARVideo.GetBuffer(dataArray);
buffer
- Specify left(0) or right(1) buffer of a stereoimage.
public int getHeight()
getHeight
in interface JARPictureSource
public int getHeight(int buffer)
buffer
- Specify left(0) or right(1) buffer of a stereoimage.
public void getNextBuffer(int[] pixel)
getNextBuffer
in interface JARPictureSource
pixel
- The buffer in which the framedata will be copied in.public void getNextBuffer(int[] pixel, int buffer)
pixel
- The buffer in which the framedata will be copied in.buffer
- Specify left(0) or right(1) buffer of a stereoimage.public long getNextBufferPointer()
getNextBufferPointer
in interface JARPictureSource
public long getNextBufferPointer(int buffer)
buffer
- Specify left(0) or right(1) buffer of a stereoimage.
public int getWidth()
getWidth
in interface JARPictureSource
public int getWidth(int buffer)
buffer
- Specify left(0) or right(1) buffer of a stereoimage.
public void grabFrame()
grabFrame
in interface JARPictureSource
public void grabFrame(int buffer)
buffer
- Specify left(0) or right(1) buffer of a stereoimage.public void setFlippedImage(boolean flip)
setFlippedImage
in interface JARPictureSource
flip
- If true, the image will be flipped vertically.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |