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