OpenNI / OpenNI2

OpenNI2
Apache License 2.0
432 stars 893 forks source link

Allow disabling and enabling IR emitter from application code. #23

Closed arjun810 closed 10 years ago

arjun810 commented 11 years ago

This allows application users to enable and disable the emitter. This is useful when in a multiple-sensor environment, where you want to synchronize the IR emitters to avoid interference. Starting and stopping the depth stream can take up to a second, whereas using setEmitterState takes .005-.25 seconds.

The one questionable thing this contains is making SetEmitterState public rather than private, but other than that, I tried to follow the same style as used by setting the mirroring state.

mbrubake commented 10 years ago

Is this likely to be merged soon? This functionality would be very useful for me.

eddiecohen commented 10 years ago

The functionality already exists, as an extended API. Just use:

include

device.setProperty(XN_MODULE_PROPERTY_EMITTER_STATE, TRUE/FALSE);