Merge pull request #3404 from alalek:openni2_patch

This commit is contained in:
Vadim Pisarevsky 2014-11-10 08:09:45 +00:00
commit 34f23b5917
2 changed files with 6 additions and 2 deletions

View File

@ -646,7 +646,7 @@ bool CvCapture_OpenNI2::setImageGeneratorProperty(int propIdx, double propValue)
{
case CV_CAP_PROP_OPENNI_OUTPUT_MODE :
{
openni::VideoMode mode;
openni::VideoMode mode = color.getVideoMode();
switch( cvRound(propValue) )
{

View File

@ -192,7 +192,11 @@ int main( int argc, char* argv[] )
if( isVideoReading )
capture.open( filename );
else
{
capture.open( CAP_OPENNI2 );
if( !capture.isOpened() )
capture.open( CAP_OPENNI );
}
cout << "done." << endl;