Package org.robwork.sdurw_simulation
Class FrameGrabber
- java.lang.Object
-
- org.robwork.sdurw_simulation.FrameGrabber
-
- Direct Known Subclasses:
GLFrameGrabber
public class FrameGrabber extends java.lang.Object
The FrameGrabber abstract interface, can be used to grab images from a
specialized source.
-
-
Constructor Summary
Constructors Constructor Description FrameGrabber(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
static long
getCPtr(FrameGrabber obj)
int
getHeight()
returns the height of the imageImage
getImage()
returns the imageint
getWidth()
returns the width of the imagevoid
grab(FramePtr frame, State state)
this function grabs a image from the specialized source and
copies it to the FrameGrabber image.void
resize(int width, int height)
resizes the image that this frameGrabber use.void
resize(int width, int height, Image.ColorCode colorCode)
resizes the image that this frameGrabber use.
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(FrameGrabber obj)
-
delete
public void delete()
-
getWidth
public int getWidth()
returns the width of the image- Returns:
- the width of the image
-
getHeight
public int getHeight()
returns the height of the image- Returns:
- the height of the image
-
resize
public void resize(int width, int height)
resizes the image that this frameGrabber use. The colorcode will
default to the one that FrameGrabber was initialized with.- Parameters:
width
- [in] width of imageheight
- [in] height of image
-
resize
public void resize(int width, int height, Image.ColorCode colorCode)
resizes the image that this frameGrabber use.- Parameters:
width
- [in] width of image.height
- [in] height of image.colorCode
- [in] Color encoding of the image.
-
getImage
public Image getImage()
returns the image- Returns:
- the image
-
-