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
334ac49d
Commit
334ac49d
authored
Nov 24, 2010
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added user mode selection (thanks to tito for the patch, ticket #563)
parent
beee6f2f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
cap_dc1394_v2.cpp
modules/highgui/src/cap_dc1394_v2.cpp
+17
-1
No files found.
modules/highgui/src/cap_dc1394_v2.cpp
View file @
334ac49d
...
...
@@ -219,6 +219,7 @@ protected:
double
fps
;
int
nDMABufs
;
bool
started
;
int
userMode
;
enum
{
VIDERE
=
0x5505
};
...
...
@@ -257,6 +258,7 @@ CvCaptureCAM_DC1394_v2_CPP::CvCaptureCAM_DC1394_v2_CPP()
frameC
=
0
;
nimages
=
1
;
rectify
=
false
;
userMode
=
-
1
;
}
...
...
@@ -277,7 +279,7 @@ bool CvCaptureCAM_DC1394_v2_CPP::startCapture()
DC1394_ISO_SPEED_3200
);
}
if
(
frameWidth
>
0
||
frameHeight
>
0
)
if
(
userMode
==
-
1
&&
(
frameWidth
>
0
||
frameHeight
>
0
)
)
{
dc1394video_mode_t
bestMode
=
(
dc1394video_mode_t
)
-
1
;
dc1394video_modes_t
videoModes
;
...
...
@@ -322,6 +324,17 @@ bool CvCaptureCAM_DC1394_v2_CPP::startCapture()
code
=
dc1394_video_set_mode
(
dcCam
,
bestMode
);
}
if
(
userMode
>
0
)
{
dc1394video_modes_t
videoModes
;
dc1394_video_get_supported_modes
(
dcCam
,
&
videoModes
);
if
(
userMode
<
videoModes
.
num
)
{
dc1394video_mode_t
mode
=
videoModes
.
modes
[
userMode
];
code
=
dc1394_video_set_mode
(
dcCam
,
mode
);
}
}
if
(
fps
>
0
)
{
dc1394video_mode_t
mode
;
...
...
@@ -601,6 +614,9 @@ bool CvCaptureCAM_DC1394_v2_CPP::setProperty(int propId, double value)
return
false
;
rectify
=
fabs
(
value
)
>
FLT_EPSILON
;
break
;
case
CV_CAP_PROP_MODE
:
userMode
=
cvRound
(
value
);
break
;
default
:
return
false
;
}
...
...
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