Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
203f95d3
Commit
203f95d3
authored
Jul 03, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
samples: videocapture_camera use VideoCapture with 0 index
Not all backends support -1 index.
parent
117e97ad
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
videocapture_camera.cpp
samples/cpp/videocapture_camera.cpp
+1
-1
No files found.
samples/cpp/videocapture_camera.cpp
View file @
203f95d3
...
@@ -11,7 +11,7 @@ int main(int, char**)
...
@@ -11,7 +11,7 @@ int main(int, char**)
{
{
Mat
frame
;
Mat
frame
;
cout
<<
"Opening camera..."
<<
endl
;
cout
<<
"Opening camera..."
<<
endl
;
VideoCapture
capture
(
-
1
);
// open the first available
camera
VideoCapture
capture
(
0
);
// open the first
camera
if
(
!
capture
.
isOpened
())
if
(
!
capture
.
isOpened
())
{
{
cerr
<<
"ERROR: Can't initialize camera capture"
<<
endl
;
cerr
<<
"ERROR: Can't initialize camera capture"
<<
endl
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment