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
846a500f
Commit
846a500f
authored
Nov 13, 2018
by
Pavel Rojtberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
videoio: drop VideoCaptureModes enum in favour of fourcc
parent
4e40e5bb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
33 deletions
+18
-33
videoio.hpp
modules/videoio/include/opencv2/videoio.hpp
+0
-11
videoio_c.h
modules/videoio/include/opencv2/videoio/videoio_c.h
+0
-10
cap_avfoundation_mac.mm
modules/videoio/src/cap_avfoundation_mac.mm
+9
-4
cap_msmf.cpp
modules/videoio/src/cap_msmf.cpp
+9
-8
No files found.
modules/videoio/include/opencv2/videoio.hpp
View file @
846a500f
...
...
@@ -178,17 +178,6 @@ enum VideoCaptureProperties {
#endif
};
/** @brief Generic camera output modes identifier.
@note Currently, these are supported through the libv4l backend only.
*/
enum
VideoCaptureModes
{
CAP_MODE_BGR
=
0
,
//!< BGR24 (default)
CAP_MODE_RGB
=
1
,
//!< RGB24
CAP_MODE_GRAY
=
2
,
//!< Y8
CAP_MODE_YUYV
=
3
//!< YUYV
};
/** @brief %VideoWriter generic properties identifier.
@sa VideoWriter::get(), VideoWriter::set()
*/
...
...
modules/videoio/include/opencv2/videoio/videoio_c.h
View file @
846a500f
...
...
@@ -452,16 +452,6 @@ enum
CV_CAP_INTELPERC_GENERATORS_MASK
=
CV_CAP_INTELPERC_DEPTH_GENERATOR
+
CV_CAP_INTELPERC_IMAGE_GENERATOR
};
// Generic camera output modes.
// Currently, these are supported through the libv4l interface only.
enum
{
CV_CAP_MODE_BGR
=
0
,
// BGR24 (default)
CV_CAP_MODE_RGB
=
1
,
// RGB24
CV_CAP_MODE_GRAY
=
2
,
// Y8
CV_CAP_MODE_YUYV
=
3
// YUYV
};
enum
{
// Data given from depth generator.
...
...
modules/videoio/src/cap_avfoundation_mac.mm
View file @
846a500f
...
...
@@ -45,6 +45,11 @@
#include <stdio.h>
#import <AVFoundation/AVFoundation.h>
#define CV_CAP_MODE_BGR CV_FOURCC_MACRO('B','G','R','3')
#define CV_CAP_MODE_RGB CV_FOURCC_MACRO('R','G','B','3')
#define CV_CAP_MODE_GRAY CV_FOURCC_MACRO('G','R','E','Y')
#define CV_CAP_MODE_YUYV CV_FOURCC_MACRO('Y', 'U', 'Y', 'V')
/********************** Declaration of class headers ************************/
/*****************************************************************************
...
...
@@ -154,7 +159,7 @@ private:
uint8_t *mOutImagedata;
IplImage *mOutImage;
size_t currSize;
int
mMode;
uint32_t
mMode;
int mFormat;
bool setupReadingAt(CMTime position);
...
...
@@ -1028,7 +1033,7 @@ double CvCaptureFile::getProperty(int property_id) const{
return round((t.value * mAssetTrack.nominalFrameRate) / double(t.timescale));
case CV_CAP_PROP_FORMAT:
return mFormat;
case CV_CAP_PROP_
MODE
:
case CV_CAP_PROP_
FOURCC
:
return mMode;
default:
break;
...
...
@@ -1062,8 +1067,8 @@ bool CvCaptureFile::setProperty(int property_id, double value) {
setupReadingAt(t);
retval = true;
break;
case CV_CAP_PROP_
MODE
:
in
t mode;
case CV_CAP_PROP_
FOURCC
:
uint32_
t mode;
mode = cvRound(value);
if (mMode == mode) {
retval = true;
...
...
modules/videoio/src/cap_msmf.cpp
View file @
846a500f
...
...
@@ -115,6 +115,11 @@ struct IMFActivate;
struct
IMFMediaSource
;
struct
IMFAttributes
;
#define CV_CAP_MODE_BGR CV_FOURCC_MACRO('B','G','R','3')
#define CV_CAP_MODE_RGB CV_FOURCC_MACRO('R','G','B','3')
#define CV_CAP_MODE_GRAY CV_FOURCC_MACRO('G','R','E','Y')
#define CV_CAP_MODE_YUYV CV_FOURCC_MACRO('Y', 'U', 'Y', 'V')
namespace
{
...
...
@@ -704,7 +709,7 @@ public:
virtual
int
getCaptureDomain
()
CV_OVERRIDE
{
return
CV_CAP_MSMF
;
}
protected
:
double
getFramerate
(
MediaType
MT
)
const
;
bool
configureOutput
(
UINT32
width
,
UINT32
height
,
double
prefFramerate
,
UINT32
aspectRatioN
,
UINT32
aspectRatioD
,
in
t
outFormat
,
bool
convertToFormat
);
bool
configureOutput
(
UINT32
width
,
UINT32
height
,
double
prefFramerate
,
UINT32
aspectRatioN
,
UINT32
aspectRatioD
,
cv
::
uint32_
t
outFormat
,
bool
convertToFormat
);
bool
setTime
(
double
time
,
bool
rough
);
bool
configureHW
(
bool
enable
);
...
...
@@ -720,7 +725,7 @@ protected:
DWORD
dwStreamIndex
;
MediaType
nativeFormat
;
MediaType
captureFormat
;
in
t
outputFormat
;
cv
::
uint32_
t
outputFormat
;
UINT32
requestedWidth
,
requestedHeight
;
bool
convertFormat
;
UINT32
aspectN
,
aspectD
;
...
...
@@ -836,7 +841,7 @@ static UINT32 resolutionDiff(MediaType& mType, UINT32 refWidth, UINT32 refHeight
{
return
UDIFF
(
mType
.
width
,
refWidth
)
+
UDIFF
(
mType
.
height
,
refHeight
);
}
#undef UDIFF
bool
CvCapture_MSMF
::
configureOutput
(
UINT32
width
,
UINT32
height
,
double
prefFramerate
,
UINT32
aspectRatioN
,
UINT32
aspectRatioD
,
in
t
outFormat
,
bool
convertToFormat
)
bool
CvCapture_MSMF
::
configureOutput
(
UINT32
width
,
UINT32
height
,
double
prefFramerate
,
UINT32
aspectRatioN
,
UINT32
aspectRatioD
,
cv
::
uint32_
t
outFormat
,
bool
convertToFormat
)
{
if
(
width
!=
0
&&
height
!=
0
&&
width
==
captureFormat
.
width
&&
height
==
captureFormat
.
height
&&
prefFramerate
==
getFramerate
(
nativeFormat
)
&&
...
...
@@ -1375,8 +1380,6 @@ double CvCapture_MSMF::getProperty( int property_id ) const
if
(
isOpen
)
switch
(
property_id
)
{
case
CV_CAP_PROP_FORMAT
:
return
outputFormat
;
case
CV_CAP_PROP_MODE
:
return
captureMode
;
case
CV_CAP_PROP_CONVERT_RGB
:
...
...
@@ -1687,7 +1690,7 @@ bool CvCapture_MSMF::setProperty( int property_id, double value )
default
:
return
false
;
}
case
CV_CAP_PROP_FO
RMAT
:
case
CV_CAP_PROP_FO
URCC
:
return
configureOutput
(
requestedWidth
,
requestedHeight
,
getFramerate
(
nativeFormat
),
aspectN
,
aspectD
,
(
int
)
cvRound
(
value
),
convertFormat
);
case
CV_CAP_PROP_CONVERT_RGB
:
return
configureOutput
(
requestedWidth
,
requestedHeight
,
getFramerate
(
nativeFormat
),
aspectN
,
aspectD
,
outputFormat
,
value
!=
0
);
...
...
@@ -1711,8 +1714,6 @@ bool CvCapture_MSMF::setProperty( int property_id, double value )
if
(
value
>=
0
)
return
configureOutput
(
requestedWidth
,
requestedHeight
,
value
,
aspectN
,
aspectD
,
outputFormat
,
convertFormat
);
break
;
case
CV_CAP_PROP_FOURCC
:
break
;
case
CV_CAP_PROP_FRAME_COUNT
:
break
;
case
CV_CAP_PROP_POS_AVI_RATIO
:
...
...
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