cv2.VideoCapture(cv2.CAP_OPENNI2) support KinectV2?

According to the book Learning OpenCV 4 Computer Vision with Python 3 by Joseph Howse, page 88, does "cv2.VideoCapture(cv2.CAP_OPENNI2) " support access to the Kinect V2 under Windows 10 64 Bit?? The example doesn’t work, i am not sure about, which part is wrong.
The comment says, it is for Kinect, is it for Kinect V1 ?

did you build the opencv libs with the kinect sdk ?
(prebuilt libs dont have support for it)

also check cv::getBuildInformation() (Video IO section)

I have installed the Kinect for Windows SDK 2.0, and opencv-python. I don’t use c++. Only have little knowledge about c++

if it is from pip - it wont have kinect support, either.
you have to build from src for this

got it , thanks a lot :slight_smile: