net.sourceforge.jartoolkit.videoinput
Interface JARPictureSource

All Known Implementing Classes:
JARFrameGrabber, JARVideo

public interface JARPictureSource

This interface can be used to realize different videoinputs such as livecam, moviefile or image-sequence.

Author:
Jörg Stöcklein (ozone_abandon at sourceforge.net)

Field Summary
static java.lang.String version
          The Version of JARFrameGrabber.
 
Method Summary
 void displayProperties()
          Displays the properties of the picturresoure in the console
 int getBitCount()
          get the bitdepth of a frame.
 void getBuffer(int[] pixel)
          Get the buffer as an integerarray.
 long getBufferPointer()
          Get the buffer as a longpointer.
 long getBufferSize()
          Get the size of the framebuffer in bytes.
 int getHeight()
          Get the height of a frame.
 void getNextBuffer(int[] pixel)
          Get the next frame and return the buffer as an integerarray.
 long getNextBufferPointer()
          Get the next frame and return the buffer as a longpointer.
 int getWidth()
          Get the width of a frame.
 void grabFrame()
          Grab next frame from picturesource.
 void setFlippedImage(boolean flip)
          Set the flag for flipping the image.
 

Field Detail

version

public static final java.lang.String version
The Version of JARFrameGrabber.

See Also:
Constant Field Values
Method Detail

displayProperties

public void displayProperties()
Displays the properties of the picturresoure in the console


getBitCount

public int getBitCount()
get the bitdepth of a frame.

Returns:
The bitdepth of a frame, eg. 32, 24, etc.

getBuffer

public void getBuffer(int[] pixel)
Get the buffer as an integerarray.

Parameters:
pixel - The buffer in which the framedata will be copied in.

getBufferPointer

public long getBufferPointer()
Get the buffer as a longpointer. This method can by used in method JARToolKit.JARDetectMarker(long dataPtr, int thresh). should be faster than JARDetectMarker( int dataPtr[], int thresh );

Returns:
The buffer of imagedata as longpointer.

getBufferSize

public long getBufferSize()
Get the size of the framebuffer in bytes.
CAUTION: This is the size in bytes.

Returns:
The size of the framebuffer in bytes.

getHeight

public int getHeight()
Get the height of a frame.

Returns:
The height of a frame in pixel.

getNextBuffer

public void getNextBuffer(int[] pixel)
Get the next frame and return the buffer as an integerarray.

Parameters:
pixel - The buffer in which the framedata will be copied in.

getNextBufferPointer

public long getNextBufferPointer()
Get the next frame and return the buffer as a longpointer. Like GetBufferPointer() this method can by used by JARToolKit.JARDetectMarker(long dataPtr, int thresh).

Returns:
The buffer of imagedata as longpointer.

getWidth

public int getWidth()
Get the width of a frame.

Returns:
The width of a frame in pixel.

grabFrame

public void grabFrame()
Grab next frame from picturesource. This call updates the internal framebuffer.


setFlippedImage

public void setFlippedImage(boolean flip)
Set the flag for flipping the image.

Parameters:
flip - If true, the image will be flipped vertically.