Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
649841e6
O
Opencv
项目概览
Greenplum
/
Opencv
8 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
649841e6
编写于
2月 08, 2023
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #23225 from mshabunin:fix-clang-warnings
上级
606c8034
e4acd74e
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
47 addition
and
41 deletion
+47
-41
3rdparty/ippicv/CMakeLists.txt
3rdparty/ippicv/CMakeLists.txt
+1
-1
modules/core/include/opencv2/core/private.hpp
modules/core/include/opencv2/core/private.hpp
+7
-0
modules/gapi/misc/python/pyopencv_gapi.hpp
modules/gapi/misc/python/pyopencv_gapi.hpp
+0
-2
modules/gapi/test/internal/gapi_int_executor_tests.cpp
modules/gapi/test/internal/gapi_int_executor_tests.cpp
+1
-1
modules/gapi/test/streaming/gapi_streaming_tests.cpp
modules/gapi/test/streaming/gapi_streaming_tests.cpp
+4
-4
modules/imgproc/test/test_filter.cpp
modules/imgproc/test/test_filter.cpp
+10
-10
modules/ts/include/opencv2/ts.hpp
modules/ts/include/opencv2/ts.hpp
+6
-4
modules/ts/include/opencv2/ts/ts_ext.hpp
modules/ts/include/opencv2/ts/ts_ext.hpp
+8
-8
modules/ts/include/opencv2/ts/ts_perf.hpp
modules/ts/include/opencv2/ts/ts_perf.hpp
+3
-3
modules/ts/src/ts_perf.cpp
modules/ts/src/ts_perf.cpp
+2
-3
modules/videoio/src/cap_obsensor/obsensor_uvc_stream_channel.cpp
.../videoio/src/cap_obsensor/obsensor_uvc_stream_channel.cpp
+1
-1
modules/videoio/src/cap_obsensor/obsensor_uvc_stream_channel.hpp
.../videoio/src/cap_obsensor/obsensor_uvc_stream_channel.hpp
+2
-2
samples/cpp/train_svmsgd.cpp
samples/cpp/train_svmsgd.cpp
+1
-1
samples/cpp/warpPerspective_demo.cpp
samples/cpp/warpPerspective_demo.cpp
+1
-1
未找到文件。
3rdparty/ippicv/CMakeLists.txt
浏览文件 @
649841e6
...
...
@@ -24,7 +24,7 @@ if(UNIX)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wno-unused-function -Wno-missing-braces -Wno-missing-field-initializers"
)
endif
()
if
(
CV_CLANG
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wno-self-assign"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wno-self-assign
-Wno-strict-prototypes
"
)
endif
()
endif
()
...
...
modules/core/include/opencv2/core/private.hpp
浏览文件 @
649841e6
...
...
@@ -235,6 +235,10 @@ T* allocSingletonNew() { return new(allocSingletonNewBuffer(sizeof(T))) T(); }
#include "ipp.h"
#endif
#ifdef HAVE_IPP_IW
# if defined(__OPENCV_BUILD) && defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wstrict-prototypes"
# endif
# if defined(__OPENCV_BUILD) && defined(__GNUC__) && __GNUC__ >= 5
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wsuggest-override"
...
...
@@ -246,6 +250,9 @@ T* allocSingletonNew() { return new(allocSingletonNewBuffer(sizeof(T))) T(); }
# if defined(__OPENCV_BUILD) && defined(__GNUC__) && __GNUC__ >= 5
# pragma GCC diagnostic pop
# endif
# if defined(__OPENCV_BUILD) && defined(__clang__)
# pragma clang diagnostic pop
# endif
#endif
#if IPP_VERSION_X100 >= 201700
...
...
modules/gapi/misc/python/pyopencv_gapi.hpp
浏览文件 @
649841e6
...
...
@@ -664,7 +664,6 @@ static cv::GRunArgs run_py_kernel(cv::detail::PyObjectHolder kernel,
cv
::
GRunArgs
outs
;
try
{
int
in_idx
=
0
;
// NB: Doesn't increase reference counter (false),
// because PyObject already have ownership.
// In case exception decrement reference counter.
...
...
@@ -697,7 +696,6 @@ static cv::GRunArgs run_py_kernel(cv::detail::PyObjectHolder kernel,
util
::
throw_error
(
std
::
logic_error
(
"GFrame isn't supported for custom operation"
));
break
;
}
++
in_idx
;
}
if
(
ctx
.
m_state
.
has_value
())
...
...
modules/gapi/test/internal/gapi_int_executor_tests.cpp
浏览文件 @
649841e6
...
...
@@ -27,7 +27,7 @@ class GMockExecutable final: public cv::gimpl::GIslandExecutable
m_priv
->
m_reshape_counter
++
;
}
virtual
void
handleNewStream
()
override
{
}
virtual
void
run
(
std
::
vector
<
InObj
>&&
,
std
::
vector
<
OutObj
>&&
)
{
}
virtual
void
run
(
std
::
vector
<
InObj
>&&
,
std
::
vector
<
OutObj
>&&
)
override
{
}
virtual
bool
allocatesOutputs
()
const
override
{
return
true
;
...
...
modules/gapi/test/streaming/gapi_streaming_tests.cpp
浏览文件 @
649841e6
...
...
@@ -190,7 +190,7 @@ public:
:
cv
::
gapi
::
wip
::
GCaptureSource
(
pipeline
)
{
}
bool
pull
(
cv
::
gapi
::
wip
::
Data
&
data
)
{
bool
pull
(
cv
::
gapi
::
wip
::
Data
&
data
)
override
{
if
(
cv
::
gapi
::
wip
::
GCaptureSource
::
pull
(
data
))
{
data
=
cv
::
MediaFrame
::
Create
<
TestMediaBGR
>
(
cv
::
util
::
get
<
cv
::
Mat
>
(
data
));
return
true
;
...
...
@@ -232,7 +232,7 @@ public:
:
cv
::
gapi
::
wip
::
GCaptureSource
(
pipeline
)
{
}
bool
pull
(
cv
::
gapi
::
wip
::
Data
&
data
)
{
bool
pull
(
cv
::
gapi
::
wip
::
Data
&
data
)
override
{
if
(
cv
::
gapi
::
wip
::
GCaptureSource
::
pull
(
data
))
{
cv
::
Mat
bgr
=
cv
::
util
::
get
<
cv
::
Mat
>
(
data
);
cv
::
Mat
y
,
uv
;
...
...
@@ -256,7 +256,7 @@ public:
:
cv
::
gapi
::
wip
::
GCaptureSource
(
pipeline
)
{
}
bool
pull
(
cv
::
gapi
::
wip
::
Data
&
data
)
{
bool
pull
(
cv
::
gapi
::
wip
::
Data
&
data
)
override
{
if
(
cv
::
gapi
::
wip
::
GCaptureSource
::
pull
(
data
))
{
cv
::
Mat
bgr
=
cv
::
util
::
get
<
cv
::
Mat
>
(
data
);
cv
::
Mat
gray
;
...
...
@@ -319,7 +319,7 @@ public:
return
"InvalidSource sucessfuly failed!"
;
}
bool
pull
(
cv
::
gapi
::
wip
::
Data
&
d
)
{
bool
pull
(
cv
::
gapi
::
wip
::
Data
&
d
)
override
{
++
m_curr_frame_id
;
if
(
m_curr_frame_id
>
m_num_frames
)
{
return
false
;
...
...
modules/imgproc/test/test_filter.cpp
浏览文件 @
649841e6
...
...
@@ -49,10 +49,10 @@ public:
CV_FilterBaseTest
(
bool
_fp_kernel
);
protected:
int
prepare_test_case
(
int
test_case_idx
);
int
read_params
(
const
cv
::
FileStorage
&
fs
);
void
get_test_array_types_and_sizes
(
int
test_case_idx
,
vector
<
vector
<
Size
>
>&
sizes
,
vector
<
vector
<
int
>
>&
types
);
void
get_minmax_bounds
(
int
i
,
int
j
,
int
type
,
Scalar
&
low
,
Scalar
&
high
);
int
prepare_test_case
(
int
test_case_idx
)
CV_OVERRIDE
;
int
read_params
(
const
cv
::
FileStorage
&
fs
)
CV_OVERRIDE
;
void
get_test_array_types_and_sizes
(
int
test_case_idx
,
vector
<
vector
<
Size
>
>&
sizes
,
vector
<
vector
<
int
>
>&
types
)
CV_OVERRIDE
;
void
get_minmax_bounds
(
int
i
,
int
j
,
int
type
,
Scalar
&
low
,
Scalar
&
high
)
CV_OVERRIDE
;
Size
aperture_size
;
Point
anchor
;
int
max_aperture_size
;
...
...
@@ -689,8 +689,8 @@ public:
CV_SmoothBaseTest
();
protected:
void
get_test_array_types_and_sizes
(
int
test_case_idx
,
vector
<
vector
<
Size
>
>&
sizes
,
vector
<
vector
<
int
>
>&
types
);
double
get_success_error_level
(
int
test_case_idx
,
int
i
,
int
j
);
void
get_test_array_types_and_sizes
(
int
test_case_idx
,
vector
<
vector
<
Size
>
>&
sizes
,
vector
<
vector
<
int
>
>&
types
)
CV_OVERRIDE
;
double
get_success_error_level
(
int
test_case_idx
,
int
i
,
int
j
)
CV_OVERRIDE
;
const
char
*
smooth_type
;
void
dump_test_case
(
int
test_case_idx
,
std
::
ostream
*
out
)
CV_OVERRIDE
...
...
@@ -802,10 +802,10 @@ public:
CV_GaussianBlurTest
();
protected:
void
prepare_to_validation
(
int
test_case_idx
);
void
run_func
();
void
get_test_array_types_and_sizes
(
int
test_case_idx
,
vector
<
vector
<
Size
>
>&
sizes
,
vector
<
vector
<
int
>
>&
types
);
double
get_success_error_level
(
int
/*test_case_idx*/
,
int
/*i*/
,
int
/*j*/
);
void
prepare_to_validation
(
int
test_case_idx
)
CV_OVERRIDE
;
void
run_func
()
CV_OVERRIDE
;
void
get_test_array_types_and_sizes
(
int
test_case_idx
,
vector
<
vector
<
Size
>
>&
sizes
,
vector
<
vector
<
int
>
>&
types
)
CV_OVERRIDE
;
double
get_success_error_level
(
int
/*test_case_idx*/
,
int
/*i*/
,
int
/*j*/
)
CV_OVERRIDE
;
double
sigma
;
int
param1
,
param2
;
...
...
modules/ts/include/opencv2/ts.hpp
浏览文件 @
649841e6
...
...
@@ -116,20 +116,22 @@
# endif
#endif
#if defined(__OPENCV_BUILD) && defined(__clang__)
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
#if defined(__OPENCV_BUILD) && defined(__GNUC__) && __GNUC__ >= 5
//#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
#if defined(__OPENCV_BUILD) && defined(__APPLE__) && defined(__clang__) && ((__clang_major__*100 + __clang_minor__) >= 1301)
#if defined(__OPENCV_BUILD) && defined(__clang__) && ((__clang_major__*100 + __clang_minor__) >= 1301)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy"
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
#include "opencv2/ts/ts_gtest.h"
#if defined(__OPENCV_BUILD) && defined(__GNUC__) && __GNUC__ >= 5
//#pragma GCC diagnostic pop
#endif
#if defined(__OPENCV_BUILD) && defined(__clang__) && ((__clang_major__*100 + __clang_minor__) >= 1301)
#pragma clang diagnostic pop
#endif
#include "opencv2/ts/ts_ext.hpp"
#ifndef GTEST_USES_SIMPLE_RE
...
...
modules/ts/include/opencv2/ts/ts_ext.hpp
浏览文件 @
649841e6
...
...
@@ -49,13 +49,13 @@ bool checkBigDataTests();
#undef TEST
#define TEST_(test_case_name, test_name, parent_class, bodyMethodName, BODY_IMPL) \
#define TEST_(test_case_name, test_name, parent_class, bodyMethodName, BODY_
ATTR, BODY_
IMPL) \
class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\
public:\
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\
private:\
virtual void TestBody() CV_OVERRIDE;\
virtual void bodyMethodName();\
virtual void bodyMethodName()
BODY_ATTR
;\
static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;\
GTEST_DISALLOW_COPY_AND_ASSIGN_(\
GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\
...
...
@@ -74,7 +74,7 @@ bool checkBigDataTests();
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() BODY_IMPL( #test_case_name "_" #test_name ) \
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::bodyMethodName()
#define TEST(test_case_name, test_name) TEST_(test_case_name, test_name, ::testing::Test, Body, CV__TEST_BODY_IMPL)
#define TEST(test_case_name, test_name) TEST_(test_case_name, test_name, ::testing::Test, Body,
,
CV__TEST_BODY_IMPL)
#define CV__TEST_BIGDATA_BODY_IMPL(name) \
{ \
...
...
@@ -96,9 +96,9 @@ bool checkBigDataTests();
// Special type of tests which require / use or validate processing of huge amount of data (>= 2Gb)
#if defined(_M_X64) || defined(_M_ARM64) || defined(__x86_64__) || defined(__aarch64__)
#define BIGDATA_TEST(test_case_name, test_name) TEST_(BigData_ ## test_case_name, test_name, ::testing::Test, Body, CV__TEST_BIGDATA_BODY_IMPL)
#define BIGDATA_TEST(test_case_name, test_name) TEST_(BigData_ ## test_case_name, test_name, ::testing::Test, Body,
,
CV__TEST_BIGDATA_BODY_IMPL)
#else
#define BIGDATA_TEST(test_case_name, test_name) TEST_(BigData_ ## test_case_name, DISABLED_ ## test_name, ::testing::Test, Body, CV__TEST_BIGDATA_BODY_IMPL)
#define BIGDATA_TEST(test_case_name, test_name) TEST_(BigData_ ## test_case_name, DISABLED_ ## test_name, ::testing::Test, Body,
,
CV__TEST_BIGDATA_BODY_IMPL)
#endif
#undef TEST_F
...
...
@@ -128,13 +128,13 @@ bool checkBigDataTests();
void GTEST_TEST_CLASS_NAME_(test_fixture, test_name)::Body()
// Don't use directly
#define CV__TEST_P(test_case_name, test_name, bodyMethodName, BODY_IMPL
/*(name_str)*/
) \
#define CV__TEST_P(test_case_name, test_name, bodyMethodName, BODY_
ATTR, BODY_
IMPL
/*(name_str)*/
) \
class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
: public test_case_name { \
public: \
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \
private: \
virtual void bodyMethodName(); \
virtual void bodyMethodName()
BODY_ATTR
; \
virtual void TestBody() CV_OVERRIDE; \
static int AddToRegistry() { \
::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
...
...
@@ -160,7 +160,7 @@ bool checkBigDataTests();
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::bodyMethodName()
#undef TEST_P
#define TEST_P(test_case_name, test_name) CV__TEST_P(test_case_name, test_name, Body, CV__TEST_BODY_IMPL)
#define TEST_P(test_case_name, test_name) CV__TEST_P(test_case_name, test_name, Body,
,
CV__TEST_BODY_IMPL)
#define CV_TEST_EXPECT_EXCEPTION_MESSAGE(statement, msg) \
...
...
modules/ts/include/opencv2/ts/ts_perf.hpp
浏览文件 @
649841e6
...
...
@@ -551,7 +551,7 @@ void PrintTo(const Size& sz, ::std::ostream* os);
// EXPECT_TRUE(foo.StatusIsOK());
// }
#define PERF_TEST(test_case_name, test_name)\
TEST_(test_case_name, test_name, ::perf::TestBase, PerfTestBody, CV__PERF_TEST_BODY_IMPL)
TEST_(test_case_name, test_name, ::perf::TestBase, PerfTestBody, CV_
OVERRIDE, CV_
_PERF_TEST_BODY_IMPL)
// Defines a performance test that uses a test fixture.
//
...
...
@@ -595,7 +595,7 @@ void PrintTo(const Size& sz, ::std::ostream* os);
//
// @Note PERF_TEST_P() below violates behavior of original Google Tests - there is no tests instantiation in original TEST_P()
// This macro is intended for usage with separate INSTANTIATE_TEST_CASE_P macro
#define PERF_TEST_P_(test_case_name, test_name) CV__TEST_P(test_case_name, test_name, PerfTestBody, CV__PERF_TEST_BODY_IMPL)
#define PERF_TEST_P_(test_case_name, test_name) CV__TEST_P(test_case_name, test_name, PerfTestBody, CV_
OVERRIDE, CV_
_PERF_TEST_BODY_IMPL)
// Defines a parametrized performance test.
//
...
...
@@ -628,7 +628,7 @@ void PrintTo(const Size& sz, ::std::ostream* os);
protected:\
virtual void PerfTestBody();\
};\
CV__TEST_P(fixture##_##name, name, PerfTestBodyDummy, CV__PERF_TEST_BODY_IMPL){} \
CV__TEST_P(fixture##_##name, name, PerfTestBodyDummy,
,
CV__PERF_TEST_BODY_IMPL){} \
INSTANTIATE_TEST_CASE_P(
/*none*/
, fixture##_##name, params);\
void fixture##_##name::PerfTestBody()
...
...
modules/ts/src/ts_perf.cpp
浏览文件 @
649841e6
...
...
@@ -2104,8 +2104,6 @@ struct KeypointComparator
{
return
cmp
(
pts_
[
idx1
],
pts_
[
idx2
]);
}
private:
KeypointComparator
&
operator
=
(
const
KeypointComparator
&
)
=
delete
;
};
}
//namespace
...
...
@@ -2119,7 +2117,8 @@ void perf::sort(std::vector<cv::KeyPoint>& pts, cv::InputOutputArray descriptors
for
(
int
i
=
0
;
i
<
desc
.
rows
;
++
i
)
idxs
[
i
]
=
i
;
std
::
sort
(
idxs
.
data
(),
idxs
.
data
()
+
desc
.
rows
,
KeypointComparator
(
pts
));
comparators
::
KeypointGreater
cmp
;
std
::
sort
(
idxs
.
data
(),
idxs
.
data
()
+
desc
.
rows
,
[
&
](
int
lhs
,
int
rhs
){
return
cmp
(
pts
[
lhs
],
pts
[
rhs
]);
});
std
::
vector
<
cv
::
KeyPoint
>
spts
(
pts
.
size
());
cv
::
Mat
sdesc
(
desc
.
size
(),
desc
.
type
());
...
...
modules/videoio/src/cap_obsensor/obsensor_uvc_stream_channel.cpp
浏览文件 @
649841e6
...
...
@@ -198,7 +198,7 @@ DepthFrameUnpacker::DepthFrameUnpacker(){
outputDataBuf_
=
new
uint8_t
[
OUT_DATA_SIZE
];
}
DepthFrameUnpacker
::~
DepthFrameUnpacker
(){
DepthFrameUnpacker
::~
DepthFrameUnpacker
()
{
delete
[]
outputDataBuf_
;
}
...
...
modules/videoio/src/cap_obsensor/obsensor_uvc_stream_channel.hpp
浏览文件 @
649841e6
...
...
@@ -67,7 +67,7 @@ public:
class
DepthFrameProcessor
:
public
IFrameProcessor
{
public:
DepthFrameProcessor
(
const
OBExtensionParam
&
parma
);
virtual
~
DepthFrameProcessor
()
noexcept
;
virtual
~
DepthFrameProcessor
();
virtual
void
process
(
Frame
*
frame
)
override
;
private:
...
...
@@ -78,7 +78,7 @@ private:
class
DepthFrameUnpacker
:
public
IFrameProcessor
{
public:
DepthFrameUnpacker
();
virtual
~
DepthFrameUnpacker
()
noexcept
;
virtual
~
DepthFrameUnpacker
();
virtual
void
process
(
Frame
*
frame
)
override
;
private:
const
uint32_t
OUT_DATA_SIZE
=
1280
*
800
*
2
;
...
...
samples/cpp/train_svmsgd.cpp
浏览文件 @
649841e6
...
...
@@ -29,7 +29,7 @@ struct Data
bool
doTrain
(
const
Mat
samples
,
const
Mat
responses
,
Mat
&
weights
,
float
&
shift
);
//function finds two points for drawing line (wx = 0)
bool
findPointsForLine
(
const
Mat
&
weights
,
float
shift
,
Point
points
[],
int
width
,
int
height
);
bool
findPointsForLine
(
const
Mat
&
weights
,
float
shift
,
Point
points
[
2
],
int
width
,
int
height
);
// function finds cross point of line (wx = 0) and segment ( (y = HEIGHT, 0 <= x <= WIDTH) or (x = WIDTH, 0 <= y <= HEIGHT) )
bool
findCrossPointWithBorders
(
const
Mat
&
weights
,
float
shift
,
const
std
::
pair
<
Point
,
Point
>
&
segment
,
Point
&
crossPoint
);
...
...
samples/cpp/warpPerspective_demo.cpp
浏览文件 @
649841e6
...
...
@@ -157,7 +157,7 @@ static void onMouse(int event, int x, int y, int, void*)
{
for
(
int
i
=
0
;
i
<
4
;
++
i
)
{
if
((
event
==
EVENT_LBUTTONDOWN
)
&
((
abs
(
roi_corners
[
i
].
x
-
x
)
<
10
))
&
(
abs
(
roi_corners
[
i
].
y
-
y
)
<
10
))
if
((
event
==
EVENT_LBUTTONDOWN
)
&
&
((
abs
(
roi_corners
[
i
].
x
-
x
)
<
10
))
&
&
(
abs
(
roi_corners
[
i
].
y
-
y
)
<
10
))
{
selected_corner_index
=
i
;
dragging
=
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录