-
Notifications
You must be signed in to change notification settings - Fork 769
Open
Labels
Description
I'm stuck with a quite simple problem: The Kinect v2 seems to have no option no turn off Auto-Exposuring. If the rgb-stream is enabled and the surrounding is to dark, framerates drop dramatically due to longer exposure times. The simple solution is to only use the depth-stream if the rgb-stream is not needed. With libfreenect2 itself this is no problem, but the Openni-Driver seems to activate all streams on default.
Is there any possibility to have the Openni-Driver use a specific stream only?
thanks and cheers!
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
xlz commentedon Oct 19, 2016
Not yet. There is
startStreams()
but the openni2 driver has yet to use it. @hanyazouEnvnHash commentedon Oct 19, 2016
I tried myself on a quick and dirty fix on this issue. Since the whole oni-device mechanism seems to be a bit tricky in initializing I added two environmental variables "LIBFREENECT2_OPENNI_NORGB" and "LIBFREENECT2_OPENNI_NODEPTH". Not very elegant, I know, but works for the moment.
(attached a patch).
cheers!
openni_device_patch.txt
hanyazou commentedon Oct 22, 2016
@EnvnHash Sorry for my late reply. And I don't have any Kinect2 device to try with for now. I've investigated your patch, OpenNI2 source code and the driver however. I'm not sure but this small patch might be worth for you.
This does not work with the NiViewer because the NiViewer try to open all types of stream. But I guess your program open the depth stream only.
openni_device_patch (2).txt
SirDifferential commentedon Dec 14, 2016
We experienced this problem with our project. The solution we implemented was a new FrameListener that doesn't try to synchronize frames. Instead, it always waits only for the depth stream which is always close to 30 FPS, and RGB stream is read only if one arrived independently of the depth stream. It's not really fit for a pull request as it has some things specific to our use-case, but this kind of solution allows you to get depth at 30 FPS when color is enabled. The OpenNI2
waitForAnyStream()
call does not seem to only wait for Depth if you ask it to ignore color, due to the SyncFrameListener always synching the streams.