File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -650,6 +650,16 @@ class CV_EXPORTS_W VideoCapture
650
650
*/
651
651
CV_WRAP virtual bool open (int index);
652
652
653
+ /* * @brief Open a camera for video capturing
654
+
655
+ @overload
656
+
657
+ This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
658
+ Parameters are similar as the constructor VideoCapture(int index),except it takes an additional argument apiPreference.
659
+ @return open(cameraNum + apiPreference).
660
+ */
661
+ CV_WRAP bool open (int cameraNum, int apiPreference);
662
+
653
663
/* * @brief Returns true if video capturing has been initialized already.
654
664
655
665
If the previous call to VideoCapture constructor or VideoCapture::open() succeeded, the method returns
Original file line number Diff line number Diff line change @@ -606,6 +606,11 @@ bool VideoCapture::open(int index)
606
606
cap.reset (cvCreateCameraCapture (index));
607
607
return isOpened ();
608
608
}
609
+ bool VideoCapture::open (int cameraNum, int apiPreference)
610
+ {
611
+ cameraNum = cameraNum + apiPreference;
612
+ return open (cameraNum);
613
+ }
609
614
610
615
bool VideoCapture::isOpened () const
611
616
{
You can’t perform that action at this time.
0 commit comments