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
44d7435a
Commit
44d7435a
authored
Feb 06, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: eliminate calls of removed functionality from C++17
Most part is deprecated since C++11
parent
f77f2876
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
63 additions
and
12 deletions
+63
-12
test_affine3d_estimator.cpp
modules/calib3d/test/test_affine3d_estimator.cpp
+5
-0
functional.hpp
modules/core/include/opencv2/core/cuda/functional.hpp
+14
-0
brute_force_matcher.cpp
modules/cudafeatures2d/src/brute_force_matcher.cpp
+5
-0
featureselect.cpp
modules/imgproc/src/featureselect.cpp
+5
-2
generalized_hough.cpp
modules/imgproc/src/generalized_hough.cpp
+8
-0
test_goodfeaturetotrack.cpp
modules/imgproc/test/test_goodfeaturetotrack.cpp
+5
-2
perf_hogdetect.cpp
modules/objdetect/perf/opencl/perf_hogdetect.cpp
+5
-2
test_shape.cpp
modules/shape/test/test_shape.cpp
+1
-1
ts_perf.hpp
modules/ts/include/opencv2/ts/ts_perf.hpp
+10
-4
cuda_test.cpp
modules/ts/src/cuda_test.cpp
+4
-0
shape_example.cpp
samples/cpp/shape_example.cpp
+1
-1
No files found.
modules/calib3d/test/test_affine3d_estimator.cpp
View file @
44d7435a
...
...
@@ -138,8 +138,13 @@ bool CV_Affine3D_EstTest::testNPoints()
std
::
transform
(
fpts
.
ptr
<
Point3f
>
(),
fpts
.
ptr
<
Point3f
>
()
+
n
,
tpts
.
ptr
<
Point3f
>
(),
WrapAff
(
aff
));
/* adding noise*/
#ifdef CV_CXX11
std
::
transform
(
tpts
.
ptr
<
Point3f
>
()
+
m
,
tpts
.
ptr
<
Point3f
>
()
+
n
,
tpts
.
ptr
<
Point3f
>
()
+
m
,
[
=
]
(
const
Point3f
&
pt
)
->
Point3f
{
return
Noise
(
noise_level
)(
pt
+
shift_outl
);
});
#else
std
::
transform
(
tpts
.
ptr
<
Point3f
>
()
+
m
,
tpts
.
ptr
<
Point3f
>
()
+
n
,
tpts
.
ptr
<
Point3f
>
()
+
m
,
std
::
bind2nd
(
std
::
plus
<
Point3f
>
(),
shift_outl
));
std
::
transform
(
tpts
.
ptr
<
Point3f
>
()
+
m
,
tpts
.
ptr
<
Point3f
>
()
+
n
,
tpts
.
ptr
<
Point3f
>
()
+
m
,
Noise
(
noise_level
));
#endif
Mat
aff_est
;
vector
<
uchar
>
outl
;
...
...
modules/core/include/opencv2/core/cuda/functional.hpp
View file @
44d7435a
...
...
@@ -58,8 +58,22 @@
namespace
cv
{
namespace
cuda
{
namespace
device
{
// Function Objects
#ifdef CV_CXX11
template
<
typename
Argument
,
typename
Result
>
struct
unary_function
{
typedef
Argument
argument_type
;
typedef
Result
result_type
;
};
template
<
typename
Argument1
,
typename
Argument2
,
typename
Result
>
struct
binary_function
{
typedef
Argument1
first_argument_type
;
typedef
Argument2
second_argument_type
;
typedef
Result
result_type
;
};
#else
template
<
typename
Argument
,
typename
Result
>
struct
unary_function
:
public
std
::
unary_function
<
Argument
,
Result
>
{};
template
<
typename
Argument1
,
typename
Argument2
,
typename
Result
>
struct
binary_function
:
public
std
::
binary_function
<
Argument1
,
Argument2
,
Result
>
{};
#endif
// Arithmetic Operations
template
<
typename
T
>
struct
plus
:
binary_function
<
T
,
T
,
T
>
...
...
modules/cudafeatures2d/src/brute_force_matcher.cpp
View file @
44d7435a
...
...
@@ -564,7 +564,12 @@ namespace
if
(
compactResult
)
{
#ifdef CV_CXX11
std
::
vector
<
std
::
vector
<
DMatch
>
>::
iterator
new_end
=
std
::
remove_if
(
matches
.
begin
(),
matches
.
end
(),
[](
const
std
::
vector
<
DMatch
>&
e
)
->
bool
{
return
e
.
empty
();
});
#else
std
::
vector
<
std
::
vector
<
DMatch
>
>::
iterator
new_end
=
std
::
remove_if
(
matches
.
begin
(),
matches
.
end
(),
std
::
mem_fun_ref
(
&
std
::
vector
<
DMatch
>::
empty
));
#endif
matches
.
erase
(
new_end
,
matches
.
end
());
}
}
...
...
modules/imgproc/src/featureselect.cpp
View file @
44d7435a
...
...
@@ -52,8 +52,11 @@
namespace
cv
{
struct
greaterThanPtr
:
public
std
::
binary_function
<
const
float
*
,
const
float
*
,
bool
>
#ifdef CV_CXX11
struct
greaterThanPtr
#else
struct
greaterThanPtr
:
public
std
::
binary_function
<
const
float
*
,
const
float
*
,
bool
>
#endif
{
bool
operator
()
(
const
float
*
a
,
const
float
*
b
)
const
// Ensure a fully deterministic result of the sort
...
...
modules/imgproc/src/generalized_hough.cpp
View file @
44d7435a
...
...
@@ -385,7 +385,11 @@ namespace
const
double
thetaScale
=
levels_
/
360.0
;
r_table_
.
resize
(
levels_
+
1
);
#ifdef CV_CXX11
std
::
for_each
(
r_table_
.
begin
(),
r_table_
.
end
(),
[](
std
::
vector
<
Point
>&
e
)
->
void
{
e
.
clear
();
});
#else
std
::
for_each
(
r_table_
.
begin
(),
r_table_
.
end
(),
std
::
mem_fun_ref
(
&
std
::
vector
<
Point
>::
clear
));
#endif
for
(
int
y
=
0
;
y
<
templSize_
.
height
;
++
y
)
{
...
...
@@ -692,8 +696,12 @@ namespace
getContourPoints
(
edges
,
dx
,
dy
,
points
);
features
.
resize
(
levels_
+
1
);
#ifdef CV_CXX11
std
::
for_each
(
features
.
begin
(),
features
.
end
(),
[
=
](
std
::
vector
<
Feature
>&
e
)
{
e
.
clear
();
e
.
reserve
(
maxBufferSize_
);
});
#else
std
::
for_each
(
features
.
begin
(),
features
.
end
(),
std
::
mem_fun_ref
(
&
std
::
vector
<
Feature
>::
clear
));
std
::
for_each
(
features
.
begin
(),
features
.
end
(),
std
::
bind2nd
(
std
::
mem_fun_ref
(
&
std
::
vector
<
Feature
>::
reserve
),
maxBufferSize_
));
#endif
for
(
size_t
i
=
0
;
i
<
points
.
size
();
++
i
)
{
...
...
modules/imgproc/test/test_goodfeaturetotrack.cpp
View file @
44d7435a
...
...
@@ -56,8 +56,11 @@ enum { MINEIGENVAL=0, HARRIS=1, EIGENVALSVECS=2 };
/////////////////////ref//////////////////////
struct
greaterThanPtr
:
public
std
::
binary_function
<
const
float
*
,
const
float
*
,
bool
>
#ifdef CV_CXX11
struct
greaterThanPtr
#else
struct
greaterThanPtr
:
public
std
::
binary_function
<
const
float
*
,
const
float
*
,
bool
>
#endif
{
bool
operator
()
(
const
float
*
a
,
const
float
*
b
)
const
{
return
*
a
>
*
b
;
}
...
...
modules/objdetect/perf/opencl/perf_hogdetect.cpp
View file @
44d7435a
...
...
@@ -53,8 +53,11 @@ namespace opencv_test {
namespace
ocl
{
///////////// HOG////////////////////////
struct
RectLess
:
public
std
::
binary_function
<
cv
::
Rect
,
cv
::
Rect
,
bool
>
#ifdef CV_CXX11
struct
RectLess
#else
struct
RectLess
:
public
std
::
binary_function
<
cv
::
Rect
,
cv
::
Rect
,
bool
>
#endif
{
bool
operator
()(
const
cv
::
Rect
&
a
,
const
cv
::
Rect
&
b
)
const
...
...
modules/shape/test/test_shape.cpp
View file @
44d7435a
...
...
@@ -105,7 +105,7 @@ protected:
}
// Uniformly sampling
random_shuffle
(
contoursQuery
.
begin
(),
contoursQuery
.
end
()
);
cv
::
randShuffle
(
contoursQuery
);
int
nStart
=
NP
;
vector
<
PointType
>
cont
;
for
(
int
i
=
0
;
i
<
nStart
;
i
++
)
...
...
modules/ts/include/opencv2/ts/ts_perf.hpp
View file @
44d7435a
...
...
@@ -707,8 +707,11 @@ namespace comparators
{
template
<
typename
T
>
struct
RectLess_
:
public
std
::
binary_function
<
cv
::
Rect_
<
T
>
,
cv
::
Rect_
<
T
>
,
bool
>
#ifdef CV_CXX11
struct
RectLess_
#else
struct
RectLess_
:
public
std
::
binary_function
<
cv
::
Rect_
<
T
>
,
cv
::
Rect_
<
T
>
,
bool
>
#endif
{
bool
operator
()(
const
cv
::
Rect_
<
T
>&
r1
,
const
cv
::
Rect_
<
T
>&
r2
)
const
{
...
...
@@ -721,8 +724,11 @@ struct RectLess_ :
typedef
RectLess_
<
int
>
RectLess
;
struct
KeypointGreater
:
public
std
::
binary_function
<
cv
::
KeyPoint
,
cv
::
KeyPoint
,
bool
>
#ifdef CV_CXX11
struct
KeypointGreater
#else
struct
KeypointGreater
:
public
std
::
binary_function
<
cv
::
KeyPoint
,
cv
::
KeyPoint
,
bool
>
#endif
{
bool
operator
()(
const
cv
::
KeyPoint
&
kp1
,
const
cv
::
KeyPoint
&
kp2
)
const
{
...
...
modules/ts/src/cuda_test.cpp
View file @
44d7435a
...
...
@@ -462,7 +462,11 @@ namespace cvtest
return
false
;
}
#ifdef CV_CXX11
struct
KeyPointLess
#else
struct
KeyPointLess
:
std
::
binary_function
<
cv
::
KeyPoint
,
cv
::
KeyPoint
,
bool
>
#endif
{
bool
operator
()(
const
cv
::
KeyPoint
&
kp1
,
const
cv
::
KeyPoint
&
kp2
)
const
{
...
...
samples/cpp/shape_example.cpp
View file @
44d7435a
...
...
@@ -43,7 +43,7 @@ static vector<Point> simpleContour( const Mat& currentQuery, int n=300 )
}
// Uniformly sampling
random_shuffle
(
contoursQuery
.
begin
(),
contoursQuery
.
end
()
);
cv
::
randShuffle
(
contoursQuery
);
vector
<
Point
>
cont
;
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
...
...
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