Merge pull request #1109 from nikman-ru:cap_reuse_24x
This commit is contained in:
commit
09ec483d02
@ -489,14 +489,14 @@ VideoCapture::~VideoCapture()
|
|||||||
|
|
||||||
bool VideoCapture::open(const string& filename)
|
bool VideoCapture::open(const string& filename)
|
||||||
{
|
{
|
||||||
if (!isOpened())
|
if (isOpened()) release();
|
||||||
cap = cvCreateFileCapture(filename.c_str());
|
cap = cvCreateFileCapture(filename.c_str());
|
||||||
return isOpened();
|
return isOpened();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VideoCapture::open(int device)
|
bool VideoCapture::open(int device)
|
||||||
{
|
{
|
||||||
if (!isOpened())
|
if (isOpened()) release();
|
||||||
cap = cvCreateCameraCapture(device);
|
cap = cvCreateCameraCapture(device);
|
||||||
return isOpened();
|
return isOpened();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user