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
610e29fa
Commit
610e29fa
authored
Jun 07, 2013
by
berak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restored utility.hpp
parent
50e27ffc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
11 deletions
+3
-11
utility.hpp
modules/core/include/opencv2/core/utility.hpp
+1
-1
moments.cpp
modules/imgproc/src/moments.cpp
+2
-10
No files found.
modules/core/include/opencv2/core/utility.hpp
View file @
610e29fa
...
...
@@ -48,8 +48,8 @@
# error utility.hpp header must be compiled as C++
#endif
#include<limits>
#include "opencv2/core.hpp"
namespace
cv
{
...
...
modules/imgproc/src/moments.cpp
View file @
610e29fa
...
...
@@ -48,12 +48,12 @@ static void completeMomentState( Moments* moments )
{
double
cx
=
0
,
cy
=
0
;
double
mu20
,
mu11
,
mu02
;
double
inv_m00
=
0.0
;
assert
(
moments
!=
0
);
if
(
fabs
(
moments
->
m00
)
>
DBL_EPSILON
)
{
inv_m00
=
1.
/
moments
->
m00
;
double
inv_m00
=
1.
/
moments
->
m00
;
cx
=
moments
->
m10
*
inv_m00
;
cy
=
moments
->
m01
*
inv_m00
;
}
...
...
@@ -78,14 +78,6 @@ static void completeMomentState( Moments* moments )
moments
->
mu12
=
moments
->
m12
-
cy
*
(
mu11
+
cy
*
moments
->
m10
)
-
cx
*
mu02
;
// mu03 = m03 - cy*(3*mu02 + cy*m01)
moments
->
mu03
=
moments
->
m03
-
cy
*
(
3
*
mu02
+
cy
*
moments
->
m01
);
double
inv_sqrt_m00
=
std
::
sqrt
(
std
::
abs
(
inv_m00
));
double
s2
=
inv_m00
*
inv_m00
,
s3
=
s2
*
inv_sqrt_m00
;
moments
->
nu20
=
moments
->
mu20
*
s2
;
moments
->
nu11
=
moments
->
mu11
*
s2
;
moments
->
nu02
=
moments
->
mu02
*
s2
;
moments
->
nu30
=
moments
->
mu30
*
s3
;
moments
->
nu21
=
moments
->
mu21
*
s3
;
moments
->
nu12
=
moments
->
mu12
*
s3
;
moments
->
nu03
=
moments
->
mu03
*
s3
;
}
...
...
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