How to initialize multiple OpenNI sensors with OpenCV
问题 I'd like to use two Asus Xtion Pro sensors with OpenCV (2.4.4) and not sure how to initialize both devices. I can initialize one like so: VideoCapture capture; capture.open(CV_CAP_OPENNI); How can I initialize two VideoCapture instances for two separate sensors ? 回答1: Turns out it's as simple as this: VideoCapture sensor1;sensor1.open(CV_CAP_OPENNI_ASUS); VideoCapture sensor2;sensor2.open(CV_CAP_OPENNI_ASUS+1); A very basic runnable example is: #include "opencv2/core/core.hpp" #include