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
333a767b
Commit
333a767b
authored
Feb 28, 2020
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
parents
db5f1c35
5012fc5d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
76 additions
and
14 deletions
+76
-14
OpenCVCompilerOptions.cmake
cmake/OpenCVCompilerOptions.cmake
+4
-0
mat.inl.hpp
modules/core/include/opencv2/core/mat.inl.hpp
+20
-0
ie_ngraph.cpp
modules/dnn/src/ie_ngraph.cpp
+6
-5
window_QT.cpp
modules/highgui/src/window_QT.cpp
+27
-8
window_QT.h
modules/highgui/src/window_QT.h
+3
-0
window_QT.qrc
modules/highgui/src/window_QT.qrc
+1
-0
exif.hpp
modules/imgcodecs/src/exif.hpp
+2
-1
sumpixels.simd.hpp
modules/imgproc/src/sumpixels.simd.hpp
+0
-0
cap_v4l.cpp
modules/videoio/src/cap_v4l.cpp
+13
-0
No files found.
cmake/OpenCVCompilerOptions.cmake
View file @
333a767b
...
...
@@ -153,6 +153,10 @@ if(CV_GCC OR CV_CLANG)
if
(
CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0
)
add_extra_compiler_option
(
-Wno-missing-field-initializers
)
# GCC 4.x emits warnings about {}, fixed in GCC 5+
endif
()
if
(
CV_CLANG AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0
)
add_extra_compiler_option
(
-Wno-deprecated-enum-enum-conversion
)
add_extra_compiler_option
(
-Wno-deprecated-anon-enum-enum-conversion
)
endif
()
endif
()
add_extra_compiler_option
(
-fdiagnostics-show-option
)
...
...
modules/core/include/opencv2/core/mat.inl.hpp
View file @
333a767b
...
...
@@ -54,6 +54,21 @@
#pragma warning( disable: 4127 )
#endif
#if defined(CV_SKIP_DISABLE_CLANG_ENUM_WARNINGS)
// nothing
#elif defined(CV_FORCE_DISABLE_CLANG_ENUM_WARNINGS)
#define CV_DISABLE_CLANG_ENUM_WARNINGS
#elif defined(__clang__) && defined(__has_warning)
#if __has_warning("-Wdeprecated-enum-enum-conversion") && __has_warning("-Wdeprecated-anon-enum-enum-conversion")
#define CV_DISABLE_CLANG_ENUM_WARNINGS
#endif
#endif
#ifdef CV_DISABLE_CLANG_ENUM_WARNINGS
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-enum-enum-conversion"
#pragma clang diagnostic ignored "-Wdeprecated-anon-enum-enum-conversion"
#endif
namespace
cv
{
CV__DEBUG_NS_BEGIN
...
...
@@ -3980,4 +3995,9 @@ inline void UMatData::markDeviceCopyObsolete(bool flag)
#pragma warning( pop )
#endif
#ifdef CV_DISABLE_CLANG_ENUM_WARNINGS
#undef CV_DISABLE_CLANG_ENUM_WARNINGS
#pragma clang diagnostic pop
#endif
#endif
modules/dnn/src/ie_ngraph.cpp
View file @
333a767b
...
...
@@ -442,13 +442,14 @@ void InfEngineNgraphNet::initPlugin(InferenceEngine::CNNNetwork& net)
config
.
emplace
(
"VPU_DETECT_NETWORK_BATCH"
,
CONFIG_VALUE
(
NO
));
}
bool
isHetero
=
false
;
if
(
device_name
!=
"CPU"
)
bool
isHetero
=
device_name
==
"FPGA"
;
// It is actual only for non-CPU targets and networks built in runtime using nGraph.
// We do not check IR models because they can be with version less than IRv10
if
(
!
isHetero
&&
device_name
!=
"CPU"
&&
!
hasNetOwner
)
{
isHetero
=
device_name
==
"FPGA"
;
for
(
auto
&
layer
:
net
)
for
(
auto
&
node
:
net
.
getFunction
()
->
get_ops
())
{
if
(
layer
->
type
==
kOpenCVLayersType
)
if
(
node
->
description
()
==
kOpenCVLayersType
)
{
isHetero
=
true
;
break
;
...
...
modules/highgui/src/window_QT.cpp
View file @
333a767b
...
...
@@ -1856,7 +1856,7 @@ void CvWindow::displayStatusBar(QString text, int delayms)
void
CvWindow
::
enablePropertiesButton
()
{
if
(
!
vect_QActions
.
empty
())
vect_QActions
[
9
]
->
setDisabled
(
false
);
vect_QActions
[
10
]
->
setDisabled
(
false
);
}
...
...
@@ -1991,7 +1991,7 @@ void CvWindow::createView()
void
CvWindow
::
createActions
()
{
vect_QActions
.
resize
(
1
0
);
vect_QActions
.
resize
(
1
1
);
QWidget
*
view
=
myView
->
getWidget
();
...
...
@@ -2032,18 +2032,22 @@ void CvWindow::createActions()
vect_QActions
[
8
]
->
setIconVisibleInMenu
(
true
);
QObject
::
connect
(
vect_QActions
[
8
],
SIGNAL
(
triggered
()),
view
,
SLOT
(
saveView
()));
vect_QActions
[
9
]
=
new
QAction
(
QIcon
(
":/
properties-icon"
),
"Display properties window (CTRL+P
)"
,
this
);
vect_QActions
[
9
]
=
new
QAction
(
QIcon
(
":/
copy_clipbrd-icon"
),
"Copy image to clipboard (CTRL+C
)"
,
this
);
vect_QActions
[
9
]
->
setIconVisibleInMenu
(
true
);
QObject
::
connect
(
vect_QActions
[
9
],
SIGNAL
(
triggered
()),
this
,
SLOT
(
displayPropertiesWin
()));
QObject
::
connect
(
vect_QActions
[
9
],
SIGNAL
(
triggered
()),
view
,
SLOT
(
copy2Clipbrd
()));
vect_QActions
[
10
]
=
new
QAction
(
QIcon
(
":/properties-icon"
),
"Display properties window (CTRL+P)"
,
this
);
vect_QActions
[
10
]
->
setIconVisibleInMenu
(
true
);
QObject
::
connect
(
vect_QActions
[
10
],
SIGNAL
(
triggered
()),
this
,
SLOT
(
displayPropertiesWin
()));
if
(
global_control_panel
->
myLayout
->
count
()
==
0
)
vect_QActions
[
9
]
->
setDisabled
(
true
);
vect_QActions
[
10
]
->
setDisabled
(
true
);
}
void
CvWindow
::
createShortcuts
()
{
vect_QShortcuts
.
resize
(
1
0
);
vect_QShortcuts
.
resize
(
1
1
);
QWidget
*
view
=
myView
->
getWidget
();
...
...
@@ -2074,8 +2078,11 @@ void CvWindow::createShortcuts()
vect_QShortcuts
[
8
]
=
new
QShortcut
(
shortcut_save_img
,
this
);
QObject
::
connect
(
vect_QShortcuts
[
8
],
SIGNAL
(
activated
()),
view
,
SLOT
(
saveView
()));
vect_QShortcuts
[
9
]
=
new
QShortcut
(
shortcut_properties_win
,
this
);
QObject
::
connect
(
vect_QShortcuts
[
9
],
SIGNAL
(
activated
()),
this
,
SLOT
(
displayPropertiesWin
()));
vect_QShortcuts
[
9
]
=
new
QShortcut
(
shortcut_copy_clipbrd
,
this
);
QObject
::
connect
(
vect_QShortcuts
[
9
],
SIGNAL
(
activated
()),
view
,
SLOT
(
copy2Clipbrd
()));
vect_QShortcuts
[
10
]
=
new
QShortcut
(
shortcut_properties_win
,
this
);
QObject
::
connect
(
vect_QShortcuts
[
10
],
SIGNAL
(
activated
()),
this
,
SLOT
(
displayPropertiesWin
()));
}
...
...
@@ -2697,6 +2704,18 @@ void DefaultViewPort::saveView()
}
//copy image to clipboard
void
DefaultViewPort
::
copy2Clipbrd
()
{
// Create a new pixmap to render the viewport into
QPixmap
viewportPixmap
(
viewport
()
->
size
());
viewport
()
->
render
(
&
viewportPixmap
);
QClipboard
*
pClipboard
=
QApplication
::
clipboard
();
pClipboard
->
setPixmap
(
viewportPixmap
);
}
void
DefaultViewPort
::
contextMenuEvent
(
QContextMenuEvent
*
evnt
)
{
if
(
centralWidget
->
vect_QActions
.
size
()
>
0
)
...
...
modules/highgui/src/window_QT.h
View file @
333a767b
...
...
@@ -76,6 +76,7 @@
#include <QDate>
#include <QFileDialog>
#include <QToolBar>
#include <QClipboard>
#include <QAction>
#include <QCheckBox>
...
...
@@ -91,6 +92,7 @@ enum { CV_MODE_NORMAL = 0, CV_MODE_OPENGL = 1 };
enum
{
shortcut_zoom_normal
=
Qt
::
CTRL
+
Qt
::
Key_Z
,
shortcut_zoom_imgRegion
=
Qt
::
CTRL
+
Qt
::
Key_X
,
shortcut_save_img
=
Qt
::
CTRL
+
Qt
::
Key_S
,
shortcut_copy_clipbrd
=
Qt
::
CTRL
+
Qt
::
Key_C
,
shortcut_properties_win
=
Qt
::
CTRL
+
Qt
::
Key_P
,
shortcut_zoom_in
=
Qt
::
CTRL
+
Qt
::
Key_Plus
,
//QKeySequence(QKeySequence::ZoomIn),
shortcut_zoom_out
=
Qt
::
CTRL
+
Qt
::
Key_Minus
,
//QKeySequence(QKeySequence::ZoomOut),
...
...
@@ -518,6 +520,7 @@ public slots:
void
ZoomOut
();
void
saveView
();
void
copy2Clipbrd
();
protected
:
void
contextMenuEvent
(
QContextMenuEvent
*
event
)
CV_OVERRIDE
;
...
...
modules/highgui/src/window_QT.qrc
View file @
333a767b
...
...
@@ -9,6 +9,7 @@
<file alias="zoom_in-icon">files_Qt/Milky/48/106.png</file>
<file alias="zoom_out-icon">files_Qt/Milky/48/107.png</file>
<file alias="save-icon">files_Qt/Milky/48/7.png</file>
<file alias="copy_clipbrd-icon">files_Qt/Milky/48/43.png</file>
<file alias="properties-icon">files_Qt/Milky/48/38.png</file>
<file alias="stylesheet-trackbar">files_Qt/stylesheet_trackbar.qss</file>
</qresource>
...
...
modules/imgcodecs/src/exif.hpp
View file @
333a767b
...
...
@@ -154,7 +154,8 @@ enum ImageOrientation
* Usage example for getting the orientation of the image:
*
* @code
* ExifReader reader(fileName);
* std::ifstream stream(filename,std::ios_base::in | std::ios_base::binary);
* ExifReader reader(stream);
* if( reader.parse() )
* {
* int orientation = reader.getTag(Orientation).field_u16;
...
...
modules/imgproc/src/sumpixels.simd.hpp
View file @
333a767b
This diff is collapsed.
Click to expand it.
modules/videoio/src/cap_v4l.cpp
View file @
333a767b
...
...
@@ -268,6 +268,10 @@ typedef uint32_t __u32;
#define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ')
#endif
#ifndef V4L2_PIX_FMT_Y12
#define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ')
#endif
/* Defaults - If your board can do better, set it here. Set for the most common type inputs. */
#define DEFAULT_V4L_WIDTH 640
#define DEFAULT_V4L_HEIGHT 480
...
...
@@ -570,6 +574,7 @@ bool CvCaptureCAM_V4L::autosetup_capture_mode_v4l2()
V4L2_PIX_FMT_JPEG
,
#endif
V4L2_PIX_FMT_Y16
,
V4L2_PIX_FMT_Y12
,
V4L2_PIX_FMT_Y10
,
V4L2_PIX_FMT_GREY
,
};
...
...
@@ -663,6 +668,7 @@ void CvCaptureCAM_V4L::v4l2_create_frame()
size
.
height
=
size
.
height
*
3
/
2
;
// "1.5" channels
break
;
case
V4L2_PIX_FMT_Y16
:
case
V4L2_PIX_FMT_Y12
:
case
V4L2_PIX_FMT_Y10
:
depth
=
IPL_DEPTH_16U
;
/* fallthru */
...
...
@@ -1593,6 +1599,13 @@ void CvCaptureCAM_V4L::convertToRgb(const Buffer ¤tBuffer)
cv
::
cvtColor
(
temp
,
destination
,
COLOR_GRAY2BGR
);
return
;
}
case
V4L2_PIX_FMT_Y12
:
{
cv
::
Mat
temp
(
imageSize
,
CV_8UC1
,
buffers
[
MAX_V4L_BUFFERS
].
start
);
cv
::
Mat
(
imageSize
,
CV_16UC1
,
currentBuffer
.
start
).
convertTo
(
temp
,
CV_8U
,
1.0
/
16
);
cv
::
cvtColor
(
temp
,
destination
,
COLOR_GRAY2BGR
);
return
;
}
case
V4L2_PIX_FMT_Y10
:
{
cv
::
Mat
temp
(
imageSize
,
CV_8UC1
,
buffers
[
MAX_V4L_BUFFERS
].
start
);
...
...
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