Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
c68cbfce
Commit
c68cbfce
authored
Apr 28, 2014
by
Ievgen Khvedchenia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix size_t to int conversion
parent
0e3bbd70
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
14 deletions
+9
-14
nldiffusion_functions.cpp
modules/features2d/src/akaze/nldiffusion_functions.cpp
+4
-7
nldiffusion_functions.h
modules/features2d/src/akaze/nldiffusion_functions.h
+2
-4
nldiffusion_functions.cpp
modules/features2d/src/kaze/nldiffusion_functions.cpp
+3
-3
No files found.
modules/features2d/src/akaze/nldiffusion_functions.cpp
View file @
c68cbfce
...
...
@@ -69,8 +69,7 @@ void gaussian_2D_convolution(const cv::Mat& src, cv::Mat& dst, const size_t& ksi
* A Scheme for Coherence-Enhancing Diffusion Filtering with Optimized Rotation Invariance,
* Journal of Visual Communication and Image Representation 2002
*/
void
image_derivatives_scharr
(
const
cv
::
Mat
&
src
,
cv
::
Mat
&
dst
,
const
size_t
&
xorder
,
const
size_t
&
yorder
)
{
void
image_derivatives_scharr
(
const
cv
::
Mat
&
src
,
cv
::
Mat
&
dst
,
int
xorder
,
int
yorder
)
{
Scharr
(
src
,
dst
,
CV_32F
,
xorder
,
yorder
,
1.0
,
0
,
BORDER_DEFAULT
);
}
...
...
@@ -233,8 +232,7 @@ float compute_k_percentile(const cv::Mat& img, float perc, float gscale,
* @param yorder Derivative order in Y-direction (vertical)
* @param scale Scale factor for the derivative size
*/
void
compute_scharr_derivatives
(
const
cv
::
Mat
&
src
,
cv
::
Mat
&
dst
,
const
size_t
&
xorder
,
const
size_t
&
yorder
,
const
size_t
&
scale
)
{
void
compute_scharr_derivatives
(
const
cv
::
Mat
&
src
,
cv
::
Mat
&
dst
,
int
xorder
,
int
yorder
,
int
scale
)
{
Mat
kx
,
ky
;
compute_derivative_kernels
(
kx
,
ky
,
xorder
,
yorder
,
scale
);
...
...
@@ -344,10 +342,9 @@ void halfsample_image(const cv::Mat& src, cv::Mat& dst) {
* @param dy The derivative order in y-direction
* @param scale The kernel size
*/
void
compute_derivative_kernels
(
cv
::
OutputArray
kx_
,
cv
::
OutputArray
ky_
,
const
size_t
&
dx
,
const
size_t
&
dy
,
const
size_t
&
scale
)
{
void
compute_derivative_kernels
(
cv
::
OutputArray
kx_
,
cv
::
OutputArray
ky_
,
int
dx
,
int
dy
,
int
scale
)
{
const
int
ksize
=
3
+
2
*
(
(
int
)
scale
-
1
);
const
int
ksize
=
3
+
2
*
(
scale
-
1
);
// The usual Scharr kernel
if
(
scale
==
1
)
{
...
...
modules/features2d/src/akaze/nldiffusion_functions.h
View file @
c68cbfce
...
...
@@ -23,12 +23,10 @@ void weickert_diffusivity(const cv::Mat& Lx, const cv::Mat& Ly, cv::Mat& dst, co
void
charbonnier_diffusivity
(
const
cv
::
Mat
&
Lx
,
const
cv
::
Mat
&
Ly
,
cv
::
Mat
&
dst
,
const
float
&
k
);
float
compute_k_percentile
(
const
cv
::
Mat
&
img
,
float
perc
,
float
gscale
,
size_t
nbins
,
size_t
ksize_x
,
size_t
ksize_y
);
void
compute_scharr_derivatives
(
const
cv
::
Mat
&
src
,
cv
::
Mat
&
dst
,
const
size_t
&
xorder
,
const
size_t
&
yorder
,
const
size_t
&
scale
);
void
compute_scharr_derivatives
(
const
cv
::
Mat
&
src
,
cv
::
Mat
&
dst
,
int
xorder
,
int
,
int
scale
);
void
nld_step_scalar
(
cv
::
Mat
&
Ld
,
const
cv
::
Mat
&
c
,
cv
::
Mat
&
Lstep
,
const
float
&
stepsize
);
void
downsample_image
(
const
cv
::
Mat
&
src
,
cv
::
Mat
&
dst
);
void
halfsample_image
(
const
cv
::
Mat
&
src
,
cv
::
Mat
&
dst
);
void
compute_derivative_kernels
(
cv
::
OutputArray
kx_
,
cv
::
OutputArray
ky_
,
const
size_t
&
dx
,
const
size_t
&
dy
,
const
size_t
&
scale
);
void
compute_derivative_kernels
(
cv
::
OutputArray
kx_
,
cv
::
OutputArray
ky_
,
int
dx
,
int
dy
,
int
scale
);
bool
check_maximum_neighbourhood
(
const
cv
::
Mat
&
img
,
int
dsize
,
float
value
,
int
row
,
int
col
,
bool
same_img
);
modules/features2d/src/kaze/nldiffusion_functions.cpp
View file @
c68cbfce
...
...
@@ -43,11 +43,11 @@ using namespace cv;
void
gaussian_2D_convolution
(
const
cv
::
Mat
&
src
,
cv
::
Mat
&
dst
,
int
ksize_x
,
int
ksize_y
,
float
sigma
)
{
size_
t
ksize_x_
=
0
,
ksize_y_
=
0
;
in
t
ksize_x_
=
0
,
ksize_y_
=
0
;
// Compute an appropriate kernel size according to the specified sigma
if
(
sigma
>
ksize_x
||
sigma
>
ksize_y
||
ksize_x
==
0
||
ksize_y
==
0
)
{
ksize_x_
=
(
size_
t
)
ceil
(
2.0
f
*
(
1.0
f
+
(
sigma
-
0.8
f
)
/
(
0.3
f
)));
ksize_x_
=
(
in
t
)
ceil
(
2.0
f
*
(
1.0
f
+
(
sigma
-
0.8
f
)
/
(
0.3
f
)));
ksize_y_
=
ksize_x_
;
}
...
...
@@ -196,7 +196,7 @@ float compute_k_percentile(const cv::Mat& img, float perc, float gscale,
}
if
(
nelements
<
nthreshold
)
{
kperc
=
0.03
;
kperc
=
0.03
f
;
}
else
{
kperc
=
hmax
*
((
float
)(
k
)
/
(
float
)
nbins
);
...
...
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