Candy
|
Depth camera is the base type for all nodes that provide depth camera data, from such devices as the Kinect or Primesense Sensor. More...
Classes | |
struct | ExtremesMap |
A map of extremes. More... | |
struct | SFBackgroundImage |
struct | SFPositionImage |
struct | Shape |
struct | ViewSize |
Public Types | |
typedef H3D::H3DImageObject::SFImage | SFImage |
typedef H3D::TypedSFNode < Candy::PaintTexture > | SFPaintTexture |
typedef std::vector< H3D::Vec3f > | contour_t |
typedef std::vector< contour_t > | contours_t |
Public Member Functions | |
DepthCamera (H3D::Inst< H3D::SFNode > _metadata=0, H3D::Inst< H3D::SFVec2f > _fieldOfView=0, H3D::Inst< ViewSize > _viewSize=0, H3D::Inst< H3D::SFBool > _updateBackground=0, H3D::Inst< H3D::SFFloat > _maximumBackgroundDistance=0, H3D::Inst< H3D::SFFloat > _backgroundDepthMargin=0, H3D::Inst< H3D::SFInt32 > _backgroundPixelMargin=0, H3D::Inst< SFImage > _depthData=0, H3D::Inst< SFPositionImage > _positionData=0, H3D::Inst< SFBackgroundImage > _depthDataBackground=0, H3D::Inst< SFPaintTexture > _debugTexture=0) | |
virtual std::string | defaultXMLContainerField () |
H3D::Vec3f | pixel2DtoLine (float x, float y) |
Convert a pixel coordinate on the Kinect image into a 3D line representing that pixels direction from the Kinects point of view. More... | |
H3D::Vec3f | pixel2Dto3D (float x, float y, float d) |
Convert a pixel coordinate on the Kinect image and depth value into a 3D position from the Kinects point of view. More... | |
H3D::Vec3f | pixel2Dto3D (H3D::Vec3f p) |
Convert a pixel coordinate on the Kinect image (x,y,depth) into a 3D position from the Kinects point of view. More... | |
H3D::Vec3f | point2DtoLine (float x, float y) |
Convert a point on the Kinect image into a 3D line representing that pixels direction from the Kinects point of view. More... | |
H3D::Vec3f | point2Dto3D (float x, float y, float d) |
Convert a point on the Kinect image into a 3D position from the Kinects point of view. More... | |
H3D::Vec3f | point2Dto3D (H3D::Vec3f p) |
Convert a point on the Kinect image into a 3D position from the Kinects point of view. More... | |
const std::vector< Shape > & | getShapes () |
H3D::Vec2f | getExtremes () |
Returns a 2D vector containing the largest and smallest value of the depth in x and y, respectively. More... | |
const ExtremesMap & | getExtremesMap () |
Returns a map of extremes. More... | |
Public Attributes | |
struct HVR_API | Shape |
struct HVR_API | ExtremesMap |
std::auto_ptr< H3D::SFVec2f > | fieldOfView |
![]() | |
std::auto_ptr< ViewSize > | viewSize |
![]() | |
std::auto_ptr< H3D::SFBool > | updateBackground |
![]() | |
std::auto_ptr< H3D::SFFloat > | maximumBackgroundDistance |
![]() | |
std::auto_ptr< H3D::SFFloat > | backgroundDepthMargin |
![]() | |
std::auto_ptr< H3D::SFInt32 > | backgroundPixelMargin |
![]() | |
std::auto_ptr< SFImage > | depthData |
![]() | |
std::auto_ptr< SFPositionImage > | positionData |
![]() | |
std::auto_ptr< SFBackgroundImage > | depthDataBackground |
![]() | |
std::auto_ptr< SFPaintTexture > | debugTexture |
![]() | |
Static Public Attributes | |
static H3D::H3DNodeDatabase | database |
Protected Member Functions | |
void | update_debug_texture () |
Protected Attributes | |
struct HVR_API | ViewSize |
struct HVR_API | SFBackgroundImage |
struct HVR_API | SFPositionImage |
Depth camera is the base type for all nodes that provide depth camera data, from such devices as the Kinect or Primesense Sensor.
|
inline |
Returns a 2D vector containing the largest and smallest value of the depth in x and y, respectively.
If there are no extremes, for example if everything is background, then the vector will be (-1,-1).
|
inline |
Returns a map of extremes.
Each cell of the map has a 2D vector containing the largest and smallest value of the depth for that cell in x and y, respectively. If there are no extremes of the cell, for example if the cell shows only background, then the vector will be (-1,-1).
Convert a pixel coordinate on the Kinect image and depth value into a 3D position from the Kinects point of view.
This function will return origin if the actual 3D position could not be calculated.
|
inline |
Convert a pixel coordinate on the Kinect image (x,y,depth) into a 3D position from the Kinects point of view.
The unit of depth is meters.
Convert a pixel coordinate on the Kinect image into a 3D line representing that pixels direction from the Kinects point of view.
Returns a unit vector, or a zero vector if no depth image is available yet.
Convert a point on the Kinect image into a 3D position from the Kinects point of view.
The x and y of the image point are in the range -1 to 1, while the depth is in meters.
|
inline |
Convert a point on the Kinect image into a 3D position from the Kinects point of view.
The x and y of the image point are in the range -1 to 1, while z is in meters.
Convert a point on the Kinect image into a 3D line representing that pixels direction from the Kinects point of view.
The image point is expressed in the range -1 to 1.
std::auto_ptr< H3D::SFFloat > HVR::DepthCamera::backgroundDepthMargin |
This is a margin removed from the depth when specifying the background, in meters.
This is a means to minimize the problem with moving background and poor depth accuracy.
std::auto_ptr< H3D::SFInt32 > HVR::DepthCamera::backgroundPixelMargin |
This is the margin around object when specifying the background, in pixels.
This is a means to minimize the problem with moving background and poor depth accuracy.
std::auto_ptr< SFPaintTexture > HVR::DepthCamera::debugTexture |
When specified, debug data are drawn to this texture.
std::auto_ptr< SFImage > HVR::DepthCamera::depthData |
This is the depth data from the depth camera, in meters.
This can be set manually to emulate a depth camera but any extending node will set this field automatically. This must be an image with a single floating point channel. The image shows the camera's point of view and z being the distance from the camera, i e expressing a left-handed system. A negative value represents unavailable data.
std::auto_ptr< SFBackgroundImage > HVR::DepthCamera::depthDataBackground |
The depth camera holds a background image to more easily remove uninteresting data.
This is an image with a single floating point channel.
std::auto_ptr< H3D::SFVec2f > HVR::DepthCamera::fieldOfView |
This camera field of view is used when converting coordinates between 2D and 3D.
The camera sets this as good as it can but it may be manually specified.
std::auto_ptr< H3D::SFFloat > HVR::DepthCamera::maximumBackgroundDistance |
This is the largest distance that the background image may contain.
std::auto_ptr< SFPositionImage > HVR::DepthCamera::positionData |
This is the 3D pixel position data from the depth camera, in meters and camera coordinates.
std::auto_ptr< H3D::SFBool > HVR::DepthCamera::updateBackground |
The background image (depthDataBackground) will be updated if this field is set to true.
The field will be set to false again when the background image has been updated.
std::auto_ptr< ViewSize > HVR::DepthCamera::viewSize |
This field holds the width and height of the view at the distance of one length unit.
This is calculated by 2 x atan(fov/2).