Itseez/opencv — pull request #3516 by ana-GT (2014-12-15 23:20:16+00:00)
Title: Changed CV_DbgAssert to CV_Assert when setting video modes for OpenNI2. ...

...Otherwise, in release mode the default modes never get set.

When using OpenCV (master) with OpenNI2 (from occipital) in release mode, the depth and rgb images obtained have a resolution of 320x240 by default, whereas cap_openni2.cpp set them to 640x480. By changing:

CV_DbgAssert --> CV_Assert

The default size is the correct one.

PS.- I tried to manually change the resolution of the color and depth images from my project code - without altering the OpenCV source code but was not able to do so (either the Carmine hangs or get some weird error).