OpenNI 1.5.7
Public Member Functions | List of all members

#include <XnCppWrapper.h>

Inheritance diagram for xn::AlternativeViewPointCapability:
Inheritance graph
[legend]

Public Member Functions

 AlternativeViewPointCapability (XnNodeHandle hNode)
 
 AlternativeViewPointCapability (const NodeWrapper &node)
 
XnBool IsViewPointSupported (ProductionNode &otherNode) const
 
XnStatus SetViewPoint (ProductionNode &otherNode)
 
XnStatus ResetViewPoint ()
 
XnBool IsViewPointAs (ProductionNode &otherNode) const
 
XnStatus RegisterToViewPointChange (StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
 
void UnregisterFromViewPointChange (XnCallbackHandle hCallback)
 
XnStatus GetPixelCoordinatesInViewPoint (ProductionNode &other, XnUInt32 x, XnUInt32 y, XnUInt32 &altX, XnUInt32 &altY)
 
- Public Member Functions inherited from xn::Capability
 Capability (XnNodeHandle hNode)
 
 Capability (const NodeWrapper &node)
 
- Public Member Functions inherited from xn::NodeWrapper
 NodeWrapper (XnNodeHandle hNode)
 
 NodeWrapper (const NodeWrapper &other)
 
NodeWrapperoperator= (const NodeWrapper &other)
 
 ~NodeWrapper ()
 
 operator XnNodeHandle () const
 
XnNodeHandle GetHandle () const
 
XnBool operator== (const NodeWrapper &other)
 
XnBool operator!= (const NodeWrapper &other)
 
XnBool IsValid () const
 
const XnChar * GetName () const
 
XnStatus AddRef ()
 
void Release ()
 
void SetHandle (XnNodeHandle hNode)
 
void TakeOwnership (XnNodeHandle hNode)
 

Detailed Description

Purpose: The AlternativeViewPoint capability enables any type of map generator (depth, image, or IR) to transform its data to appear as if the sensor is placed in another location. The other location is represented by a second production node, usually representing another sensor.

Usage: Do not instantiate directly. Instead, use Generator::GetAlternativeViewPointCap() to obtain an instance.

Remarks:

This capability provides a solution for the situation where you want to impose color over depth, but there is then the problem that the two sensing media (transducers) are looking in slightly different directions. This capability superimposes the two sensing media of one sensor.

Other uses are also possible.

Note
The AlternativeViewPoint capability has nothing to do with the actual physical position of a sensor. You could move the location of the sensor itself, but this will not change the current viewpoint.

Event: 'Viewpoint Change'

Signals that the holder node's viewpoint has changed (also see Configuration Change Events).

Use RegisterToViewPointChange() and UnregisterFromViewPointChange() for using this event.

Calling the SetViewPoint() or ResetViewPoint() methods raises this event.

Constructor & Destructor Documentation

◆ AlternativeViewPointCapability() [1/2]

xn::AlternativeViewPointCapability::AlternativeViewPointCapability ( XnNodeHandle  hNode)
inline

◆ AlternativeViewPointCapability() [2/2]

xn::AlternativeViewPointCapability::AlternativeViewPointCapability ( const NodeWrapper node)
inline

Member Function Documentation

◆ GetPixelCoordinatesInViewPoint()

XnStatus xn::AlternativeViewPointCapability::GetPixelCoordinatesInViewPoint ( ProductionNode other,
XnUInt32  x,
XnUInt32  y,
XnUInt32 &  altX,
XnUInt32 &  altY 
)
inline

Gets a single pixel coordinates in an alternative view point. This method uses current frame data.

Parameters
other[in] The view point to translate to.
x[in] X-coordinate of the pixel to be translated
y[in] Y-coordinate of the pixel to be translated
altX[out] X-coordinate of the pixel in the alternative view point
altY[out] Y-coordinate of the pixel in the alternative view point
Returns
XN_STATUS_INVALID_OPERATION Generator doesn't support this method.

◆ IsViewPointAs()

XnBool xn::AlternativeViewPointCapability::IsViewPointAs ( ProductionNode otherNode) const
inline

Returns whether the holder node's viewpoint is the same viewpoint as that of another specified node. Thus, this method is somewhat of an equality operator.

Parameters
[in]otherNodeOther node, whose viewpoint is used for comparison with the viewpoint of this node.

◆ IsViewPointSupported()

XnBool xn::AlternativeViewPointCapability::IsViewPointSupported ( ProductionNode otherNode) const
inline

Checks if the generator node holding this capability can change its output to appear as if the sensor was placed at the viewpoint of another specific production node.

Parameters
[in]otherNodeOther production node, whose viewpoint against which this node's viewpoint is being checked.

Remarks

This is not the same as xn::ProductionNode::IsCapabilitySupported(). Although the node implementation supports this capability, it may nevertheless support only the viewpoints of nodes of some specific sensors and not of other specific sensors.

◆ RegisterToViewPointChange()

XnStatus xn::AlternativeViewPointCapability::RegisterToViewPointChange ( StateChangedHandler  handler,
void *  pCookie,
XnCallbackHandle hCallback 
)
inline

Registers a handler for the 'Viewpoint Change' event (see the above overview to this class).

Parameters
[in]handlerCallback function to be invoked when the event is raised.
[in]pCookieUser's cookie, to be delivered to the callback.
[out]hCallbackHandle to the callback to be used for unregistering it.

For full details and usage of the parameters, see Registering to Events.

◆ ResetViewPoint()

XnStatus xn::AlternativeViewPointCapability::ResetViewPoint ( )
inline

Sets the viewpoint of the holding generator node to its normal viewpoint.

◆ SetViewPoint()

XnStatus xn::AlternativeViewPointCapability::SetViewPoint ( ProductionNode otherNode)
inline

Sets the current viewpoint of the holding generator node to look as if it is placed at a different generator location. All further generated output will appear as if the sensor was placed at the different location.

Parameters
[in]otherNodeViewpoint to be set.

◆ UnregisterFromViewPointChange()

void xn::AlternativeViewPointCapability::UnregisterFromViewPointChange ( XnCallbackHandle  hCallback)
inline

Unregisters the event handler for the the 'Viewpoint Change' event.

Parameters
[in]hCallbackHandle received from registration.

For full details and usage of the parameter, see Unregistering from Events .


The documentation for this class was generated from the following file: