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
f309bafe
Commit
f309bafe
authored
Mar 30, 2012
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
another fix for cap_dshow.cpp; fixed warning in facerec_demo
parent
3a564d1a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
24 deletions
+19
-24
highgui_c.h
modules/highgui/include/opencv2/highgui/highgui_c.h
+7
-0
cap_dshow.cpp
modules/highgui/src/cap_dshow.cpp
+11
-23
facerec_demo.cpp
samples/cpp/facerec_demo.cpp
+1
-1
No files found.
modules/highgui/include/opencv2/highgui/highgui_c.h
View file @
f309bafe
...
...
@@ -370,6 +370,13 @@ enum
CV_CAP_PROP_GUID
=
29
,
CV_CAP_PROP_ISO_SPEED
=
30
,
CV_CAP_PROP_MAX_DC1394
=
31
,
CV_CAP_PROP_BACKLIGHT
=
32
,
CV_CAP_PROP_PAN
=
33
,
CV_CAP_PROP_TILT
=
34
,
CV_CAP_PROP_ROLL
=
35
,
CV_CAP_PROP_IRIS
=
36
,
CV_CAP_PROP_SETTINGS
=
37
,
CV_CAP_PROP_AUTOGRAB
=
1024
,
// property for highgui class CvCapture_Android only
CV_CAP_PROP_SUPPORTED_PREVIEW_SIZES_STRING
=
1025
,
// readonly, tricky property, returns cpnst char* indeed
CV_CAP_PROP_PREVIEW_FORMAT
=
1026
,
// readonly, tricky property, returns cpnst char* indeed
...
...
modules/highgui/src/cap_dshow.cpp
View file @
f309bafe
...
...
@@ -2183,7 +2183,7 @@ int videoInput::getFourccFromMediaSubtype(GUID type) {
GUID
*
videoInput
::
getMediaSubtypeFromFourcc
(
int
fourcc
){
for
(
int
i
=
0
;
i
<
VI_NUM_TYPES
;
i
++
)
{
if
(
fourcc
==
mediaSubtypes
[
i
].
Data1
)
{
if
(
(
unsigned
long
)
fourcc
==
mediaSubtypes
[
i
].
Data1
)
{
return
&
mediaSubtypes
[
i
];
}
}
...
...
@@ -2191,18 +2191,6 @@ GUID *videoInput::getMediaSubtypeFromFourcc(int fourcc){
return
NULL
;
}
// need to add to highgui_c.h
enum
{
CV_CAP_PROP_SETTINGS
=
28
,
CV_CAP_PROP_BACKLIGHT
,
CV_CAP_PROP_PAN
,
CV_CAP_PROP_TILT
,
CV_CAP_PROP_ROLL
,
CV_CAP_PROP_ZOOM_DSHOW
,
CV_CAP_PROP_IRIS
,
CV_CAP_PROP_FOCUS_DSHOW
};
void
videoInput
::
getVideoPropertyAsString
(
int
prop
,
char
*
propertyAsString
){
...
...
@@ -2273,7 +2261,7 @@ int videoInput::getCameraPropertyFromCV(int cv_property){
case
CV_CAP_PROP_ROLL
:
return
CameraControl_Roll
;
case
CV_CAP_PROP_ZOOM
_DSHOW
:
case
CV_CAP_PROP_ZOOM
:
return
CameraControl_Zoom
;
case
CV_CAP_PROP_EXPOSURE
:
...
...
@@ -2282,7 +2270,7 @@ int videoInput::getCameraPropertyFromCV(int cv_property){
case
CV_CAP_PROP_IRIS
:
return
CameraControl_Iris
;
case
CV_CAP_PROP_FOCUS
_DSHOW
:
case
CV_CAP_PROP_FOCUS
:
return
CameraControl_Focus
;
}
return
-
1
;
...
...
@@ -3272,14 +3260,14 @@ double CvCaptureCAM_DShow::getProperty( int property_id )
case
CV_CAP_PROP_ROLL
:
if
(
VI
.
getVideoSettingCamera
(
index
,
VI
.
getCameraPropertyFromCV
(
CV_CAP_PROP_ROLL
),
min_value
,
max_value
,
stepping_delta
,
current_value
,
flags
,
defaultValue
)
)
return
(
double
)
current_value
;
case
CV_CAP_PROP_ZOOM
_DSHOW
:
case
CV_CAP_PROP_ZOOM
:
if
(
VI
.
getVideoSettingCamera
(
index
,
VI
.
getCameraPropertyFromCV
(
CV_CAP_PROP_BACKLIGHT
),
min_value
,
max_value
,
stepping_delta
,
current_value
,
flags
,
defaultValue
)
)
return
(
double
)
current_value
;
case
CV_CAP_PROP_IRIS
:
if
(
VI
.
getVideoSettingCamera
(
index
,
VI
.
getCameraPropertyFromCV
(
CV_CAP_PROP_IRIS
),
min_value
,
max_value
,
stepping_delta
,
current_value
,
flags
,
defaultValue
)
)
return
(
double
)
current_value
;
case
CV_CAP_PROP_FOCUS
_DSHOW
:
if
(
VI
.
getVideoSettingCamera
(
index
,
VI
.
getCameraPropertyFromCV
(
CV_CAP_PROP_FOCUS
_DSHOW
),
min_value
,
max_value
,
stepping_delta
,
current_value
,
flags
,
defaultValue
)
)
return
(
double
)
current_value
;
case
CV_CAP_PROP_FOCUS
:
if
(
VI
.
getVideoSettingCamera
(
index
,
VI
.
getCameraPropertyFromCV
(
CV_CAP_PROP_FOCUS
),
min_value
,
max_value
,
stepping_delta
,
current_value
,
flags
,
defaultValue
)
)
return
(
double
)
current_value
;
}
...
...
@@ -3314,7 +3302,7 @@ bool CvCaptureCAM_DShow::setProperty( int property_id, double value )
break
;
case
CV_CAP_PROP_FPS
:
VI
.
setIdealFramerate
(
index
,
value
);
VI
.
setIdealFramerate
(
index
,
cvRound
(
value
)
);
handled
=
true
;
break
;
...
...
@@ -3391,8 +3379,8 @@ bool CvCaptureCAM_DShow::setProperty( int property_id, double value )
case
CV_CAP_PROP_ROLL
:
return
VI
.
setVideoSettingCamera
(
index
,
VI
.
getCameraPropertyFromCV
(
CV_CAP_PROP_ROLL
),(
long
)
value
);
case
CV_CAP_PROP_ZOOM
_DSHOW
:
return
VI
.
setVideoSettingCamera
(
index
,
VI
.
getCameraPropertyFromCV
(
CV_CAP_PROP_ZOOM
_DSHOW
),(
long
)
value
);
case
CV_CAP_PROP_ZOOM
:
return
VI
.
setVideoSettingCamera
(
index
,
VI
.
getCameraPropertyFromCV
(
CV_CAP_PROP_ZOOM
),(
long
)
value
);
case
CV_CAP_PROP_EXPOSURE
:
return
VI
.
setVideoSettingCamera
(
index
,
VI
.
getCameraPropertyFromCV
(
CV_CAP_PROP_EXPOSURE
),(
long
)
value
);
...
...
@@ -3400,8 +3388,8 @@ bool CvCaptureCAM_DShow::setProperty( int property_id, double value )
case
CV_CAP_PROP_IRIS
:
return
VI
.
setVideoSettingCamera
(
index
,
VI
.
getCameraPropertyFromCV
(
CV_CAP_PROP_IRIS
),(
long
)
value
);
case
CV_CAP_PROP_FOCUS
_DSHOW
:
return
VI
.
setVideoSettingCamera
(
index
,
VI
.
getCameraPropertyFromCV
(
CV_CAP_PROP_FOCUS
_DSHOW
),(
long
)
value
);
case
CV_CAP_PROP_FOCUS
:
return
VI
.
setVideoSettingCamera
(
index
,
VI
.
getCameraPropertyFromCV
(
CV_CAP_PROP_FOCUS
),(
long
)
value
);
}
...
...
samples/cpp/facerec_demo.cpp
View file @
f309bafe
...
...
@@ -53,7 +53,7 @@ int main(int argc, const char *argv[]) {
// read in the data
try
{
read_csv
(
fn_csv
,
images
,
labels
);
}
catch
(
exception
&
e
)
{
}
catch
(
exception
&
)
{
cerr
<<
"Error opening file
\"
"
<<
fn_csv
<<
"
\"
."
<<
endl
;
exit
(
1
);
}
...
...
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