Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

[OpenCV]How to get the number of camera

$
0
0
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; }

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>