openni_capture sample: enable OpenNI2 if available

Sample works with OpenNI2 with minimal code changes (CAP_OPENNI -> CAP_OPENNI2)
pull/3404/head
Alexander Alekhin 10 years ago
parent 2981ee00d9
commit 2e05f1e3f8
  1. 6
      samples/cpp/openni_capture.cpp

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

Loading…
Cancel
Save