openni_capture sample: enable OpenNI2 if available
Sample works with OpenNI2 with minimal code changes (CAP_OPENNI -> CAP_OPENNI2)
This commit is contained in:
parent
2981ee00d9
commit
2e05f1e3f8
@ -192,7 +192,11 @@ int main( int argc, char* argv[] )
|
|||||||
if( isVideoReading )
|
if( isVideoReading )
|
||||||
capture.open( filename );
|
capture.open( filename );
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
capture.open( CAP_OPENNI2 );
|
||||||
|
if( !capture.isOpened() )
|
||||||
capture.open( CAP_OPENNI );
|
capture.open( CAP_OPENNI );
|
||||||
|
}
|
||||||
|
|
||||||
cout << "done." << endl;
|
cout << "done." << endl;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user