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
9fd5e99f
Commit
9fd5e99f
authored
Sep 18, 2017
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1363 from sovrasov:fix_gcc7_warnings
parents
97ea5bf9
b4c67e8b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
71 deletions
+20
-71
multicalib.cpp
modules/ccalib/src/multicalib.cpp
+9
-9
descriptor.hpp
...descriptor/include/opencv2/line_descriptor/descriptor.hpp
+6
-0
matching.hpp
modules/stereo/include/opencv2/stereo/matching.hpp
+3
-5
test_block_matching.cpp
modules/stereo/test/test_block_matching.cpp
+2
-2
harris_lapace_detector.cpp
modules/xfeatures2d/src/harris_lapace_detector.cpp
+0
-55
No files found.
modules/ccalib/src/multicalib.cpp
View file @
9fd5e99f
...
...
@@ -749,12 +749,12 @@ void MultiCameraCalibration::writeParameters(const std::string& filename)
for
(
int
camIdx
=
0
;
camIdx
<
_nCamera
;
++
camIdx
)
{
char
num
[
10
]
;
sprintf
(
num
,
"%d"
,
camIdx
)
;
std
::
string
cameraMatrix
=
"camera_matrix_"
+
std
::
string
(
num
);
std
::
string
cameraPose
=
"camera_pose_"
+
std
::
string
(
num
);
std
::
string
cameraDistortion
=
"camera_distortion_"
+
std
::
string
(
num
);
std
::
string
cameraXi
=
"xi_"
+
std
::
string
(
num
);
std
::
stringstream
tmpStr
;
tmpStr
<<
camIdx
;
std
::
string
cameraMatrix
=
"camera_matrix_"
+
tmpStr
.
str
(
);
std
::
string
cameraPose
=
"camera_pose_"
+
tmpStr
.
str
(
);
std
::
string
cameraDistortion
=
"camera_distortion_"
+
tmpStr
.
str
(
);
std
::
string
cameraXi
=
"xi_"
+
tmpStr
.
str
(
);
fs
<<
cameraMatrix
<<
_cameraMatrix
[
camIdx
];
fs
<<
cameraDistortion
<<
_distortCoeffs
[
camIdx
];
...
...
@@ -770,9 +770,9 @@ void MultiCameraCalibration::writeParameters(const std::string& filename)
for
(
int
photoIdx
=
_nCamera
;
photoIdx
<
(
int
)
_vertexList
.
size
();
++
photoIdx
)
{
char
timestamp
[
100
]
;
sprintf
(
timestamp
,
"%d"
,
_vertexList
[
photoIdx
].
timestamp
)
;
std
::
string
photoTimestamp
=
"pose_timestamp_"
+
std
::
string
(
timestamp
);
std
::
stringstream
tmpStr
;
tmpStr
<<
_vertexList
[
photoIdx
].
timestamp
;
std
::
string
photoTimestamp
=
"pose_timestamp_"
+
tmpStr
.
str
(
);
fs
<<
photoTimestamp
<<
_vertexList
[
photoIdx
].
pose
;
}
...
...
modules/line_descriptor/include/opencv2/line_descriptor/descriptor.hpp
View file @
9fd5e99f
...
...
@@ -401,6 +401,12 @@ class CV_EXPORTS BinaryDescriptor : public Algorithm
unsigned
int
octaveCount
;
//the decriptor of line
std
::
vector
<
float
>
descriptor
;
OctaveSingleLine
()
:
startPointX
(
0
),
startPointY
(
0
),
endPointX
(
0
),
endPointY
(
0
),
sPointInOctaveX
(
0
),
sPointInOctaveY
(
0
),
ePointInOctaveX
(
0
),
ePointInOctaveY
(
0
),
direction
(
0
),
salience
(
0
),
lineLength
(
0
),
numOfPixels
(
0
),
octaveCount
(
0
),
descriptor
(
std
::
vector
<
float
>
())
{}
};
struct
Pixel
...
...
modules/stereo/include/opencv2/stereo/matching.hpp
View file @
9fd5e99f
...
...
@@ -44,11 +44,11 @@
* The interface contains the main methods for computing the matching between the left and right images *
* *
\******************************************************************************************************************/
#include <stdint.h>
#ifndef _OPENCV_MATCHING_HPP_
#define _OPENCV_MATCHING_HPP_
#ifdef __cplusplus
#include <stdint.h>
#include "opencv2/core.hpp"
namespace
cv
{
...
...
@@ -423,7 +423,6 @@ namespace cv
//preprocessing the cost volume in order to get it ready for aggregation
void
costGathering
(
const
Mat
&
hammingDistanceCost
,
Mat
&
cost
)
{
CV_Assert
(
hammingDistanceCost
.
rows
==
hammingDistanceCost
.
rows
);
CV_Assert
(
hammingDistanceCost
.
type
()
==
CV_16S
);
CV_Assert
(
cost
.
type
()
==
CV_16S
);
int
maxDisp
=
maxDisparity
;
...
...
@@ -620,5 +619,4 @@ namespace cv
}
}
#endif
#endif
/*End of file*/
modules/stereo/test/test_block_matching.cpp
View file @
9fd5e99f
...
...
@@ -97,7 +97,7 @@ void CV_BlockMatchingTest::run(int )
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_INVALID_TEST_DATA
);
return
;
}
if
(
image1
.
rows
!=
image2
.
rows
||
image1
.
cols
!=
image2
.
cols
||
gt
.
cols
!=
gt
.
cols
||
gt
.
rows
!=
gt
.
rows
)
if
(
image1
.
rows
!=
image2
.
rows
||
image1
.
cols
!=
image2
.
cols
||
gt
.
cols
!=
image1
.
cols
||
gt
.
rows
!=
image1
.
rows
)
{
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"Wrong input / output dimension
\n
"
);
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_INVALID_TEST_DATA
);
...
...
@@ -181,7 +181,7 @@ void CV_SGBlockMatchingTest::run(int )
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_INVALID_TEST_DATA
);
return
;
}
if
(
image1
.
rows
!=
image2
.
rows
||
image1
.
cols
!=
image2
.
cols
||
gt
.
cols
!=
gt
.
cols
||
gt
.
rows
!=
gt
.
rows
)
if
(
image1
.
rows
!=
image2
.
rows
||
image1
.
cols
!=
image2
.
cols
||
gt
.
cols
!=
image1
.
cols
||
gt
.
rows
!=
image1
.
rows
)
{
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"Wrong input / output dimension
\n
"
);
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_INVALID_TEST_DATA
);
...
...
modules/xfeatures2d/src/harris_lapace_detector.cpp
View file @
9fd5e99f
...
...
@@ -21,7 +21,6 @@ protected:
{
public
:
std
::
vector
<
Mat
>
layers
;
Octave
();
Octave
(
std
::
vector
<
Mat
>
layers
);
virtual
~
Octave
();
std
::
vector
<
Mat
>
getLayers
();
...
...
@@ -33,10 +32,8 @@ protected:
public
:
std
::
vector
<
Mat
>
layers
;
DOGOctave
();
DOGOctave
(
std
::
vector
<
Mat
>
layers
);
virtual
~
DOGOctave
();
std
::
vector
<
Mat
>
getLayers
();
Mat
getLayerAt
(
int
i
);
};
...
...
@@ -53,30 +50,21 @@ public:
float
sigma0
;
int
omin
;
float
step
;
Params
();
Params
(
int
octavesN
,
int
layersN
,
float
sigma0
,
int
omin
);
void
clear
();
};
Params
params
;
Pyramid
();
Pyramid
(
const
Mat
&
img
,
int
octavesN
,
int
layersN
=
2
,
float
sigma0
=
1
,
int
omin
=
0
,
bool
DOG
=
false
);
Mat
getLayer
(
int
octave
,
int
layer
);
Mat
getDOGLayer
(
int
octave
,
int
layer
);
float
getSigma
(
int
octave
,
int
layer
);
float
getSigma
(
int
layer
);
virtual
~
Pyramid
();
Params
getParams
();
void
clear
();
bool
empty
();
};
Pyramid
::
Pyramid
()
{
}
/**
* Pyramid class constructor
* octavesN_: number of octaves
...
...
@@ -234,15 +222,6 @@ Mat Pyramid::getDOGLayer(int octave, int layer)
return
DOG_octaves
[
octave
].
getLayerAt
(
layer
);
}
/**
* Return sigma value of indicated octave and layer
*/
float
Pyramid
::
getSigma
(
int
octave
,
int
layer
)
{
return
powf
(
2.0
f
,
float
(
octave
))
*
powf
(
params
.
step
,
float
(
layer
))
*
params
.
sigma0
;
}
/**
* Return sigma value of indicated layer
* sigma value of layer is the same at each octave
...
...
@@ -271,19 +250,6 @@ void Pyramid::clear()
params
.
clear
();
}
/**
* Empty Pyramid
* @return
*/
bool
Pyramid
::
empty
()
{
return
octaves
.
empty
();
}
Pyramid
::
Params
::
Params
()
{
}
/**
* Params for Pyramid class
*
...
...
@@ -295,14 +261,6 @@ Pyramid::Params::Params(int octavesN_, int layersN_, float sigma0_, int omin_) :
step
=
powf
(
2
,
1.0
f
/
layersN
);
}
/**
* Returns Pyramid's params
*/
Pyramid
::
Params
Pyramid
::
getParams
()
{
return
params
;
}
/**
* Set to zero all params
*/
...
...
@@ -328,10 +286,6 @@ std::vector<Mat> Pyramid::Octave::getLayers()
return
layers
;
}
Pyramid
::
Octave
::
Octave
()
{
}
/**
* Return the Octave's layer at index i
*/
...
...
@@ -345,21 +299,12 @@ Pyramid::Octave::~Octave()
{
}
Pyramid
::
DOGOctave
::
DOGOctave
()
{
}
Pyramid
::
DOGOctave
::
DOGOctave
(
std
::
vector
<
Mat
>
_layers
)
:
layers
(
_layers
)
{}
Pyramid
::
DOGOctave
::~
DOGOctave
()
{
}
std
::
vector
<
Mat
>
Pyramid
::
DOGOctave
::
getLayers
()
{
return
layers
;
}
Mat
Pyramid
::
DOGOctave
::
getLayerAt
(
int
i
)
{
CV_Assert
(
i
<
(
int
)
layers
.
size
());
...
...
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