libkovan  1
The kovan standard library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Depth Sensor

Functions

EXPORT_SYM int depth_open ()
 
EXPORT_SYM int depth_close ()
 
EXPORT_SYM DepthResolution get_depth_resolution ()
 
EXPORT_SYM int set_depth_resolution (DepthResolution resolution)
 
EXPORT_SYM int set_depth_orientation (int orientation)
 
EXPORT_SYM int get_depth_orientation ()
 
EXPORT_SYM int depth_update ()
 
EXPORT_SYM int get_depth_image_height ()
 
EXPORT_SYM int get_depth_image_width ()
 
EXPORT_SYM int get_depth_value (int row, int column)
 
EXPORT_SYM point3 get_depth_world_point (int row, int column)
 
EXPORT_SYM int get_depth_world_point_x (int row, int column)
 
EXPORT_SYM int get_depth_world_point_y (int row, int column)
 
EXPORT_SYM int get_depth_world_point_z (int row, int column)
 

Detailed Description

Function Documentation

EXPORT_SYM int depth_close ( )

Closes the depth sensor

Returns
1 on success, 0 otherwise
EXPORT_SYM int depth_open ( )

Opens the depth sensor. This is the first function which has to be called before any other function!

Returns
1 on success, 0 otherwise
EXPORT_SYM int depth_update ( )

Pulls a new depth image from the depth sensor for future processing.

Returns
1 on success, 0 otherwise
EXPORT_SYM int get_depth_image_height ( )

Returns the height of the depth image stored by depth_update in pixel

Returns
Height of the depth image in pixel or 0 if no depth image was saved
See Also
depth_update
EXPORT_SYM int get_depth_image_width ( )

Returns the width of the depth image stored by depth_update in pixel

Returns
Width of the depth image in pixel or 0 if no depth image was saved
See Also
depth_update
EXPORT_SYM int get_depth_orientation ( )

Gets the depth image orientation

Returns
Depth image orientation or 0xFFFF in case of an error
EXPORT_SYM DepthResolution get_depth_resolution ( )

Get the current depth image resolution

Returns
The current depth image resolution
See Also
set_depth_resolution
depth_update
EXPORT_SYM int get_depth_value ( int  row,
int  column 
)

Returns the depth value of a depth pixel.

Parameters
rowRow index of the depth pixel
columnColumn index of the depth pixel
Returns
The depth value in millimeters or INVALID_COORDINATE if no depth image was saved or if the depth value is not visible by the depth sensor
Note
the row/column index starts with 0
See Also
depth_image_get_height
depth_image_get_width
EXPORT_SYM point3 get_depth_world_point ( int  row,
int  column 
)

Returns the world coordinates of the specified point.

Parameters
rowRow index of the depth pixel
columnColumn index of the depth pixel
Returns
The world coordinates in millimeters or (-1, -1, -1) if no depth image was saved or if the depth value is not visible by the depth sensor
Note
the row/column index starts with 0
EXPORT_SYM int get_depth_world_point_x ( int  row,
int  column 
)

Returns the x world coordinate of the specified point.

Parameters
rowRow index of the depth pixel
columnColumn index of the depth pixel
Returns
The x world coordinate in millimeters or -1 if no depth image was saved or if the depth value is not visible by the depth sensor
Note
the row/column index starts with 0
EXPORT_SYM int get_depth_world_point_y ( int  row,
int  column 
)

Returns the y world coordinate of the specified point.

Parameters
rowRow index of the depth pixel
columnColumn index of the depth pixel
Returns
The y world coordinate in millimeters or -1 if no depth image was saved or if the depth value is not visible by the depth sensor
Note
the row/column index starts with 0
EXPORT_SYM int get_depth_world_point_z ( int  row,
int  column 
)

Returns the z world coordinate of the specified point.

Parameters
rowRow index of the depth pixel
columnColumn index of the depth pixel
Returns
The z world coordinate in millimeters or -1 if no depth image was saved or if the depth value is not visible by the depth sensor
Note
the row/column index starts with 0
EXPORT_SYM int set_depth_orientation ( int  orientation)

Sets the depth image orientation

Parameters
orientationDepth image orientation
Returns
1 on success, 0 otherwise
Note
Only 0 and 180 degree are supported yet
EXPORT_SYM int set_depth_resolution ( DepthResolution  resolution)

Set the current depth image resolution.

Parameters
resolutionNew depth image resolution
Returns
1 on success, 0 otherwise
See Also
get_depth_resolution
depth_update