23 private Int64 frameId = 0;
24 private Int64 timestamp = 0;
27 if (leftImage ==
null || rightImage ==
null) {
28 throw new ArgumentNullException(
"images");
30 if (leftImage.
type != rightImage.
type ||
34 leftImage.
bpp != rightImage.
bpp ||
36 throw new ArgumentException(
"image mismatch");
38 this.frameId = frameId;
39 this.timestamp = timestamp;
40 this.leftImage = leftImage;
41 this.rightImage = rightImage;
45 return camera ==
CameraType.LEFT ? leftImage : rightImage;
186 this.frameId == other.frameId &&
196 return "Image sequence" + this.frameId +
", format: " + this.
Format +
", type: " + this.
Type;
215 return (
int)leftImage.
width;
225 return (
int)leftImage.
height;
239 return (
int)leftImage.
bpp;
249 switch (leftImage.
format) {
262 switch (leftImage.
type) {
float[] Data
The distortion data.
The Image class represents a stereo image pair from the Leap Motion device.
int Height
The image height.
Image(Int64 frameId, Int64 timestamp, ImageData leftImage, ImageData rightImage)
override string ToString()
A string containing a brief, human readable description of the Image object.
float RayOffsetY(CameraType camera)
The vertical ray offset for a particular camera.
float RayScaleX(CameraType camera)
The horizontal ray scale factor for a particular camera.
float[] Distortion(CameraType camera)
The distortion calibration map for this image.
UInt32 NumBytes
The number of bytes in the Data() buffer corresponding to each image. Use the ByteOffset() function t...
int DistortionWidth
The stride of the distortion map.
int Width
The image width.
int DistortionHeight
The distortion map height. Currently fixed at 64.
byte[] Data(CameraType camera)
The buffer containing the image data.
FormatType Format
The image format.
Vector PixelToRectilinear(CameraType camera, Vector pixel)
Provides the corrected camera ray intercepting the specified point on the image.
Int64 Timestamp
Returns a timestamp indicating when this frame began being captured on the device.
float RayScaleY(CameraType camera)
The vertical ray scale factor for a particular camera.
bool Equals(Image other)
Compare Image object equality.
Int64 SequenceId
The image sequence ID.
UInt32 ByteOffset(CameraType camera)
The offset, in number of bytes, from the beginning of the Data() buffer to the first byte of the imag...
Vector RectilinearToPixel(CameraType camera, Vector ray)
Provides the point in the image corresponding to a ray projecting from the camera.
FormatType
Enumerates the possible image formats.
int BytesPerPixel
The number of bytes per pixel.
float RayOffsetX(CameraType camera)
The horizontal ray offset for a particular camera.
static Connection GetConnection(int connectionId=0)
Vector RectilinearToPixel(Image.CameraType camera, Vector ray)
Vector PixelToRectilinear(Image.CameraType camera, Vector pixel)
DistortionData DistortionData
The Vector struct represents a three-component mathematical vector or point such as a direction or po...