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
8202ab37
Commit
8202ab37
authored
Aug 11, 2014
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3072 from nickdademo:pvapi_decimation_binning
parents
b7d1a709
2b94bcff
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
2 deletions
+60
-2
videoio.hpp
modules/videoio/include/opencv2/videoio.hpp
+12
-1
videoio_c.h
modules/videoio/include/opencv2/videoio/videoio_c.h
+4
-0
cap_pvapi.cpp
modules/videoio/src/cap_pvapi.cpp
+44
-1
No files found.
modules/videoio/include/opencv2/videoio.hpp
View file @
8202ab37
...
...
@@ -192,7 +192,11 @@ enum { CAP_PROP_GSTREAMER_QUEUE_LENGTH = 200 // default is 1
// PVAPI
enum
{
CAP_PROP_PVAPI_MULTICASTIP
=
300
,
// ip for anable multicast master mode. 0 for disable multicast
CAP_PROP_PVAPI_FRAMESTARTTRIGGERMODE
=
301
// FrameStartTriggerMode: Determines how a frame is initiated
CAP_PROP_PVAPI_FRAMESTARTTRIGGERMODE
=
301
,
// FrameStartTriggerMode: Determines how a frame is initiated
CAP_PROP_PVAPI_DECIMATIONHORIZONTAL
=
302
,
// Horizontal sub-sampling of the image
CAP_PROP_PVAPI_DECIMATIONVERTICAL
=
303
,
// Vertical sub-sampling of the image
CAP_PROP_PVAPI_BINNINGX
=
304
,
// Horizontal binning factor
CAP_PROP_PVAPI_BINNINGY
=
305
// Vertical binning factor
};
// PVAPI: FrameStartTriggerMode
...
...
@@ -203,6 +207,13 @@ enum { CAP_PVAPI_FSTRIGMODE_FREERUN = 0, // Freerun
CAP_PVAPI_FSTRIGMODE_SOFTWARE
=
4
// Software
};
// PVAPI: DecimationHorizontal, DecimationVertical
enum
{
CAP_PVAPI_DECIMATION_OFF
=
1
,
// Off
CAP_PVAPI_DECIMATION_2OUTOF4
=
2
,
// 2 out of 4 decimation
CAP_PVAPI_DECIMATION_2OUTOF8
=
3
,
// 2 out of 8 decimation
CAP_PVAPI_DECIMATION_2OUTOF16
=
5
// 2 out of 16 decimation
};
// Properties of cameras available through XIMEA SDK interface
enum
{
CAP_PROP_XI_DOWNSAMPLING
=
400
,
// Change image resolution by binning or skipping.
CAP_PROP_XI_DATA_FORMAT
=
401
,
// Output data format.
...
...
modules/videoio/include/opencv2/videoio/videoio_c.h
View file @
8202ab37
...
...
@@ -218,6 +218,10 @@ enum
// PVAPI
CV_CAP_PROP_PVAPI_MULTICASTIP
=
300
,
// ip for anable multicast master mode. 0 for disable multicast
CV_CAP_PROP_PVAPI_FRAMESTARTTRIGGERMODE
=
301
,
// FrameStartTriggerMode: Determines how a frame is initiated
CV_CAP_PROP_PVAPI_DECIMATIONHORIZONTAL
=
302
,
// Horizontal sub-sampling of the image
CV_CAP_PROP_PVAPI_DECIMATIONVERTICAL
=
303
,
// Vertical sub-sampling of the image
CV_CAP_PROP_PVAPI_BINNINGX
=
304
,
// Horizontal binning factor
CV_CAP_PROP_PVAPI_BINNINGY
=
305
,
// Vertical binning factor
// Properties of cameras available through XIMEA SDK interface
CV_CAP_PROP_XI_DOWNSAMPLING
=
400
,
// Change image resolution by binning or skipping.
...
...
modules/videoio/src/cap_pvapi.cpp
View file @
8202ab37
...
...
@@ -300,12 +300,26 @@ double CvCaptureCAM_PvAPI::getProperty( int property_id )
return
4.0
;
else
return
-
1.0
;
case
CV_CAP_PROP_PVAPI_DECIMATIONHORIZONTAL
:
PvAttrUint32Get
(
Camera
.
Handle
,
"DecimationHorizontal"
,
&
nTemp
);
return
(
double
)
nTemp
;
case
CV_CAP_PROP_PVAPI_DECIMATIONVERTICAL
:
PvAttrUint32Get
(
Camera
.
Handle
,
"DecimationVertical"
,
&
nTemp
);
return
(
double
)
nTemp
;
case
CV_CAP_PROP_PVAPI_BINNINGX
:
PvAttrUint32Get
(
Camera
.
Handle
,
"BinningX"
,
&
nTemp
);
return
(
double
)
nTemp
;
case
CV_CAP_PROP_PVAPI_BINNINGY
:
PvAttrUint32Get
(
Camera
.
Handle
,
"BinningY"
,
&
nTemp
);
return
(
double
)
nTemp
;
}
return
-
1.0
;
}
bool
CvCaptureCAM_PvAPI
::
setProperty
(
int
property_id
,
double
value
)
{
tPvErr
error
;
switch
(
property_id
)
{
case
CV_CAP_PROP_FRAME_WIDTH
:
...
...
@@ -389,7 +403,6 @@ bool CvCaptureCAM_PvAPI::setProperty( int property_id, double value )
}
break
;
case
CV_CAP_PROP_PVAPI_FRAMESTARTTRIGGERMODE
:
tPvErr
error
;
if
(
value
==
0
)
error
=
PvAttrEnumSet
(
Camera
.
Handle
,
"FrameStartTriggerMode"
,
"Freerun"
);
else
if
(
value
==
1
)
...
...
@@ -406,6 +419,36 @@ bool CvCaptureCAM_PvAPI::setProperty( int property_id, double value )
break
;
else
return
false
;
case
CV_CAP_PROP_PVAPI_DECIMATIONHORIZONTAL
:
if
(
value
>=
1
&&
value
<=
8
)
error
=
PvAttrUint32Set
(
Camera
.
Handle
,
"DecimationHorizontal"
,
value
);
else
error
=
ePvErrOutOfRange
;
if
(
error
==
ePvErrSuccess
)
break
;
else
return
false
;
case
CV_CAP_PROP_PVAPI_DECIMATIONVERTICAL
:
if
(
value
>=
1
&&
value
<=
8
)
error
=
PvAttrUint32Set
(
Camera
.
Handle
,
"DecimationVertical"
,
value
);
else
error
=
ePvErrOutOfRange
;
if
(
error
==
ePvErrSuccess
)
break
;
else
return
false
;
case
CV_CAP_PROP_PVAPI_BINNINGX
:
error
=
PvAttrUint32Set
(
Camera
.
Handle
,
"BinningX"
,
value
);
if
(
error
==
ePvErrSuccess
)
break
;
else
return
false
;
case
CV_CAP_PROP_PVAPI_BINNINGY
:
error
=
PvAttrUint32Set
(
Camera
.
Handle
,
"BinningY"
,
value
);
if
(
error
==
ePvErrSuccess
)
break
;
else
return
false
;
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