diff --git a/modules/videoio/src/cap.cpp b/modules/videoio/src/cap.cpp index d2da6edfe..a9df7dec6 100644 --- a/modules/videoio/src/cap.cpp +++ b/modules/videoio/src/cap.cpp @@ -231,7 +231,7 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index) #ifdef HAVE_OPENNI2 case CV_CAP_OPENNI2: if (!capture) - capture = cvCreateCameraCapture_OpenNI(index); + capture = cvCreateCameraCapture_OpenNI2(index); if (pref) break; #endif diff --git a/modules/videoio/src/cap_openni2.cpp b/modules/videoio/src/cap_openni2.cpp index ff18ed4b5..a39b897e0 100644 --- a/modules/videoio/src/cap_openni2.cpp +++ b/modules/videoio/src/cap_openni2.cpp @@ -903,7 +903,7 @@ IplImage* CvCapture_OpenNI2::retrieveFrame( int outputType ) return image; } -CvCapture* cvCreateCameraCapture_OpenNI( int index ) +CvCapture* cvCreateCameraCapture_OpenNI2( int index ) { CvCapture_OpenNI2* capture = new CvCapture_OpenNI2( index ); diff --git a/modules/videoio/src/precomp.hpp b/modules/videoio/src/precomp.hpp index 8bfc4f826..d60b00f94 100644 --- a/modules/videoio/src/precomp.hpp +++ b/modules/videoio/src/precomp.hpp @@ -120,6 +120,7 @@ CvCapture* cvCreateFileCapture_MSMF (const char* filename); CvVideoWriter* cvCreateVideoWriter_MSMF( const char* filename, int fourcc, double fps, CvSize frameSize, int is_color ); CvCapture* cvCreateCameraCapture_OpenNI( int index ); +CvCapture* cvCreateCameraCapture_OpenNI2( int index ); CvCapture* cvCreateFileCapture_OpenNI( const char* filename ); CvCapture* cvCreateCameraCapture_Android( int index ); CvCapture* cvCreateCameraCapture_XIMEA( int index );