Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
41559d74
Commit
41559d74
authored
Jun 02, 2017
by
Yuriy Obukh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some changes to make VS2010 compiler happy.
parent
27f6d4e7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
14 additions
and
14 deletions
+14
-14
perf_dis_optflow.cpp
modules/optflow/perf/opencl/perf_dis_optflow.cpp
+2
-2
perf_disflow.cpp
modules/optflow/perf/perf_disflow.cpp
+2
-2
sparse_matching_gpc.cpp
modules/optflow/src/sparse_matching_gpc.cpp
+1
-1
test_OF_reproducibility.cpp
modules/optflow/test/test_OF_reproducibility.cpp
+4
-4
projectorcalibration.cpp
modules/structured_light/samples/projectorcalibration.cpp
+1
-1
sinusoidalpattern.cpp
modules/structured_light/src/sinusoidalpattern.cpp
+2
-2
pct_webcam.cpp
modules/xfeatures2d/samples/pct_webcam.cpp
+1
-1
bilateral_texture_filter.cpp
modules/ximgproc/src/bilateral_texture_filter.cpp
+1
-1
No files found.
modules/optflow/perf/opencl/perf_dis_optflow.cpp
View file @
41559d74
...
@@ -92,12 +92,12 @@ void MakeArtificialExample(UMat &dst_frame1, UMat &dst_frame2)
...
@@ -92,12 +92,12 @@ void MakeArtificialExample(UMat &dst_frame1, UMat &dst_frame2)
int
OF_scale
=
6
;
int
OF_scale
=
6
;
double
sigma
=
dst_frame1
.
cols
/
300
;
double
sigma
=
dst_frame1
.
cols
/
300
;
UMat
tmp
(
Size
(
dst_frame1
.
cols
/
(
int
)
pow
(
2
,
src_scale
),
dst_frame1
.
rows
/
(
int
)
pow
(
2
,
src_scale
)),
CV_8U
);
UMat
tmp
(
Size
(
dst_frame1
.
cols
/
(
1
<<
src_scale
),
dst_frame1
.
rows
/
(
1
<<
src_scale
)),
CV_8U
);
randu
(
tmp
,
0
,
255
);
randu
(
tmp
,
0
,
255
);
resize
(
tmp
,
dst_frame1
,
dst_frame1
.
size
(),
0.0
,
0.0
,
INTER_LINEAR
);
resize
(
tmp
,
dst_frame1
,
dst_frame1
.
size
(),
0.0
,
0.0
,
INTER_LINEAR
);
resize
(
tmp
,
dst_frame2
,
dst_frame2
.
size
(),
0.0
,
0.0
,
INTER_LINEAR
);
resize
(
tmp
,
dst_frame2
,
dst_frame2
.
size
(),
0.0
,
0.0
,
INTER_LINEAR
);
Mat
displacement_field
(
Size
(
dst_frame1
.
cols
/
(
int
)
pow
(
2
,
OF_scale
),
dst_frame1
.
rows
/
(
int
)
pow
(
2
,
OF_scale
)),
Mat
displacement_field
(
Size
(
dst_frame1
.
cols
/
(
1
<<
OF_scale
),
dst_frame1
.
rows
/
(
1
<<
OF_scale
)),
CV_32FC2
);
CV_32FC2
);
randn
(
displacement_field
,
0.0
,
sigma
);
randn
(
displacement_field
,
0.0
,
sigma
);
resize
(
displacement_field
,
displacement_field
,
dst_frame2
.
size
(),
0.0
,
0.0
,
INTER_CUBIC
);
resize
(
displacement_field
,
displacement_field
,
dst_frame2
.
size
(),
0.0
,
0.0
,
INTER_CUBIC
);
...
...
modules/optflow/perf/perf_disflow.cpp
View file @
41559d74
...
@@ -86,12 +86,12 @@ void MakeArtificialExample(Mat &dst_frame1, Mat &dst_frame2)
...
@@ -86,12 +86,12 @@ void MakeArtificialExample(Mat &dst_frame1, Mat &dst_frame2)
int
OF_scale
=
6
;
int
OF_scale
=
6
;
double
sigma
=
dst_frame1
.
cols
/
300
;
double
sigma
=
dst_frame1
.
cols
/
300
;
Mat
tmp
(
Size
(
dst_frame1
.
cols
/
(
int
)
pow
(
2
,
src_scale
),
dst_frame1
.
rows
/
(
int
)
pow
(
2
,
src_scale
)),
CV_8U
);
Mat
tmp
(
Size
(
dst_frame1
.
cols
/
(
1
<<
src_scale
),
dst_frame1
.
rows
/
(
1
<<
src_scale
)),
CV_8U
);
randu
(
tmp
,
0
,
255
);
randu
(
tmp
,
0
,
255
);
resize
(
tmp
,
dst_frame1
,
dst_frame1
.
size
(),
0.0
,
0.0
,
INTER_LINEAR
);
resize
(
tmp
,
dst_frame1
,
dst_frame1
.
size
(),
0.0
,
0.0
,
INTER_LINEAR
);
resize
(
tmp
,
dst_frame2
,
dst_frame2
.
size
(),
0.0
,
0.0
,
INTER_LINEAR
);
resize
(
tmp
,
dst_frame2
,
dst_frame2
.
size
(),
0.0
,
0.0
,
INTER_LINEAR
);
Mat
displacement_field
(
Size
(
dst_frame1
.
cols
/
(
int
)
pow
(
2
,
OF_scale
),
dst_frame1
.
rows
/
(
int
)
pow
(
2
,
OF_scale
)),
Mat
displacement_field
(
Size
(
dst_frame1
.
cols
/
(
1
<<
OF_scale
),
dst_frame1
.
rows
/
(
1
<<
OF_scale
)),
CV_32FC2
);
CV_32FC2
);
randn
(
displacement_field
,
0.0
,
sigma
);
randn
(
displacement_field
,
0.0
,
sigma
);
resize
(
displacement_field
,
displacement_field
,
dst_frame2
.
size
(),
0.0
,
0.0
,
INTER_CUBIC
);
resize
(
displacement_field
,
displacement_field
,
dst_frame2
.
size
(),
0.0
,
0.0
,
INTER_CUBIC
);
...
...
modules/optflow/src/sparse_matching_gpc.cpp
View file @
41559d74
...
@@ -570,7 +570,7 @@ bool GPCTree::trainNode( size_t nodeId, SIter begin, SIter end, unsigned depth )
...
@@ -570,7 +570,7 @@ bool GPCTree::trainNode( size_t nodeId, SIter begin, SIter end, unsigned depth )
localBestScore
=
score
;
localBestScore
=
score
;
else
else
{
{
const
double
beta
=
simulatedAnnealingTemperatureCoef
*
std
::
sqrt
(
i
)
/
(
nSamples
*
(
scoreGainPos
+
scoreGainNeg
)
);
const
double
beta
=
simulatedAnnealingTemperatureCoef
*
std
::
sqrt
(
static_cast
<
float
>
(
i
)
)
/
(
nSamples
*
(
scoreGainPos
+
scoreGainNeg
)
);
if
(
rng
.
uniform
(
0.0
,
1.0
)
>
std
::
exp
(
-
beta
*
(
localBestScore
-
score
)
)
)
if
(
rng
.
uniform
(
0.0
,
1.0
)
>
std
::
exp
(
-
beta
*
(
localBestScore
-
score
)
)
)
coef
[
pos
]
=
randomModification
;
coef
[
pos
]
=
randomModification
;
}
}
...
...
modules/optflow/test/test_OF_reproducibility.cpp
View file @
41559d74
...
@@ -100,8 +100,8 @@ TEST_P(DenseOpticalFlow_DIS, MultithreadReproducibility)
...
@@ -100,8 +100,8 @@ TEST_P(DenseOpticalFlow_DIS, MultithreadReproducibility)
// resulting flow should be within the frame bounds:
// resulting flow should be within the frame bounds:
double
min_val
,
max_val
;
double
min_val
,
max_val
;
minMaxLoc
(
resMultiThread
,
&
min_val
,
&
max_val
);
minMaxLoc
(
resMultiThread
,
&
min_val
,
&
max_val
);
EXPECT_LE
(
abs
(
min_val
),
sqrt
(
size
.
height
*
size
.
height
+
size
.
width
*
size
.
width
)
);
EXPECT_LE
(
abs
(
min_val
),
sqrt
(
static_cast
<
double
>
(
size
.
height
*
size
.
height
+
size
.
width
*
size
.
width
))
);
EXPECT_LE
(
abs
(
max_val
),
sqrt
(
size
.
height
*
size
.
height
+
size
.
width
*
size
.
width
)
);
EXPECT_LE
(
abs
(
max_val
),
sqrt
(
static_cast
<
double
>
(
size
.
height
*
size
.
height
+
size
.
width
*
size
.
width
))
);
}
}
}
}
...
@@ -151,8 +151,8 @@ TEST_P(DenseOpticalFlow_VariationalRefinement, MultithreadReproducibility)
...
@@ -151,8 +151,8 @@ TEST_P(DenseOpticalFlow_VariationalRefinement, MultithreadReproducibility)
// resulting flow should be within the frame bounds:
// resulting flow should be within the frame bounds:
double
min_val
,
max_val
;
double
min_val
,
max_val
;
minMaxLoc
(
resMultiThread
,
&
min_val
,
&
max_val
);
minMaxLoc
(
resMultiThread
,
&
min_val
,
&
max_val
);
EXPECT_LE
(
abs
(
min_val
),
sqrt
(
size
.
height
*
size
.
height
+
size
.
width
*
size
.
width
)
);
EXPECT_LE
(
abs
(
min_val
),
sqrt
(
static_cast
<
double
>
(
size
.
height
*
size
.
height
+
size
.
width
*
size
.
width
))
);
EXPECT_LE
(
abs
(
max_val
),
sqrt
(
size
.
height
*
size
.
height
+
size
.
width
*
size
.
width
)
);
EXPECT_LE
(
abs
(
max_val
),
sqrt
(
static_cast
<
double
>
(
size
.
height
*
size
.
height
+
size
.
width
*
size
.
width
))
);
}
}
}
}
...
...
modules/structured_light/samples/projectorcalibration.cpp
View file @
41559d74
...
@@ -477,7 +477,7 @@ void normalize( const Mat &pts, const int& dim, Mat& normpts, Mat &T )
...
@@ -477,7 +477,7 @@ void normalize( const Mat &pts, const int& dim, Mat& normpts, Mat &T )
averagedist
=
averagedist
+
(
float
)
norm
(
ptstmp
);
averagedist
=
averagedist
+
(
float
)
norm
(
ptstmp
);
}
}
averagedist
=
averagedist
/
normpts
.
cols
;
averagedist
=
averagedist
/
normpts
.
cols
;
scale
=
(
float
)(
sqrt
(
dim
)
/
averagedist
);
scale
=
(
float
)(
sqrt
(
static_cast
<
float
>
(
dim
)
)
/
averagedist
);
normpts
=
normpts
*
scale
;
normpts
=
normpts
*
scale
;
...
...
modules/structured_light/src/sinusoidalpattern.cpp
View file @
41559d74
...
@@ -200,12 +200,12 @@ bool SinusoidalPatternProfilometry_Impl::generate( OutputArrayOfArrays pattern )
...
@@ -200,12 +200,12 @@ bool SinusoidalPatternProfilometry_Impl::generate( OutputArrayOfArrays pattern )
if
(
params
.
horizontal
)
if
(
params
.
horizontal
)
{
{
period
=
params
.
height
/
params
.
nbrOfPeriods
;
period
=
params
.
height
/
params
.
nbrOfPeriods
;
nbrOfMarkersOnOneRow
=
(
int
)
floor
(
(
params
.
width
-
firstMarkerOffset
)
/
m
);
nbrOfMarkersOnOneRow
=
(
int
)
floor
(
static_cast
<
float
>
((
params
.
width
-
firstMarkerOffset
)
/
m
)
);
}
}
else
else
{
{
period
=
params
.
width
/
params
.
nbrOfPeriods
;
period
=
params
.
width
/
params
.
nbrOfPeriods
;
nbrOfMarkersOnOneRow
=
(
int
)
floor
(
(
params
.
height
-
firstMarkerOffset
)
/
m
);
nbrOfMarkersOnOneRow
=
(
int
)
floor
(
static_cast
<
float
>
((
params
.
height
-
firstMarkerOffset
)
/
m
)
);
}
}
frequency
=
(
float
)
1
/
period
;
frequency
=
(
float
)
1
/
period
;
...
...
modules/xfeatures2d/samples/pct_webcam.cpp
View file @
41559d74
...
@@ -117,7 +117,7 @@ int main(int argc, char** argv)
...
@@ -117,7 +117,7 @@ int main(int argc, char** argv)
cerr
<<
"Sample count have to be a positive integer: "
<<
argv
[
1
]
<<
endl
;
cerr
<<
"Sample count have to be a positive integer: "
<<
argv
[
1
]
<<
endl
;
return
1
;
return
1
;
}
}
initSeedCount
=
(
int
)
floor
(
initSampleCount
/
4
);
initSeedCount
=
(
int
)
floor
(
static_cast
<
float
>
(
initSampleCount
/
4
)
);
initSeedCount
=
std
::
max
(
1
,
initSeedCount
);
// fallback if sample count == 1
initSeedCount
=
std
::
max
(
1
,
initSeedCount
);
// fallback if sample count == 1
}
}
if
(
argc
>
2
)
// seed count
if
(
argc
>
2
)
// seed count
...
...
modules/ximgproc/src/bilateral_texture_filter.cpp
View file @
41559d74
...
@@ -63,7 +63,7 @@ namespace ximgproc
...
@@ -63,7 +63,7 @@ namespace ximgproc
if
(
sigmaAlpha
<
0
)
if
(
sigmaAlpha
<
0
)
sigmaAlpha
=
5.
*
fr
;
sigmaAlpha
=
5.
*
fr
;
if
(
sigmaAvg
<
0
)
if
(
sigmaAvg
<
0
)
sigmaAvg
=
0.05
*
sqrt
(
s
rc
.
channels
(
));
sigmaAvg
=
0.05
*
sqrt
(
s
tatic_cast
<
float
>
(
src
.
channels
()
));
Mat
I
;
Mat
I
;
src
.
copyTo
(
I
);
src
.
copyTo
(
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