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
c99d1c3b
Commit
c99d1c3b
authored
Jan 26, 2018
by
Maksim Shabunin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed several warnings produced by clang-6.0.0
parent
0ac290f8
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
84 additions
and
85 deletions
+84
-85
parvoretinafilter.hpp
modules/bioinspired/src/parvoretinafilter.hpp
+1
-1
kyheader.hpp
modules/saliency/src/BING/kyheader.hpp
+6
-6
io_bundler.h
modules/sfm/src/io/io_bundler.h
+1
-1
libmv_capi.h
modules/sfm/src/libmv_capi.h
+9
-9
projection.h
modules/sfm/src/libmv_light/libmv/multiview/projection.h
+1
-1
projection.cpp
modules/sfm/src/projection.cpp
+2
-2
simple_pipeline.cpp
modules/sfm/src/simple_pipeline.cpp
+3
-3
triangulation.cpp
modules/sfm/src/triangulation.cpp
+2
-2
scene.cpp
modules/sfm/test/scene.cpp
+1
-2
trackerFeature.cpp
modules/tracking/src/trackerFeature.cpp
+1
-1
edgeaware_filters_common.cpp
modules/ximgproc/src/edgeaware_filters_common.cpp
+36
-36
edgeaware_filters_common.hpp
modules/ximgproc/src/edgeaware_filters_common.hpp
+18
-18
guided_filter.cpp
modules/ximgproc/src/guided_filter.cpp
+3
-3
No files found.
modules/bioinspired/src/parvoretinafilter.hpp
View file @
c99d1c3b
...
@@ -244,7 +244,7 @@ private:
...
@@ -244,7 +244,7 @@ private:
float
*
parvocellularOutputON_PTR
=
parvocellularOutputON
+
r
.
start
;
float
*
parvocellularOutputON_PTR
=
parvocellularOutputON
+
r
.
start
;
float
*
parvocellularOutputOFF_PTR
=
parvocellularOutputOFF
+
r
.
start
;
float
*
parvocellularOutputOFF_PTR
=
parvocellularOutputOFF
+
r
.
start
;
for
(
register
int
IDpixel
=
r
.
start
;
IDpixel
!=
r
.
end
;
++
IDpixel
)
for
(
int
IDpixel
=
r
.
start
;
IDpixel
!=
r
.
end
;
++
IDpixel
)
{
{
float
pixelDifference
=
*
(
photoreceptorsOutput_PTR
++
)
-*
(
horizontalCellsOutput_PTR
++
);
float
pixelDifference
=
*
(
photoreceptorsOutput_PTR
++
)
-*
(
horizontalCellsOutput_PTR
++
);
// test condition to allow write pixelDifference in ON or OFF buffer and 0 in the over
// test condition to allow write pixelDifference in ON or OFF buffer and 0 in the over
...
...
modules/saliency/src/BING/kyheader.hpp
View file @
c99d1c3b
...
@@ -163,7 +163,7 @@ inline cv::Rect Vec4i2Rect( cv::Vec4i &v )
...
@@ -163,7 +163,7 @@ inline cv::Rect Vec4i2Rect( cv::Vec4i &v )
# define POPCNT64(x) __builtin_popcountll(x)
# define POPCNT64(x) __builtin_popcountll(x)
#endif
#endif
inline
int
popcnt64
(
register
uint64_t
u
)
inline
int
popcnt64
(
uint64_t
u
)
{
{
u
=
(
u
&
0x5555555555555555
)
+
(
(
u
>>
1
)
&
0x5555555555555555
);
u
=
(
u
&
0x5555555555555555
)
+
(
(
u
>>
1
)
&
0x5555555555555555
);
u
=
(
u
&
0x3333333333333333
)
+
(
(
u
>>
2
)
&
0x3333333333333333
);
u
=
(
u
&
0x3333333333333333
)
+
(
(
u
>>
2
)
&
0x3333333333333333
);
...
@@ -174,7 +174,7 @@ inline int popcnt64( register uint64_t u )
...
@@ -174,7 +174,7 @@ inline int popcnt64( register uint64_t u )
return
(
int
)
u
;
return
(
int
)
u
;
}
}
inline
int
popcnt
(
register
uint32_t
u
)
inline
int
popcnt
(
uint32_t
u
)
{
{
u
=
(
u
&
0x55555555
)
+
(
(
u
>>
1
)
&
0x55555555
);
u
=
(
u
&
0x55555555
)
+
(
(
u
>>
1
)
&
0x55555555
);
u
=
(
u
&
0x33333333
)
+
(
(
u
>>
2
)
&
0x33333333
);
u
=
(
u
&
0x33333333
)
+
(
(
u
>>
2
)
&
0x33333333
);
...
@@ -184,7 +184,7 @@ inline int popcnt( register uint32_t u )
...
@@ -184,7 +184,7 @@ inline int popcnt( register uint32_t u )
return
(
int
)
u
;
return
(
int
)
u
;
}
}
inline
int
popcnt64_nibble
(
register
uint64_t
u
)
inline
int
popcnt64_nibble
(
uint64_t
u
)
{
{
static
const
uint8_t
Table
[]
=
static
const
uint8_t
Table
[]
=
{
0
,
1
,
1
,
2
,
1
,
2
,
2
,
3
,
1
,
2
,
2
,
3
,
2
,
3
,
3
,
4
};
{
0
,
1
,
1
,
2
,
1
,
2
,
2
,
3
,
1
,
2
,
2
,
3
,
2
,
3
,
3
,
4
};
...
@@ -198,7 +198,7 @@ inline int popcnt64_nibble( register uint64_t u )
...
@@ -198,7 +198,7 @@ inline int popcnt64_nibble( register uint64_t u )
return
(
int
)
c
;
return
(
int
)
c
;
}
}
inline
int
popcnt_nibble
(
register
uint32_t
u
)
inline
int
popcnt_nibble
(
uint32_t
u
)
{
{
static
const
uint8_t
Table
[]
=
static
const
uint8_t
Table
[]
=
{
0
,
1
,
1
,
2
,
1
,
2
,
2
,
3
,
1
,
2
,
2
,
3
,
2
,
3
,
3
,
4
};
{
0
,
1
,
1
,
2
,
1
,
2
,
2
,
3
,
1
,
2
,
2
,
3
,
2
,
3
,
3
,
4
};
...
@@ -212,7 +212,7 @@ inline int popcnt_nibble( register uint32_t u )
...
@@ -212,7 +212,7 @@ inline int popcnt_nibble( register uint32_t u )
return
(
int
)
c
;
return
(
int
)
c
;
}
}
inline
int
popcnt64_byte
(
register
uint64_t
u
)
inline
int
popcnt64_byte
(
uint64_t
u
)
{
{
#define B2(k) k, k+1, k+1, k+2
#define B2(k) k, k+1, k+1, k+2
#define B4(k) B2(k), B2(k+1), B2(k+1), B2(k+2)
#define B4(k) B2(k), B2(k+1), B2(k+1), B2(k+2)
...
@@ -232,7 +232,7 @@ inline int popcnt64_byte( register uint64_t u )
...
@@ -232,7 +232,7 @@ inline int popcnt64_byte( register uint64_t u )
return
(
int
)
c
;
return
(
int
)
c
;
}
}
inline
int
popcnt_byte
(
register
uint32_t
u
)
inline
int
popcnt_byte
(
uint32_t
u
)
{
{
#define B2(k) k, k+1, k+1, k+2
#define B2(k) k, k+1, k+1, k+2
#define B4(k) B2(k), B2(k+1), B2(k+1), B2(k+2)
#define B4(k) B2(k), B2(k+1), B2(k+1), B2(k+2)
...
...
modules/sfm/src/io/io_bundler.h
View file @
c99d1c3b
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
// towards the top of the image. Thus, (-w/2, -h/2) is the lower-left corner of
// towards the top of the image. Thus, (-w/2, -h/2) is the lower-left corner of
// the image, and (w/2, h/2) is the top-right corner (where w and h are the
// the image, and (w/2, h/2) is the top-right corner (where w and h are the
// width and height of the image).
// width and height of the image).
bool
readBundlerFile
(
const
std
::
string
&
file
,
static
bool
readBundlerFile
(
const
std
::
string
&
file
,
std
::
vector
<
cv
::
Matx33d
>
&
Rs
,
std
::
vector
<
cv
::
Matx33d
>
&
Rs
,
std
::
vector
<
cv
::
Vec3d
>
&
Ts
,
std
::
vector
<
cv
::
Vec3d
>
&
Ts
,
std
::
vector
<
cv
::
Matx33d
>
&
Ks
,
std
::
vector
<
cv
::
Matx33d
>
&
Ks
,
...
...
modules/sfm/src/libmv_capi.h
View file @
c99d1c3b
...
@@ -85,7 +85,7 @@ struct libmv_Reconstruction {
...
@@ -85,7 +85,7 @@ struct libmv_Reconstruction {
// Based on 'libmv_capi' (blender API)
// Based on 'libmv_capi' (blender API)
/////////////////////////////////////
/////////////////////////////////////
void
libmv_initLogging
(
const
char
*
argv0
)
{
static
void
libmv_initLogging
(
const
char
*
argv0
)
{
// Make it so FATAL messages are always print into console.
// Make it so FATAL messages are always print into console.
char
severity_fatal
[
32
];
char
severity_fatal
[
32
];
static
int
initLog
=
0
;
static
int
initLog
=
0
;
...
@@ -101,14 +101,14 @@ void libmv_initLogging(const char* argv0) {
...
@@ -101,14 +101,14 @@ void libmv_initLogging(const char* argv0) {
SetCommandLineOption
(
"minloglevel"
,
severity_fatal
);
SetCommandLineOption
(
"minloglevel"
,
severity_fatal
);
}
}
void
libmv_startDebugLogging
(
void
)
{
static
void
libmv_startDebugLogging
(
void
)
{
SetCommandLineOption
(
"logtostderr"
,
"1"
);
SetCommandLineOption
(
"logtostderr"
,
"1"
);
SetCommandLineOption
(
"v"
,
"2"
);
SetCommandLineOption
(
"v"
,
"2"
);
SetCommandLineOption
(
"stderrthreshold"
,
"1"
);
SetCommandLineOption
(
"stderrthreshold"
,
"1"
);
SetCommandLineOption
(
"minloglevel"
,
"0"
);
SetCommandLineOption
(
"minloglevel"
,
"0"
);
}
}
void
libmv_setLoggingVerbosity
(
int
verbosity
)
{
static
void
libmv_setLoggingVerbosity
(
int
verbosity
)
{
char
val
[
10
];
char
val
[
10
];
snprintf
(
val
,
sizeof
(
val
),
"%d"
,
verbosity
);
snprintf
(
val
,
sizeof
(
val
),
"%d"
,
verbosity
);
SetCommandLineOption
(
"v"
,
val
);
SetCommandLineOption
(
"v"
,
val
);
...
@@ -122,7 +122,7 @@ void libmv_setLoggingVerbosity(int verbosity) {
...
@@ -122,7 +122,7 @@ void libmv_setLoggingVerbosity(int verbosity) {
/* Select the two keyframes that give a lower reprojection error
/* Select the two keyframes that give a lower reprojection error
*/
*/
bool
selectTwoKeyframesBasedOnGRICAndVariance
(
static
bool
selectTwoKeyframesBasedOnGRICAndVariance
(
Tracks
&
tracks
,
Tracks
&
tracks
,
Tracks
&
normalized_tracks
,
Tracks
&
normalized_tracks
,
CameraIntrinsics
&
camera_intrinsics
,
CameraIntrinsics
&
camera_intrinsics
,
...
@@ -252,7 +252,7 @@ static void libmv_cameraIntrinsicsFillFromOptions(
...
@@ -252,7 +252,7 @@ static void libmv_cameraIntrinsicsFillFromOptions(
* options values.
* options values.
*/
*/
CameraIntrinsics
*
libmv_cameraIntrinsicsCreateFromOptions
(
static
CameraIntrinsics
*
libmv_cameraIntrinsicsCreateFromOptions
(
const
libmv_CameraIntrinsicsOptions
*
camera_intrinsics_options
)
{
const
libmv_CameraIntrinsicsOptions
*
camera_intrinsics_options
)
{
CameraIntrinsics
*
camera_intrinsics
=
NULL
;
CameraIntrinsics
*
camera_intrinsics
=
NULL
;
switch
(
camera_intrinsics_options
->
distortion_model
)
{
switch
(
camera_intrinsics_options
->
distortion_model
)
{
...
@@ -278,7 +278,7 @@ CameraIntrinsics* libmv_cameraIntrinsicsCreateFromOptions(
...
@@ -278,7 +278,7 @@ CameraIntrinsics* libmv_cameraIntrinsicsCreateFromOptions(
/* Normalizes the tracks given the camera intrinsics parameters
/* Normalizes the tracks given the camera intrinsics parameters
*/
*/
void
static
void
libmv_getNormalizedTracks
(
const
libmv
::
Tracks
&
tracks
,
libmv_getNormalizedTracks
(
const
libmv
::
Tracks
&
tracks
,
const
libmv
::
CameraIntrinsics
&
camera_intrinsics
,
const
libmv
::
CameraIntrinsics
&
camera_intrinsics
,
libmv
::
Tracks
*
normalized_tracks
)
{
libmv
::
Tracks
*
normalized_tracks
)
{
...
@@ -302,7 +302,7 @@ libmv_getNormalizedTracks(const libmv::Tracks &tracks,
...
@@ -302,7 +302,7 @@ libmv_getNormalizedTracks(const libmv::Tracks &tracks,
/* Refine the final solution using Bundle Adjustment
/* Refine the final solution using Bundle Adjustment
*/
*/
void
libmv_solveRefineIntrinsics
(
static
void
libmv_solveRefineIntrinsics
(
const
Tracks
&
tracks
,
const
Tracks
&
tracks
,
const
int
refine_intrinsics
,
const
int
refine_intrinsics
,
const
int
bundle_constraints
,
const
int
bundle_constraints
,
...
@@ -339,7 +339,7 @@ void libmv_solveRefineIntrinsics(
...
@@ -339,7 +339,7 @@ void libmv_solveRefineIntrinsics(
/* Finish the reconstrunction and computes the final reprojection error
/* Finish the reconstrunction and computes the final reprojection error
*/
*/
void
finishReconstruction
(
static
void
finishReconstruction
(
const
Tracks
&
tracks
,
const
Tracks
&
tracks
,
const
CameraIntrinsics
&
camera_intrinsics
,
const
CameraIntrinsics
&
camera_intrinsics
,
libmv_Reconstruction
*
libmv_reconstruction
)
{
libmv_Reconstruction
*
libmv_reconstruction
)
{
...
@@ -361,7 +361,7 @@ void finishReconstruction(
...
@@ -361,7 +361,7 @@ void finishReconstruction(
/* Perform the complete reconstruction process
/* Perform the complete reconstruction process
*/
*/
libmv_Reconstruction
*
libmv_solveReconstruction
(
static
libmv_Reconstruction
*
libmv_solveReconstruction
(
const
Tracks
&
libmv_tracks
,
const
Tracks
&
libmv_tracks
,
const
libmv_CameraIntrinsicsOptions
*
libmv_camera_intrinsics_options
,
const
libmv_CameraIntrinsicsOptions
*
libmv_camera_intrinsics_options
,
libmv_ReconstructionOptions
*
libmv_reconstruction_options
)
{
libmv_ReconstructionOptions
*
libmv_reconstruction_options
)
{
...
...
modules/sfm/src/libmv_light/libmv/multiview/projection.h
View file @
c99d1c3b
...
@@ -122,7 +122,7 @@ inline void Project(const Mat34 &P, const Vec3 &X, Vec3 *x) {
...
@@ -122,7 +122,7 @@ inline void Project(const Mat34 &P, const Vec3 &X, Vec3 *x) {
inline
void
Project
(
const
Mat34
&
P
,
const
Vec3
&
X
,
Vec2
*
x
)
{
inline
void
Project
(
const
Mat34
&
P
,
const
Vec3
&
X
,
Vec2
*
x
)
{
Vec3
hx
;
Vec3
hx
;
Project
(
P
,
X
,
x
);
Project
(
P
,
X
,
&
h
x
);
*
x
=
hx
.
head
<
2
>
()
/
hx
(
2
);
*
x
=
hx
.
head
<
2
>
()
/
hx
(
2
);
}
}
...
...
modules/sfm/src/projection.cpp
View file @
c99d1c3b
...
@@ -75,7 +75,7 @@ homogeneousToEuclidean(const Mat & _X, Mat & _x)
...
@@ -75,7 +75,7 @@ homogeneousToEuclidean(const Mat & _X, Mat & _x)
}
}
void
void
homogeneousToEuclidean
(
const
InputArray
_X
,
OutputArray
_x
)
homogeneousToEuclidean
(
InputArray
_X
,
OutputArray
_x
)
{
{
// src
// src
const
Mat
X
=
_X
.
getMat
();
const
Mat
X
=
_X
.
getMat
();
...
@@ -96,7 +96,7 @@ homogeneousToEuclidean(const InputArray _X, OutputArray _x)
...
@@ -96,7 +96,7 @@ homogeneousToEuclidean(const InputArray _X, OutputArray _x)
}
}
void
void
euclideanToHomogeneous
(
const
InputArray
_x
,
OutputArray
_X
)
euclideanToHomogeneous
(
InputArray
_x
,
OutputArray
_X
)
{
{
const
Mat
x
=
_x
.
getMat
();
const
Mat
x
=
_x
.
getMat
();
const
Mat
last_row
=
Mat
::
ones
(
1
,
x
.
cols
,
x
.
type
());
const
Mat
last_row
=
Mat
::
ones
(
1
,
x
.
cols
,
x
.
type
());
...
...
modules/sfm/src/simple_pipeline.cpp
View file @
c99d1c3b
...
@@ -52,7 +52,7 @@ namespace sfm
...
@@ -52,7 +52,7 @@ namespace sfm
/* Parses a given array of 2d points into the libmv tracks structure
/* Parses a given array of 2d points into the libmv tracks structure
*/
*/
void
static
void
parser_2D_tracks
(
const
std
::
vector
<
Mat
>
&
points2d
,
libmv
::
Tracks
&
tracks
)
parser_2D_tracks
(
const
std
::
vector
<
Mat
>
&
points2d
,
libmv
::
Tracks
&
tracks
)
{
{
const
int
nframes
=
static_cast
<
int
>
(
points2d
.
size
());
const
int
nframes
=
static_cast
<
int
>
(
points2d
.
size
());
...
@@ -71,7 +71,7 @@ parser_2D_tracks( const std::vector<Mat> &points2d, libmv::Tracks &tracks )
...
@@ -71,7 +71,7 @@ parser_2D_tracks( const std::vector<Mat> &points2d, libmv::Tracks &tracks )
/* Parses a given set of matches into the libmv tracks structure
/* Parses a given set of matches into the libmv tracks structure
*/
*/
void
static
void
parser_2D_tracks
(
const
libmv
::
Matches
&
matches
,
libmv
::
Tracks
&
tracks
)
parser_2D_tracks
(
const
libmv
::
Matches
&
matches
,
libmv
::
Tracks
&
tracks
)
{
{
std
::
set
<
Matches
::
ImageID
>::
const_iterator
iter_image
=
std
::
set
<
Matches
::
ImageID
>::
const_iterator
iter_image
=
...
@@ -115,7 +115,7 @@ parser_2D_tracks( const libmv::Matches &matches, libmv::Tracks &tracks )
...
@@ -115,7 +115,7 @@ parser_2D_tracks( const libmv::Matches &matches, libmv::Tracks &tracks )
* reconstruction pipeline.
* reconstruction pipeline.
*/
*/
libmv_Reconstruction
*
libmv_solveReconstructionImpl
(
static
libmv_Reconstruction
*
libmv_solveReconstructionImpl
(
const
std
::
vector
<
String
>
&
images
,
const
std
::
vector
<
String
>
&
images
,
const
libmv_CameraIntrinsicsOptions
*
libmv_camera_intrinsics_options
,
const
libmv_CameraIntrinsicsOptions
*
libmv_camera_intrinsics_options
,
libmv_ReconstructionOptions
*
libmv_reconstruction_options
)
libmv_ReconstructionOptions
*
libmv_reconstruction_options
)
...
...
modules/sfm/src/triangulation.cpp
View file @
c99d1c3b
...
@@ -64,7 +64,7 @@ namespace sfm
...
@@ -64,7 +64,7 @@ namespace sfm
Reference: @cite HartleyZ00 12.2 pag.312
Reference: @cite HartleyZ00 12.2 pag.312
*/
*/
void
static
void
triangulateDLT
(
const
Vec2d
&
xl
,
const
Vec2d
&
xr
,
triangulateDLT
(
const
Vec2d
&
xl
,
const
Vec2d
&
xr
,
const
Matx34d
&
Pl
,
const
Matx34d
&
Pr
,
const
Matx34d
&
Pl
,
const
Matx34d
&
Pr
,
Vec3d
&
point3d
)
Vec3d
&
point3d
)
...
@@ -92,7 +92,7 @@ triangulateDLT( const Vec2d &xl, const Vec2d &xr,
...
@@ -92,7 +92,7 @@ triangulateDLT( const Vec2d &xl, const Vec2d &xr,
* Reference: it is the standard DLT; for derivation see appendix of Keir's thesis
* Reference: it is the standard DLT; for derivation see appendix of Keir's thesis
*/
*/
void
static
void
triangulateNViews
(
const
Mat_
<
double
>
&
x
,
const
std
::
vector
<
Matx34d
>
&
Ps
,
Vec3d
&
X
)
triangulateNViews
(
const
Mat_
<
double
>
&
x
,
const
std
::
vector
<
Matx34d
>
&
Ps
,
Vec3d
&
X
)
{
{
CV_Assert
(
x
.
rows
==
2
);
CV_Assert
(
x
.
rows
==
2
);
...
...
modules/sfm/test/scene.cpp
View file @
c99d1c3b
...
@@ -38,8 +38,7 @@
...
@@ -38,8 +38,7 @@
#include "test_precomp.hpp"
#include "test_precomp.hpp"
cv
::
Matx33d
static
cv
::
Matx33d
randomK
(
bool
is_projective
)
randomK
(
bool
is_projective
)
{
{
static
cv
::
RNG
rng
;
static
cv
::
RNG
rng
;
...
...
modules/tracking/src/trackerFeature.cpp
View file @
c99d1c3b
...
@@ -250,7 +250,7 @@ class Parallel_compute : public cv::ParallelLoopBody
...
@@ -250,7 +250,7 @@ class Parallel_compute : public cv::ParallelLoopBody
virtual
void
operator
()(
const
cv
::
Range
&
r
)
const
virtual
void
operator
()(
const
cv
::
Range
&
r
)
const
{
{
for
(
register
int
jf
=
r
.
start
;
jf
!=
r
.
end
;
++
jf
)
for
(
int
jf
=
r
.
start
;
jf
!=
r
.
end
;
++
jf
)
{
{
int
cols
=
images
[
jf
].
cols
;
int
cols
=
images
[
jf
].
cols
;
int
rows
=
images
[
jf
].
rows
;
int
rows
=
images
[
jf
].
rows
;
...
...
modules/ximgproc/src/edgeaware_filters_common.cpp
View file @
c99d1c3b
...
@@ -151,9 +151,9 @@ inline float getFloatSignBit()
...
@@ -151,9 +151,9 @@ inline float getFloatSignBit()
return
signFloat
;
return
signFloat
;
}
}
void
add_
(
register
float
*
dst
,
register
float
*
src1
,
int
w
)
void
add_
(
float
*
dst
,
float
*
src1
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -171,9 +171,9 @@ void add_(register float *dst, register float *src1, int w)
...
@@ -171,9 +171,9 @@ void add_(register float *dst, register float *src1, int w)
dst
[
j
]
+=
src1
[
j
];
dst
[
j
]
+=
src1
[
j
];
}
}
void
mul
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
int
w
)
void
mul
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -191,9 +191,9 @@ void mul(register float *dst, register float *src1, register float *src2, int w)
...
@@ -191,9 +191,9 @@ void mul(register float *dst, register float *src1, register float *src2, int w)
dst
[
j
]
=
src1
[
j
]
*
src2
[
j
];
dst
[
j
]
=
src1
[
j
]
*
src2
[
j
];
}
}
void
mul
(
register
float
*
dst
,
register
float
*
src1
,
float
src2
,
int
w
)
void
mul
(
float
*
dst
,
float
*
src1
,
float
src2
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -211,9 +211,9 @@ void mul(register float *dst, register float *src1, float src2, int w)
...
@@ -211,9 +211,9 @@ void mul(register float *dst, register float *src1, float src2, int w)
dst
[
j
]
=
src1
[
j
]
*
src2
;
dst
[
j
]
=
src1
[
j
]
*
src2
;
}
}
void
mad
(
register
float
*
dst
,
register
float
*
src1
,
float
alpha
,
float
beta
,
int
w
)
void
mad
(
float
*
dst
,
float
*
src1
,
float
alpha
,
float
beta
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -233,9 +233,9 @@ void mad(register float *dst, register float *src1, float alpha, float beta, int
...
@@ -233,9 +233,9 @@ void mad(register float *dst, register float *src1, float alpha, float beta, int
dst
[
j
]
=
alpha
*
src1
[
j
]
+
beta
;
dst
[
j
]
=
alpha
*
src1
[
j
]
+
beta
;
}
}
void
sqr_
(
register
float
*
dst
,
register
float
*
src1
,
int
w
)
void
sqr_
(
float
*
dst
,
float
*
src1
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -252,9 +252,9 @@ void sqr_(register float *dst, register float *src1, int w)
...
@@ -252,9 +252,9 @@ void sqr_(register float *dst, register float *src1, int w)
dst
[
j
]
=
src1
[
j
]
*
src1
[
j
];
dst
[
j
]
=
src1
[
j
]
*
src1
[
j
];
}
}
void
sqr_dif
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
int
w
)
void
sqr_dif
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -271,9 +271,9 @@ void sqr_dif(register float *dst, register float *src1, register float *src2, in
...
@@ -271,9 +271,9 @@ void sqr_dif(register float *dst, register float *src1, register float *src2, in
dst
[
j
]
=
(
src1
[
j
]
-
src2
[
j
])
*
(
src1
[
j
]
-
src2
[
j
]);
dst
[
j
]
=
(
src1
[
j
]
-
src2
[
j
])
*
(
src1
[
j
]
-
src2
[
j
]);
}
}
void
add_mul
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
int
w
)
void
add_mul
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -295,9 +295,9 @@ void add_mul(register float *dst, register float *src1, register float *src2, in
...
@@ -295,9 +295,9 @@ void add_mul(register float *dst, register float *src1, register float *src2, in
}
}
}
}
void
add_sqr
(
register
float
*
dst
,
register
float
*
src1
,
int
w
)
void
add_sqr
(
float
*
dst
,
float
*
src1
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -318,9 +318,9 @@ void add_sqr(register float *dst, register float *src1, int w)
...
@@ -318,9 +318,9 @@ void add_sqr(register float *dst, register float *src1, int w)
}
}
}
}
void
add_sqr_dif
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
int
w
)
void
add_sqr_dif
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -341,9 +341,9 @@ void add_sqr_dif(register float *dst, register float *src1, register float *src2
...
@@ -341,9 +341,9 @@ void add_sqr_dif(register float *dst, register float *src1, register float *src2
}
}
}
}
void
sub_mul
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
int
w
)
void
sub_mul
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -363,9 +363,9 @@ void sub_mul(register float *dst, register float *src1, register float *src2, in
...
@@ -363,9 +363,9 @@ void sub_mul(register float *dst, register float *src1, register float *src2, in
dst
[
j
]
-=
src1
[
j
]
*
src2
[
j
];
dst
[
j
]
-=
src1
[
j
]
*
src2
[
j
];
}
}
void
sub_mad
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
float
c0
,
int
w
)
void
sub_mad
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
float
c0
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -387,9 +387,9 @@ void sub_mad(register float *dst, register float *src1, register float *src2, fl
...
@@ -387,9 +387,9 @@ void sub_mad(register float *dst, register float *src1, register float *src2, fl
dst
[
j
]
-=
src1
[
j
]
*
src2
[
j
]
+
c0
;
dst
[
j
]
-=
src1
[
j
]
*
src2
[
j
]
+
c0
;
}
}
void
det_2x2
(
register
float
*
dst
,
register
float
*
a00
,
register
float
*
a01
,
register
float
*
a10
,
register
float
*
a11
,
int
w
)
void
det_2x2
(
float
*
dst
,
float
*
a00
,
float
*
a01
,
float
*
a10
,
float
*
a11
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -407,9 +407,9 @@ void det_2x2(register float *dst, register float *a00, register float *a01, regi
...
@@ -407,9 +407,9 @@ void det_2x2(register float *dst, register float *a00, register float *a01, regi
dst
[
j
]
=
a00
[
j
]
*
a11
[
j
]
-
a01
[
j
]
*
a10
[
j
];
dst
[
j
]
=
a00
[
j
]
*
a11
[
j
]
-
a01
[
j
]
*
a10
[
j
];
}
}
void
div_det_2x2
(
register
float
*
a00
,
register
float
*
a01
,
register
float
*
a11
,
int
w
)
void
div_det_2x2
(
float
*
a00
,
float
*
a01
,
float
*
a11
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -447,9 +447,9 @@ void div_det_2x2(register float *a00, register float *a01, register float *a11,
...
@@ -447,9 +447,9 @@ void div_det_2x2(register float *a00, register float *a01, register float *a11,
}
}
}
}
void
div_1x
(
register
float
*
a1
,
register
float
*
b1
,
int
w
)
void
div_1x
(
float
*
a1
,
float
*
b1
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -468,9 +468,9 @@ void div_1x(register float *a1, register float *b1, int w)
...
@@ -468,9 +468,9 @@ void div_1x(register float *a1, register float *b1, int w)
}
}
}
}
void
inv_self
(
register
float
*
src
,
int
w
)
void
inv_self
(
float
*
src
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -488,9 +488,9 @@ void inv_self(register float *src, int w)
...
@@ -488,9 +488,9 @@ void inv_self(register float *src, int w)
}
}
}
}
void
sqrt_
(
register
float
*
dst
,
register
float
*
src
,
int
w
)
void
sqrt_
(
float
*
dst
,
float
*
src
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -506,9 +506,9 @@ void sqrt_(register float *dst, register float *src, int w)
...
@@ -506,9 +506,9 @@ void sqrt_(register float *dst, register float *src, int w)
dst
[
j
]
=
sqrt
(
src
[
j
]);
dst
[
j
]
=
sqrt
(
src
[
j
]);
}
}
void
min_
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
int
w
)
void
min_
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
@@ -527,9 +527,9 @@ void min_(register float *dst, register float *src1, register float *src2, int w
...
@@ -527,9 +527,9 @@ void min_(register float *dst, register float *src1, register float *src2, int w
dst
[
j
]
=
std
::
min
(
src1
[
j
],
src2
[
j
]);
dst
[
j
]
=
std
::
min
(
src1
[
j
],
src2
[
j
]);
}
}
void
rf_vert_row_pass
(
register
float
*
curRow
,
register
float
*
prevRow
,
float
alphaVal
,
int
w
)
void
rf_vert_row_pass
(
float
*
curRow
,
float
*
prevRow
,
float
alphaVal
,
int
w
)
{
{
register
int
j
=
0
;
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
())
if
(
CPU_SUPPORT_SSE1
())
{
{
...
...
modules/ximgproc/src/edgeaware_filters_common.hpp
View file @
c99d1c3b
...
@@ -51,43 +51,43 @@ void checkSameSizeAndDepth(InputArrayOfArrays src, Size &sz, int &depth);
...
@@ -51,43 +51,43 @@ void checkSameSizeAndDepth(InputArrayOfArrays src, Size &sz, int &depth);
namespace
intrinsics
namespace
intrinsics
{
{
void
add_
(
register
float
*
dst
,
register
float
*
src1
,
int
w
);
void
add_
(
float
*
dst
,
float
*
src1
,
int
w
);
void
mul
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
int
w
);
void
mul
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
int
w
);
void
mul
(
register
float
*
dst
,
register
float
*
src1
,
float
src2
,
int
w
);
void
mul
(
float
*
dst
,
float
*
src1
,
float
src2
,
int
w
);
//dst = alpha*src + beta
//dst = alpha*src + beta
void
mad
(
register
float
*
dst
,
register
float
*
src1
,
float
alpha
,
float
beta
,
int
w
);
void
mad
(
float
*
dst
,
float
*
src1
,
float
alpha
,
float
beta
,
int
w
);
void
add_mul
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
int
w
);
void
add_mul
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
int
w
);
void
sub_mul
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
int
w
);
void
sub_mul
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
int
w
);
void
sub_mad
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
float
c0
,
int
w
);
void
sub_mad
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
float
c0
,
int
w
);
void
det_2x2
(
register
float
*
dst
,
register
float
*
a00
,
register
float
*
a01
,
register
float
*
a10
,
register
float
*
a11
,
int
w
);
void
det_2x2
(
float
*
dst
,
float
*
a00
,
float
*
a01
,
float
*
a10
,
float
*
a11
,
int
w
);
void
div_det_2x2
(
register
float
*
a00
,
register
float
*
a01
,
register
float
*
a11
,
int
w
);
void
div_det_2x2
(
float
*
a00
,
float
*
a01
,
float
*
a11
,
int
w
);
void
div_1x
(
register
float
*
a1
,
register
float
*
b1
,
int
w
);
void
div_1x
(
float
*
a1
,
float
*
b1
,
int
w
);
void
inv_self
(
register
float
*
src
,
int
w
);
void
inv_self
(
float
*
src
,
int
w
);
void
sqr_
(
register
float
*
dst
,
register
float
*
src1
,
int
w
);
void
sqr_
(
float
*
dst
,
float
*
src1
,
int
w
);
void
sqrt_
(
register
float
*
dst
,
register
float
*
src
,
int
w
);
void
sqrt_
(
float
*
dst
,
float
*
src
,
int
w
);
void
sqr_dif
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
int
w
);
void
sqr_dif
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
int
w
);
void
add_sqr_dif
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
int
w
);
void
add_sqr_dif
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
int
w
);
void
add_sqr
(
register
float
*
dst
,
register
float
*
src1
,
int
w
);
void
add_sqr
(
float
*
dst
,
float
*
src1
,
int
w
);
void
min_
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
int
w
);
void
min_
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
int
w
);
void
rf_vert_row_pass
(
register
float
*
curRow
,
register
float
*
prevRow
,
float
alphaVal
,
int
w
);
void
rf_vert_row_pass
(
float
*
curRow
,
float
*
prevRow
,
float
alphaVal
,
int
w
);
}
}
}
}
...
...
modules/ximgproc/src/guided_filter.cpp
View file @
c99d1c3b
...
@@ -415,8 +415,8 @@ void GuidedFilterImpl::ComputeCovGuideInv_ParBody::operator()(const Range& range
...
@@ -415,8 +415,8 @@ void GuidedFilterImpl::ComputeCovGuideInv_ParBody::operator()(const Range& range
for
(
int
k
=
0
;
k
<
3
;
k
++
)
for
(
int
k
=
0
;
k
<
3
;
k
++
)
{
{
register
float
*
a
=
covars
(
k
,
0
).
ptr
<
float
>
(
i
);
float
*
a
=
covars
(
k
,
0
).
ptr
<
float
>
(
i
);
register
float
*
ac
=
gf
.
covarsInv
(
k
,
0
).
ptr
<
float
>
(
i
);
float
*
ac
=
gf
.
covarsInv
(
k
,
0
).
ptr
<
float
>
(
i
);
if
(
k
==
0
)
if
(
k
==
0
)
mul
(
det
,
a
,
ac
,
gf
.
w
);
mul
(
det
,
a
,
ac
,
gf
.
w
);
...
@@ -503,7 +503,7 @@ void GuidedFilterImpl::ComputeCovFromSrcChannelsMul_ParBody::operator()(const Ra
...
@@ -503,7 +503,7 @@ void GuidedFilterImpl::ComputeCovFromSrcChannelsMul_ParBody::operator()(const Ra
int
start
=
(
si
%
2
)
?
0
:
gf
.
gCnNum
-
1
;
int
start
=
(
si
%
2
)
?
0
:
gf
.
gCnNum
-
1
;
int
end
=
(
si
%
2
)
?
gf
.
gCnNum
:
-
1
;
int
end
=
(
si
%
2
)
?
gf
.
gCnNum
:
-
1
;
register
float
*
srcMeanLine
=
srcCnMean
[
si
].
ptr
<
float
>
(
i
);
float
*
srcMeanLine
=
srcCnMean
[
si
].
ptr
<
float
>
(
i
);
for
(
int
gi
=
start
;
gi
!=
end
;
gi
+=
step
)
for
(
int
gi
=
start
;
gi
!=
end
;
gi
+=
step
)
{
{
...
...
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