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
54a4ff03
Commit
54a4ff03
authored
Mar 26, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #1711
parent
3517be75
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
+12
-14
logpolar_bsm.cpp
modules/contrib/src/logpolar_bsm.cpp
+12
-12
core.hpp
modules/core/include/opencv2/core/core.hpp
+0
-2
No files found.
modules/contrib/src/logpolar_bsm.cpp
View file @
54a4ff03
...
...
@@ -99,7 +99,7 @@ LogPolar_Interp::LogPolar_Interp(int w, int h, Point2i center, int R, double ro0
int
jc
=
M
/
2
-
1
,
ic
=
N
/
2
-
1
;
int
romax
=
min
(
ic
,
jc
);
double
a
=
exp
(
log
((
double
)(
romax
/
2
-
1
)
/
(
double
)
ro0
)
/
(
double
)
R
);
S
=
(
int
)
floor
(
2
*
M
_PI
/
(
a
-
1
)
+
0.5
);
S
=
(
int
)
floor
(
2
*
CV
_PI
/
(
a
-
1
)
+
0.5
);
}
this
->
interp
=
interp
;
...
...
@@ -118,7 +118,7 @@ void LogPolar_Interp::create_map(int M, int N, int R, int S, double ro0)
int
jc
=
N
/
2
-
1
,
ic
=
M
/
2
-
1
;
romax
=
min
(
ic
,
jc
);
a
=
exp
(
log
((
double
)
romax
/
(
double
)
ro0
)
/
(
double
)
R
);
q
=
((
double
)
S
)
/
(
2
*
M
_PI
);
q
=
((
double
)
S
)
/
(
2
*
CV
_PI
);
Rsri
=
Mat
::
zeros
(
S
,
R
,
CV_32FC1
);
Csri
=
Mat
::
zeros
(
S
,
R
,
CV_32FC1
);
...
...
@@ -142,10 +142,10 @@ void LogPolar_Interp::create_map(int M, int N, int R, int S, double ro0)
if
(
i
>=
ic
)
theta
=
atan
((
double
)(
j
-
jc
)
/
(
double
)(
i
-
ic
));
else
theta
=
atan
((
double
)(
j
-
jc
)
/
(
double
)(
i
-
ic
))
+
M
_PI
;
theta
=
atan
((
double
)(
j
-
jc
)
/
(
double
)(
i
-
ic
))
+
CV
_PI
;
if
(
theta
<
0
)
theta
+=
2
*
M
_PI
;
theta
+=
2
*
CV
_PI
;
ETAyx
.
at
<
float
>
(
j
,
i
)
=
(
float
)(
q
*
theta
);
...
...
@@ -246,7 +246,7 @@ LogPolar_Overlapping::LogPolar_Overlapping(int w, int h, Point2i center, int R,
int
jc
=
M
/
2
-
1
,
ic
=
N
/
2
-
1
;
int
romax
=
min
(
ic
,
jc
);
double
a
=
exp
(
log
((
double
)(
romax
/
2
-
1
)
/
(
double
)
ro0
)
/
(
double
)
R
);
S
=
(
int
)
floor
(
2
*
M
_PI
/
(
a
-
1
)
+
0.5
);
S
=
(
int
)
floor
(
2
*
CV
_PI
/
(
a
-
1
)
+
0.5
);
}
create_map
(
M
,
N
,
R
,
S
,
ro0
);
...
...
@@ -263,7 +263,7 @@ void LogPolar_Overlapping::create_map(int M, int N, int R, int S, double ro0)
int
jc
=
N
/
2
-
1
,
ic
=
M
/
2
-
1
;
romax
=
min
(
ic
,
jc
);
a
=
exp
(
log
((
double
)
romax
/
(
double
)
ro0
)
/
(
double
)
R
);
q
=
((
double
)
S
)
/
(
2
*
M
_PI
);
q
=
((
double
)
S
)
/
(
2
*
CV
_PI
);
ind1
=
0
;
Rsri
=
Mat
::
zeros
(
S
,
R
,
CV_32FC1
);
...
...
@@ -306,10 +306,10 @@ void LogPolar_Overlapping::create_map(int M, int N, int R, int S, double ro0)
if
(
i
>=
ic
)
theta
=
atan
((
double
)(
j
-
jc
)
/
(
double
)(
i
-
ic
));
else
theta
=
atan
((
double
)(
j
-
jc
)
/
(
double
)(
i
-
ic
))
+
M
_PI
;
theta
=
atan
((
double
)(
j
-
jc
)
/
(
double
)(
i
-
ic
))
+
CV
_PI
;
if
(
theta
<
0
)
theta
+=
2
*
M
_PI
;
theta
+=
2
*
CV
_PI
;
ETAyx
.
at
<
float
>
(
j
,
i
)
=
(
float
)(
q
*
theta
);
...
...
@@ -470,7 +470,7 @@ LogPolar_Adjacent::LogPolar_Adjacent(int w, int h, Point2i center, int R, double
int
jc
=
M
/
2
-
1
,
ic
=
N
/
2
-
1
;
int
romax
=
min
(
ic
,
jc
);
double
a
=
exp
(
log
((
double
)(
romax
/
2
-
1
)
/
(
double
)
ro0
)
/
(
double
)
R
);
S
=
(
int
)
floor
(
2
*
M
_PI
/
(
a
-
1
)
+
0.5
);
S
=
(
int
)
floor
(
2
*
CV
_PI
/
(
a
-
1
)
+
0.5
);
}
create_map
(
M
,
N
,
R
,
S
,
ro0
,
smin
);
...
...
@@ -487,7 +487,7 @@ void LogPolar_Adjacent::create_map(int M, int N, int R, int S, double ro0, doubl
romax
=
min
(
M
/
2.0
,
N
/
2.0
);
a
=
exp
(
log
(
romax
/
ro0
)
/
(
double
)
R
);
q
=
S
/
(
2
*
M
_PI
);
q
=
S
/
(
2
*
CV
_PI
);
A
.
resize
(
R
*
S
);
L
.
resize
(
M
*
N
);
...
...
@@ -625,7 +625,7 @@ bool LogPolar_Adjacent::get_uv(double x, double y, int&u, int&v)
if
(
x
>
0
)
theta
=
atan
(
y
/
x
);
else
theta
=
atan
(
y
/
x
)
+
M
_PI
;
theta
=
atan
(
y
/
x
)
+
CV
_PI
;
if
(
ro
<
ro0
||
ro
>
romax
)
{
...
...
@@ -639,7 +639,7 @@ bool LogPolar_Adjacent::get_uv(double x, double y, int&u, int&v)
if
(
theta
>=
0
)
v
=
(
int
)
floor
(
q
*
theta
);
else
v
=
(
int
)
floor
(
q
*
(
theta
+
2
*
M
_PI
));
v
=
(
int
)
floor
(
q
*
(
theta
+
2
*
CV
_PI
));
return
true
;
}
}
...
...
modules/core/include/opencv2/core/core.hpp
View file @
54a4ff03
...
...
@@ -46,8 +46,6 @@
#ifndef __OPENCV_CORE_HPP__
#define __OPENCV_CORE_HPP__
#define _USE_MATH_DEFINES
#include "opencv2/core/types_c.h"
#include "opencv2/core/version.hpp"
...
...
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