Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
2eeaf11f
Commit
2eeaf11f
authored
Dec 30, 2011
by
Davis King
Browse files
Fixed improper normalization in the gaussian() functions. The
normalization constant was being computed incorrectly.
parent
30e073d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
dlib/image_keypoint/surf.h
dlib/image_keypoint/surf.h
+2
-2
dlib/image_transforms/spatial_filtering.h
dlib/image_transforms/spatial_filtering.h
+2
-2
No files found.
dlib/image_keypoint/surf.h
View file @
2eeaf11f
...
@@ -66,8 +66,8 @@ namespace dlib
...
@@ -66,8 +66,8 @@ namespace dlib
<<
"
\n\t
sig must be bigger than 0"
<<
"
\n\t
sig must be bigger than 0"
<<
"
\n\t
sig: "
<<
sig
<<
"
\n\t
sig: "
<<
sig
);
);
const
double
pi
=
3.1415926535898
;
const
double
sqrt_2_pi
=
2.5066282746310002416123552393401041626930
;
return
1.0
/
(
sig
*
s
ig
*
2
*
pi
)
*
std
::
exp
(
-
(
x
*
x
+
y
*
y
)
/
(
2
*
sig
*
sig
));
return
1.0
/
(
sig
*
s
qrt_2_
pi
)
*
std
::
exp
(
-
(
x
*
x
+
y
*
y
)
/
(
2
*
sig
*
sig
));
}
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
...
dlib/image_transforms/spatial_filtering.h
View file @
2eeaf11f
...
@@ -358,8 +358,8 @@ namespace dlib
...
@@ -358,8 +358,8 @@ namespace dlib
<<
"
\n\t
sigma must be bigger than 0"
<<
"
\n\t
sigma must be bigger than 0"
<<
"
\n\t
sigma: "
<<
sigma
<<
"
\n\t
sigma: "
<<
sigma
);
);
const
double
pi
=
3.1415926535898
;
const
double
sqrt_2_pi
=
2.5066282746310002416123552393401041626930
;
return
1.0
/
(
sigma
*
s
igma
*
2
*
pi
)
*
std
::
exp
(
-
(
x
*
x
)
/
(
2
*
sigma
*
sigma
));
return
1.0
/
(
sigma
*
s
qrt_2_
pi
)
*
std
::
exp
(
-
(
x
*
x
)
/
(
2
*
sigma
*
sigma
));
}
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
...
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