OpenNI2 SDK
v2.3.0.81
|
类 | |
interface | OniDeviceOpenListener |
静态 Public 成员函数 | |
static Device | open (String uri) |
static Device | open (String uri, OniDeviceOpenListener listener) |
static Device | open () |
static Device | open (OniDeviceOpenListener listener) |
The Device object abstracts a specific device; either a single hardware device, or a file device holding a recording from a hardware device. It offers the ability to connect to the device, and obtain information about its configuration and the data streams it can offer.
It provides the means to query and change all configuration parameters that apply to the device as a whole. This includes enabling depth/color image registration and frame synchronization.
Devices are used when creating and initializing VideoStream "VideoStreams" – you will need a a Device in order to use the VideoStream.create() function. This, along with configuration, is the primary use of this class for application developers.
Before devices can be created, org.openni.OpenNI#initialize() must have been run to make the device drivers on the system available to the API.
|
inline |
Closes the device. This properly closes any files or shuts down hardware, as appropriate. This function is currently called by the destructor if not called manually by application code, but it is considered a best practice to manually close any device that was opened.
|
inline |
获取AE使能状态。
|
inline |
get depth and ir alternate mode (need firmware support)
|
inline |
Used to get Optimization switch state.
|
inline |
Provides information about this device in the form of a DeviceInfo object. This object can be used to access the URI of the device, as well as various USB descriptor strings that might be useful to an application.
Note that valid device info will not be available if this device has not yet been opened. If you are trying to obtain a URI to open a device, use OpenNI::enumerateDevices() instead.
|
inline |
获取设备的类型
|
inline |
Astra pro plus,大白,Gemini,projector,支持这个接口,astra系列的产品没有获取激光状态的接口。
|
inline |
Get firmware version
|
inline |
This function return device handle.
|
inline |
Gets the current image registration mode of this device. Image registration is used to properly superimpose two images from cameras located at different points in space. Please see the OpenNi 2.0 Programmer's Guide for more information about registration.
|
inline |
获取 IR 曝光
|
inline |
设置泛光灯,需要设备支持泛光灯功能,如:Gemini支持泛光灯。
|
inline |
Request IR real time temperature.
|
inline |
Request LDMP real time temperature.
|
inline |
Astra pro plus,大白,Gemini,projector等带LDP功能的设备支持这个接口,这个接口断电不会保存,Astra系列的设备不支持这个接口。
|
inline |
Used to get Multi distance calibration switch state enable.
|
inline |
Get Device internal and external parameters, can be used as needed.
|
inline |
Gets an object through which playback of a file device can be controlled.
|
inline |
Get the SensorInfo for a specific sensor type on this device. The SensorInfo is useful primarily for determining which video modes are supported by the sensor.
sensorType | of sensor to get information about. |
|
inline |
Get device of SerialNumber.
|
inline |
This interface can get the type of transmission used by the current USB device. the return value can be compared with the USB speed type in DeviceUSBSpeed class.The result may be: USB_LOW_SPEED, USB_FULL_SPEED, USB_HIGH_SPEED or USB_SUPER_SPEED.
See DeviceUSBSpeed for USB speed type.
|
inline |
This function checks to see if one of the specific sensor types defined in SensorType is available on this device. This allows an application to, for example, query for the presence of a depth sensor, or color sensor.
sensorType | of sensor to query for |
|
inline |
Checks whether this device is a file device (i.e. a recording).
|
inline |
Checks to see if this device can support registration of color video and depth video. Image registration is used to properly superimpose two images from cameras located at different points in space. Please see the OpenNi 2.0 Programmer's Guide for more information about registration.
|
inlinestatic |
Opens a any device. This can either open a any device. If multiple devices are connected to the system, then one of them will be opened. This procedure is most useful when it is known that exactly one device is (or can be) connected to the system. In that case, requesting a list of all devices and iterating through it would be a waste of effort.
|
inlinestatic |
Opens a any device. This can either open a any device. If multiple devices are connected to the system, then one of them will be opened. This procedure is most useful when it is known that exactly one device is (or can be) connected to the system. In that case, requesting a list of all devices and iterating through it would be a waste of effort.
Adds a new Listener to receive this Device open event. See OniDeviceOpenListener for more information on implementing an event driven device open architecture.
listener | Object which implements OniDeviceOpenListener that will respond to this event. |
|
inlinestatic |
Opens a device. This can either open a device chosen arbitrarily from all devices on the system, or open a specific device selected by passing this function the device URI.
To open any device, simply Device#open() function. If multiple devices are connected to the system, then one of them will be opened. This procedure is most useful when it is known that exactly one device is (or can be) connected to the system. In that case, requesting a list of all devices and iterating through it would be a waste of effort.
If multiple devices are (or may be) connected to a system, then a URI will be required to select a specific device to open. There are two ways to obtain a URI: from a DeviceConnected event, or by calling org.openni.OpenNI#enumerateDevices().
In the case of a DeviceConnected event, the OpenNI.DeviceConnectedListener will be provided with a DeviceInfo object as an argument to its {} OpenNI.DeviceConnectedListener#onDeviceConnected(DeviceInfo) function. The org.openni.DeviceInfo#getUri() function can then be used to obtain the URI.
If the application is not using event handlers, then it can also call the static function org.openni.OpenNI#enumerateDevices(). This will return an array of DeviceInfo objects, one for each device currently available to the system. The application can then iterate through this list and select the desired device. The URI is again obtained via the org.openni.DeviceInfo#getUri() function.
Standard codes of type Status are returned indicating whether opening was successful. For opening a recording file, pass the file path as a uri.
uri | String containing the URI of the device to be opened. |
|
inlinestatic |
Opens a device. This can either open a device chosen arbitrarily from all devices on the system, or open a specific device selected by passing this function the device URI.
To open any device, simply Device#open() function. If multiple devices are connected to the system, then one of them will be opened. This procedure is most useful when it is known that exactly one device is (or can be) connected to the system. In that case, requesting a list of all devices and iterating through it would be a waste of effort.
If multiple devices are (or may be) connected to a system, then a URI will be required to select a specific device to open. There are two ways to obtain a URI: from a DeviceConnected event, or by calling org.openni.OpenNI#enumerateDevices().
In the case of a DeviceConnected event, the OpenNI.DeviceConnectedListener will be provided with a DeviceInfo object as an argument to its {} OpenNI.DeviceConnectedListener#onDeviceConnected(DeviceInfo) function. The org.openni.DeviceInfo#getUri() function can then be used to obtain the URI.
If the application is not using event handlers, then it can also call the static function org.openni.OpenNI#enumerateDevices(). This will return an array of DeviceInfo objects, one for each device currently available to the system. The application can then iterate through this list and select the desired device. The URI is again obtained via the org.openni.DeviceInfo#getUri() function.
Standard codes of type Status are returned indicating whether opening was successful. For opening a recording file, pass the file path as a uri.
Adds a new Listener to receive this Device open event. See OniDeviceOpenListener for more information on implementing an event driven device open architecture.
uri | String containing the URI of the device to be opened. |
listener | Object which implements OniDeviceOpenListener that will respond to this event. |
|
inline |
设置AE开关
enable |
|
inline |
Used to turn the depth/color frame synchronization feature on and off. When frame synchronization is enabled, the device will deliver depth and image frames that are separated in time by some maximum value. When disabled, the phase difference between depth and image frame generation cannot be guaranteed.
isEnabled | Set to TRUE to enable synchronization, FALSE to disable it |
|
inline |
set depth and ir alternate mode (need firmware support)
|
inline |
Used to turn the depth Optimization on and off.
enable |
|
inline |
设置LDM激光开关 ,与 setLaserEnable(boolean) 效果一致
enable |
|
inline |
Used to turn the hardware frame synchronization feature on and off. It is used for third platform settings such as p3x.
isEnabled | Set to TRUE to enable synchronization, FALSE to disable it |
|
inline |
Used to set hardware frame synchronization frame rate type. It is used for third platform settings such as p3x.
fpsType | Set hardware frame synchronization frame rate type |
|
inline |
Sets the image registration on this device. Image registration is used to properly superimpose two images from cameras located at different points in space. Please see the OpenNi 2.0 Programmer's Guide for more information about registration.
See ImageRegistrationMode for a list of valid settings to pass to this function.
It is a good practice to first check if the mode is supported by calling isImageRegistrationModeSupported(ImageRegistrationMode) .
mode | Desired new value for the image registration mode. |
|
inline |
设置 IR 曝光
irExp |
|
inline |
获取泛光灯状态,需要设备支持泛光灯功能,如:Gemini支持泛光灯。
enable |
|
inline |
Used to turn the device laser on and off setEmitterEnable(boolean)
enable |
|
inline |
这个扩展API,一代Astra系列和一代升级的Astra 系列某些带LDP产品有这个功能 接口写的是flash,断电后,LDP设置的状态会保存
ldpEnable | true或者false |
|
inline |
LDP 使能,写的是寄存器,断电重启后,设置的值不会保存。 Astra pro plus,大白,Gemini,projector,支持这个接口,Astra系列的设备不支持这个接口
ldpEnable | true或者false |
|
inline |
Set multi distance calibration switch state to enable.
enable |
|
inline |
Used to turn the software frame synchronization feature on and off. It is used for third platform settings such as p3x.
isEnabled | Set to TRUE to enable synchronization, FALSE to disable it |
|
inline |
Switching left and right IR camera.
type | org.openni.IRCameraType |