|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavaclient.PlayerDevice
javaclient.CameraInterface
public class CameraInterface
The camera interface is used to see what the camera sees. It is intended
primarily for server-side (i.e., driver-to-driver) data transfers, rather
than server-to-client transfers. Image data can be in may formats (see below),
but is always packed (i.e., pixel rows are byte-aligned).
This interface has no commands or configuration requests.
Field Summary | |
---|---|
static short |
PLAYER_CAMERA_COMPRESS_JPEG
|
static short |
PLAYER_CAMERA_COMPRESS_RAW
|
static short |
PLAYER_CAMERA_FORMAT_MONO16
Image format : 16-bit monochrome (network byte order) |
static short |
PLAYER_CAMERA_FORMAT_MONO8
Image format : 8-bit monochrome |
static short |
PLAYER_CAMERA_FORMAT_RGB565
Image format : 16-bit color (5 bits R, 6 bits G, 5 bits B) |
static short |
PLAYER_CAMERA_FORMAT_RGB888
Image format : 24-bit color (8 bits R, 8 bits G, 8 bits B) |
static short |
PLAYER_CAMERA_IMAGE_HEIGHT
|
static int |
PLAYER_CAMERA_IMAGE_SIZE
|
static short |
PLAYER_CAMERA_IMAGE_WIDTH
Image dimensions |
Fields inherited from class javaclient.PlayerDevice |
---|
device, DIFFERENCE_SYNCH_FACTOR, index, is, os, pc, PLAYER_MAX_REQREP_SIZE, PLAYER_STXX, reserved, size, t_sec, t_usec, ts_sec, ts_usec |
Constructor Summary | |
---|---|
CameraInterface(PlayerClient pc,
short indexOfDevice)
Constructor for CameraInterface. |
Method Summary | |
---|---|
byte |
getBPP()
Returns the image bits-per-pixel (8, 16, 24, 32) value. |
byte |
getCompression()
Returns the image compression status (PLAYER_CAMERA_COMPRESS_RAW indicates no compression.). |
short |
getFDiv()
Some images (such as disparity maps) use scaled pixel values; for these images, fdiv specifies the scale divisor (i.e., divide the integer pixel value by fdiv to recover the real pixel value). |
byte |
getFormat()
Returns the image format (must be compatible with depth). |
short |
getHeight()
Returns the image height dimension. |
byte[] |
getImage()
Returns the compressed image data (byte-aligned, row major order). |
int |
getImageSize()
Returns the size of image data as stored in image buffer (bytes). |
short |
getWidth()
Returns the image width dimension. |
void |
handleResponse(int size)
Handle acknowledgement response messages (threaded mode). |
void |
readData()
Read the camera data. See the player_camera_data structure from player.h |
Methods inherited from class javaclient.PlayerDevice |
---|
getTimeForDataSampled_sec, getTimeForDataSampled_usec, getTimeForDataSampled, getTimeForDataSent_sec, getTimeForDataSent_usec, getTimeForDataSent, handleEARMessage, handleNARMessage, readHeader, sendHeader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final short PLAYER_CAMERA_IMAGE_WIDTH
public static final short PLAYER_CAMERA_IMAGE_HEIGHT
public static final int PLAYER_CAMERA_IMAGE_SIZE
public static final short PLAYER_CAMERA_FORMAT_MONO8
public static final short PLAYER_CAMERA_FORMAT_MONO16
public static final short PLAYER_CAMERA_FORMAT_RGB565
public static final short PLAYER_CAMERA_FORMAT_RGB888
public static final short PLAYER_CAMERA_COMPRESS_RAW
public static final short PLAYER_CAMERA_COMPRESS_JPEG
Constructor Detail |
---|
public CameraInterface(PlayerClient pc, short indexOfDevice)
pc
- a reference to the PlayerClient objectindexOfDevice
- the index of the deviceMethod Detail |
---|
public void readData()
readData
in class PlayerDevice
public short getWidth()
public short getHeight()
public byte getBPP()
public byte getFormat()
public short getFDiv()
public byte getCompression()
public int getImageSize()
public byte[] getImage()
public void handleResponse(int size)
handleResponse
in class PlayerDevice
size
- size of the payload
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |