1. How to get the total number of camera?
2. The following is my code, but i find that it will make the memory leak
int CvCaptureCAM_DShow::getDeviceCount(){
int deviceNumber = VI.listDevices(true);
return deviceNumber;}
int cvGetDeviceCount_DShow(){
CvCaptureCAM_DShow* capture = new CvCaptureCAM_DShow;
int deviceCount = capture->getDeviceCount();
delete capture;
capture = NULL;
return deviceCount;
}
↧