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
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
122 additions
and
127 deletions
+122
-127
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
+2
-3
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
+4
-5
triangulation.cpp
modules/sfm/src/triangulation.cpp
+3
-4
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
+46
-46
edgeaware_filters_common.hpp
modules/ximgproc/src/edgeaware_filters_common.hpp
+28
-29
guided_filter.cpp
modules/ximgproc/src/guided_filter.cpp
+18
-18
No files found.
modules/bioinspired/src/parvoretinafilter.hpp
View file @
c99d1c3b
...
...
@@ -244,7 +244,7 @@ private:
float
*
parvocellularOutputON_PTR
=
parvocellularOutputON
+
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
++
);
// 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 )
# define POPCNT64(x) __builtin_popcountll(x)
#endif
inline
int
popcnt64
(
register
uint64_t
u
)
inline
int
popcnt64
(
uint64_t
u
)
{
u
=
(
u
&
0x5555555555555555
)
+
(
(
u
>>
1
)
&
0x5555555555555555
);
u
=
(
u
&
0x3333333333333333
)
+
(
(
u
>>
2
)
&
0x3333333333333333
);
...
...
@@ -174,7 +174,7 @@ inline int popcnt64( register uint64_t 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
&
0x33333333
)
+
(
(
u
>>
2
)
&
0x33333333
);
...
...
@@ -184,7 +184,7 @@ inline int popcnt( register uint32_t u )
return
(
int
)
u
;
}
inline
int
popcnt64_nibble
(
register
uint64_t
u
)
inline
int
popcnt64_nibble
(
uint64_t
u
)
{
static
const
uint8_t
Table
[]
=
{
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 )
return
(
int
)
c
;
}
inline
int
popcnt_nibble
(
register
uint32_t
u
)
inline
int
popcnt_nibble
(
uint32_t
u
)
{
static
const
uint8_t
Table
[]
=
{
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 )
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 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 )
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 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 @@
// 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
// 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
::
Vec3d
>
&
Ts
,
std
::
vector
<
cv
::
Matx33d
>
&
Ks
,
...
...
@@ -186,4 +186,4 @@ bool readBundlerFile(const std::string &file,
ifs
.
close
();
return
true
;
}
\ No newline at end of file
}
modules/sfm/src/libmv_capi.h
View file @
c99d1c3b
...
...
@@ -85,7 +85,7 @@ struct libmv_Reconstruction {
// 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.
char
severity_fatal
[
32
];
static
int
initLog
=
0
;
...
...
@@ -101,14 +101,14 @@ void libmv_initLogging(const char* argv0) {
SetCommandLineOption
(
"minloglevel"
,
severity_fatal
);
}
void
libmv_startDebugLogging
(
void
)
{
static
void
libmv_startDebugLogging
(
void
)
{
SetCommandLineOption
(
"logtostderr"
,
"1"
);
SetCommandLineOption
(
"v"
,
"2"
);
SetCommandLineOption
(
"stderrthreshold"
,
"1"
);
SetCommandLineOption
(
"minloglevel"
,
"0"
);
}
void
libmv_setLoggingVerbosity
(
int
verbosity
)
{
static
void
libmv_setLoggingVerbosity
(
int
verbosity
)
{
char
val
[
10
];
snprintf
(
val
,
sizeof
(
val
),
"%d"
,
verbosity
);
SetCommandLineOption
(
"v"
,
val
);
...
...
@@ -122,7 +122,7 @@ void libmv_setLoggingVerbosity(int verbosity) {
/* Select the two keyframes that give a lower reprojection error
*/
bool
selectTwoKeyframesBasedOnGRICAndVariance
(
static
bool
selectTwoKeyframesBasedOnGRICAndVariance
(
Tracks
&
tracks
,
Tracks
&
normalized_tracks
,
CameraIntrinsics
&
camera_intrinsics
,
...
...
@@ -252,7 +252,7 @@ static void libmv_cameraIntrinsicsFillFromOptions(
* options values.
*/
CameraIntrinsics
*
libmv_cameraIntrinsicsCreateFromOptions
(
static
CameraIntrinsics
*
libmv_cameraIntrinsicsCreateFromOptions
(
const
libmv_CameraIntrinsicsOptions
*
camera_intrinsics_options
)
{
CameraIntrinsics
*
camera_intrinsics
=
NULL
;
switch
(
camera_intrinsics_options
->
distortion_model
)
{
...
...
@@ -278,7 +278,7 @@ CameraIntrinsics* libmv_cameraIntrinsicsCreateFromOptions(
/* Normalizes the tracks given the camera intrinsics parameters
*/
void
static
void
libmv_getNormalizedTracks
(
const
libmv
::
Tracks
&
tracks
,
const
libmv
::
CameraIntrinsics
&
camera_intrinsics
,
libmv
::
Tracks
*
normalized_tracks
)
{
...
...
@@ -302,7 +302,7 @@ libmv_getNormalizedTracks(const libmv::Tracks &tracks,
/* Refine the final solution using Bundle Adjustment
*/
void
libmv_solveRefineIntrinsics
(
static
void
libmv_solveRefineIntrinsics
(
const
Tracks
&
tracks
,
const
int
refine_intrinsics
,
const
int
bundle_constraints
,
...
...
@@ -339,7 +339,7 @@ void libmv_solveRefineIntrinsics(
/* Finish the reconstrunction and computes the final reprojection error
*/
void
finishReconstruction
(
static
void
finishReconstruction
(
const
Tracks
&
tracks
,
const
CameraIntrinsics
&
camera_intrinsics
,
libmv_Reconstruction
*
libmv_reconstruction
)
{
...
...
@@ -361,7 +361,7 @@ void finishReconstruction(
/* Perform the complete reconstruction process
*/
libmv_Reconstruction
*
libmv_solveReconstruction
(
static
libmv_Reconstruction
*
libmv_solveReconstruction
(
const
Tracks
&
libmv_tracks
,
const
libmv_CameraIntrinsicsOptions
*
libmv_camera_intrinsics_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) {
inline
void
Project
(
const
Mat34
&
P
,
const
Vec3
&
X
,
Vec2
*
x
)
{
Vec3
hx
;
Project
(
P
,
X
,
x
);
Project
(
P
,
X
,
&
h
x
);
*
x
=
hx
.
head
<
2
>
()
/
hx
(
2
);
}
...
...
modules/sfm/src/projection.cpp
View file @
c99d1c3b
...
...
@@ -75,7 +75,7 @@ homogeneousToEuclidean(const Mat & _X, Mat & _x)
}
void
homogeneousToEuclidean
(
const
InputArray
_X
,
OutputArray
_x
)
homogeneousToEuclidean
(
InputArray
_X
,
OutputArray
_x
)
{
// src
const
Mat
X
=
_X
.
getMat
();
...
...
@@ -96,7 +96,7 @@ homogeneousToEuclidean(const InputArray _X, OutputArray _x)
}
void
euclideanToHomogeneous
(
const
InputArray
_x
,
OutputArray
_X
)
euclideanToHomogeneous
(
InputArray
_x
,
OutputArray
_X
)
{
const
Mat
x
=
_x
.
getMat
();
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
/* 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
)
{
const
int
nframes
=
static_cast
<
int
>
(
points2d
.
size
());
...
...
@@ -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
*/
void
static
void
parser_2D_tracks
(
const
libmv
::
Matches
&
matches
,
libmv
::
Tracks
&
tracks
)
{
std
::
set
<
Matches
::
ImageID
>::
const_iterator
iter_image
=
...
...
@@ -115,7 +115,7 @@ parser_2D_tracks( const libmv::Matches &matches, libmv::Tracks &tracks )
* reconstruction pipeline.
*/
libmv_Reconstruction
*
libmv_solveReconstructionImpl
(
static
libmv_Reconstruction
*
libmv_solveReconstructionImpl
(
const
std
::
vector
<
String
>
&
images
,
const
libmv_CameraIntrinsicsOptions
*
libmv_camera_intrinsics_options
,
libmv_ReconstructionOptions
*
libmv_reconstruction_options
)
...
...
@@ -318,4 +318,4 @@ SFMLibmvEuclideanReconstruction::create(const libmv_CameraIntrinsicsOptions &cam
#endif
/* End of file. */
\ No newline at end of file
/* End of file. */
modules/sfm/src/triangulation.cpp
View file @
c99d1c3b
...
...
@@ -64,7 +64,7 @@ namespace sfm
Reference: @cite HartleyZ00 12.2 pag.312
*/
void
static
void
triangulateDLT
(
const
Vec2d
&
xl
,
const
Vec2d
&
xr
,
const
Matx34d
&
Pl
,
const
Matx34d
&
Pr
,
Vec3d
&
point3d
)
...
...
@@ -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
*/
void
static
void
triangulateNViews
(
const
Mat_
<
double
>
&
x
,
const
std
::
vector
<
Matx34d
>
&
Ps
,
Vec3d
&
X
)
{
CV_Assert
(
x
.
rows
==
2
);
...
...
@@ -193,4 +193,4 @@ triangulatePoints(InputArrayOfArrays _points2d, InputArrayOfArrays _projection_m
}
}
/* namespace sfm */
}
/* namespace cv */
\ No newline at end of file
}
/* namespace cv */
modules/sfm/test/scene.cpp
View file @
c99d1c3b
...
...
@@ -38,8 +38,7 @@
#include "test_precomp.hpp"
cv
::
Matx33d
randomK
(
bool
is_projective
)
static
cv
::
Matx33d
randomK
(
bool
is_projective
)
{
static
cv
::
RNG
rng
;
...
...
modules/tracking/src/trackerFeature.cpp
View file @
c99d1c3b
...
...
@@ -250,7 +250,7 @@ class Parallel_compute : public cv::ParallelLoopBody
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
rows
=
images
[
jf
].
rows
;
...
...
modules/ximgproc/src/edgeaware_filters_common.cpp
View file @
c99d1c3b
...
...
@@ -2,26 +2,26 @@
* By downloading, copying, installing or using the software you agree to this license.
* If you do not agree to this license, do not download, install,
* copy or use the software.
*
*
*
*
* License Agreement
* For Open Source Computer Vision Library
* (3 - clause BSD License)
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met :
*
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and / or other materials provided with the distribution.
*
*
* * Neither the names of the copyright holders nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* This software is provided by the copyright holders and contributors "as is" and
* any express or implied warranties, including, but not limited to, the implied
* warranties of merchantability and fitness for a particular purpose are disclaimed.
...
...
@@ -151,9 +151,9 @@ inline float getFloatSignBit()
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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -171,9 +171,9 @@ void add_(register float *dst, register float *src1, int w)
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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -191,9 +191,9 @@ void mul(register float *dst, register float *src1, register float *src2, int w)
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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -211,9 +211,9 @@ void mul(register float *dst, register float *src1, float src2, int w)
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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -233,9 +233,9 @@ void mad(register float *dst, register float *src1, float alpha, float beta, int
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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -252,9 +252,9 @@ void sqr_(register float *dst, register float *src1, int w)
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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -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
]);
}
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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -363,9 +363,9 @@ void sub_mul(register float *dst, register float *src1, register float *src2, in
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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -387,9 +387,9 @@ void sub_mad(register float *dst, register float *src1, register float *src2, fl
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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -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
];
}
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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -425,13 +425,13 @@ void div_det_2x2(register float *a00, register float *a01, register float *a11,
_a01
=
_mm_loadu_ps
(
a01
+
j
);
_a01
=
_mm_xor_ps
(
_a01
,
SIGN_MASK
);
b
=
_mm_mul_ps
(
_a01
,
_a01
);
a
=
_mm_sub_ps
(
a
,
b
);
_a01
=
_mm_div_ps
(
_a01
,
a
);
_a00
=
_mm_div_ps
(
_a00
,
a
);
_a11
=
_mm_div_ps
(
_a11
,
a
);
_mm_storeu_ps
(
a01
+
j
,
_a01
);
_mm_storeu_ps
(
a00
+
j
,
_a00
);
_mm_storeu_ps
(
a11
+
j
,
_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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -506,9 +506,9 @@ void sqrt_(register float *dst, register float *src, int w)
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
(
CPU_SUPPORT_SSE1
())
{
...
...
@@ -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
]);
}
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
(
CPU_SUPPORT_SSE1
())
{
...
...
modules/ximgproc/src/edgeaware_filters_common.hpp
View file @
c99d1c3b
...
...
@@ -2,26 +2,26 @@
* By downloading, copying, installing or using the software you agree to this license.
* If you do not agree to this license, do not download, install,
* copy or use the software.
*
*
*
*
* License Agreement
* For Open Source Computer Vision Library
* (3 - clause BSD License)
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met :
*
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and / or other materials provided with the distribution.
*
*
* * Neither the names of the copyright holders nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* This software is provided by the copyright holders and contributors "as is" and
* any express or implied warranties, including, but not limited to, the implied
* warranties of merchantability and fitness for a particular purpose are disclaimed.
...
...
@@ -50,48 +50,48 @@ int getTotalNumberOfChannels(InputArrayOfArrays src);
void
checkSameSizeAndDepth
(
InputArrayOfArrays
src
,
Size
&
sz
,
int
&
depth
);
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
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
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
int
w
);
void
add_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_m
ul
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
int
w
);
void
sub_m
ad
(
float
*
dst
,
float
*
src1
,
float
*
src2
,
float
c0
,
int
w
);
void
sub_mad
(
register
float
*
dst
,
register
float
*
src1
,
register
float
*
src2
,
float
c0
,
int
w
);
void
det_2x2
(
float
*
dst
,
float
*
a00
,
float
*
a01
,
float
*
a10
,
float
*
a11
,
int
w
);
void
d
et_2x2
(
register
float
*
dst
,
register
float
*
a00
,
register
float
*
a01
,
register
float
*
a10
,
register
float
*
a11
,
int
w
);
void
d
iv_det_2x2
(
float
*
a00
,
float
*
a01
,
float
*
a11
,
int
w
);
void
div_
det_2x2
(
register
float
*
a00
,
register
float
*
a01
,
register
float
*
a1
1
,
int
w
);
void
div_
1x
(
float
*
a1
,
float
*
b
1
,
int
w
);
void
div_1x
(
register
float
*
a1
,
register
float
*
b1
,
int
w
);
void
inv_self
(
float
*
src
,
int
w
);
void
inv_self
(
register
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
);
}
}
}
#endif
#endif
\ No newline at end of file
#endif
modules/ximgproc/src/guided_filter.cpp
View file @
c99d1c3b
...
...
@@ -2,26 +2,26 @@
* By downloading, copying, installing or using the software you agree to this license.
* If you do not agree to this license, do not download, install,
* copy or use the software.
*
*
*
*
* License Agreement
* For Open Source Computer Vision Library
* (3 - clause BSD License)
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met :
*
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and / or other materials provided with the distribution.
*
*
* * Neither the names of the copyright holders nor the names of the contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* This software is provided by the copyright holders and contributors "as is" and
* any express or implied warranties, including, but not limited to, the implied
* warranties of merchantability and fitness for a particular purpose are disclaimed.
...
...
@@ -106,10 +106,10 @@ static void splitFirstNChannels(InputArrayOfArrays src, vector<XMat>& dst, int m
{
Size
sz
;
int
depth
,
totalCnNum
;
checkSameSizeAndDepth
(
src
,
sz
,
depth
);
totalCnNum
=
std
::
min
(
maxDstCn
,
getTotalNumberOfChannels
(
src
));
dst
.
resize
(
totalCnNum
);
vector
<
int
>
fromTo
(
2
*
totalCnNum
);
for
(
int
i
=
0
;
i
<
totalCnNum
;
i
++
)
...
...
@@ -127,7 +127,7 @@ static void splitFirstNChannels(InputArrayOfArrays src, vector<XMat>& dst, int m
class
GuidedFilterImpl
:
public
GuidedFilter
{
public
:
static
Ptr
<
GuidedFilterImpl
>
create
(
InputArray
guide
,
int
radius
,
double
eps
);
void
filter
(
InputArray
src
,
OutputArray
dst
,
int
dDepth
=
-
1
);
...
...
@@ -148,7 +148,7 @@ protected:
protected
:
GuidedFilterImpl
()
{}
void
init
(
InputArray
guide
,
int
radius
,
double
eps
);
void
computeCovGuide
(
SymArray2D
<
Mat
>&
covars
);
...
...
@@ -168,7 +168,7 @@ protected:
}
private
:
/*Routines to parallelize boxFilter and convertTo*/
typedef
void
(
GuidedFilterImpl
::*
TransformFunc
)(
Mat
&
src
,
Mat
&
dst
);
struct
GFTransform_ParBody
:
public
ParallelLoopBody
...
...
@@ -357,7 +357,7 @@ void GuidedFilterImpl::ComputeCovGuideFromChannelsMul_ParBody::operator()(const
}
}
GuidedFilterImpl
::
ComputeCovGuideInv_ParBody
::
ComputeCovGuideInv_ParBody
(
GuidedFilterImpl
&
gf_
,
SymArray2D
<
Mat
>&
covars_
)
GuidedFilterImpl
::
ComputeCovGuideInv_ParBody
::
ComputeCovGuideInv_ParBody
(
GuidedFilterImpl
&
gf_
,
SymArray2D
<
Mat
>&
covars_
)
:
gf
(
gf_
),
covars
(
covars_
)
{
gf
.
covarsInv
.
create
(
gf
.
gCnNum
);
...
...
@@ -415,8 +415,8 @@ void GuidedFilterImpl::ComputeCovGuideInv_ParBody::operator()(const Range& range
for
(
int
k
=
0
;
k
<
3
;
k
++
)
{
register
float
*
a
=
covars
(
k
,
0
).
ptr
<
float
>
(
i
);
register
float
*
ac
=
gf
.
covarsInv
(
k
,
0
).
ptr
<
float
>
(
i
);
float
*
a
=
covars
(
k
,
0
).
ptr
<
float
>
(
i
);
float
*
ac
=
gf
.
covarsInv
(
k
,
0
).
ptr
<
float
>
(
i
);
if
(
k
==
0
)
mul
(
det
,
a
,
ac
,
gf
.
w
);
...
...
@@ -503,7 +503,7 @@ void GuidedFilterImpl::ComputeCovFromSrcChannelsMul_ParBody::operator()(const Ra
int
start
=
(
si
%
2
)
?
0
:
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
)
{
...
...
@@ -658,7 +658,7 @@ void GuidedFilterImpl::getWalkPattern(int eid, int &cn1, int &cn2)
0
,
0
,
1
,
-
1
,
-
1
,
-
1
,
0
,
1
,
1
,
-
1
,
-
1
,
-
1
,
0
,
0
,
0
,
2
,
1
,
1
,
0
,
0
,
0
,
2
,
1
,
1
,
0
,
1
,
2
,
2
,
2
,
1
,
};
...
...
@@ -689,7 +689,7 @@ void GuidedFilterImpl::init(InputArray guide, int radius_, double eps_)
guideCnMean
.
resize
(
gCnNum
);
parConvertToWorkType
(
guideCn
,
guideCn
);
parMeanFilter
(
guideCn
,
guideCnMean
);
SymArray2D
<
Mat
>
covars
;
computeCovGuide
(
covars
);
runParBody
(
ComputeCovGuideInv_ParBody
(
*
this
,
covars
));
...
...
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