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
e8c03fc1
Commit
e8c03fc1
authored
Nov 22, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ximgproc: rename global functions with generic names
parent
f94610a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
fourier_descriptors.hpp
...ximgproc/include/opencv2/ximgproc/fourier_descriptors.hpp
+4
-4
fourier_descriptors_demo.cpp
modules/ximgproc/samples/fourier_descriptors_demo.cpp
+2
-2
fourier_descriptors.cpp
modules/ximgproc/src/fourier_descriptors.cpp
+2
-2
No files found.
modules/ximgproc/include/opencv2/ximgproc/fourier_descriptors.hpp
View file @
e8c03fc1
...
...
@@ -94,7 +94,7 @@ namespace ximgproc {
* @param fdContour true src are Fourier Descriptors. fdContour false src is a contour
*
*/
CV_EXPORTS_W
void
transform
(
InputArray
src
,
InputArray
t
,
OutputArray
dst
,
bool
fdContour
=
true
);
CV_EXPORTS_W
void
transform
FD
(
InputArray
src
,
InputArray
t
,
OutputArray
dst
,
bool
fdContour
=
true
);
/**
* @brief Contour sampling .
*
...
...
@@ -106,12 +106,12 @@ namespace ximgproc {
CV_EXPORTS_W
void
contourSampling
(
InputArray
src
,
OutputArray
out
,
int
nbElt
);
/**
* @brief create
* @brief create
ContourFitting algorithm object
*
* @param ctr number of Fourier descriptors equal to number of contour points after resampling.
* @param fd Contour defining second shape (Target).
*/
CV_EXPORTS_W
Ptr
<
ContourFitting
>
create
(
int
ctr
=
1024
,
int
fd
=
16
);
CV_EXPORTS_W
Ptr
<
ContourFitting
>
create
ContourFitting
(
int
ctr
=
1024
,
int
fd
=
16
);
//! @} ximgproc_fourier
}
...
...
modules/ximgproc/samples/fourier_descriptors_demo.cpp
View file @
e8c03fc1
...
...
@@ -62,7 +62,7 @@ int main(void)
{
Mat
r
=
getRotationMatrix2D
(
Point
(
p
.
xg
,
p
.
yg
),
p
.
angle
,
10.0
/
p
.
scale10
);
ctrNoisy
=
NoisyPolygon
(
ctrRef
,
static_cast
<
double
>
(
p
.
levelNoise
));
transform
(
ctrNoisy
,
ctrNoisyRotate
,
r
);
cv
::
transform
(
ctrNoisy
,
ctrNoisyRotate
,
r
);
ctrNoisyRotateShift
.
clear
();
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
ctrNoisy
.
size
());
i
++
)
ctrNoisyRotateShift
.
push_back
(
ctrNoisyRotate
[(
i
+
(
p
.
origin
*
ctrNoisy
.
size
())
/
100
)
%
ctrNoisy
.
size
()]);
...
...
@@ -112,7 +112,7 @@ int main(void)
cout
<<
"Angle = "
<<
t
.
at
<
double
>
(
0
,
1
)
*
180
/
M_PI
<<
" expected "
<<
p
.
angle
<<
"
\n
"
;
cout
<<
"Scale = "
<<
t
.
at
<
double
>
(
0
,
2
)
<<
" expected "
<<
p
.
scale10
/
10.0
<<
"
\n
"
;
Mat
dst
;
ximgproc
::
transform
(
ctrRot2d
,
t
,
dst
,
false
);
ximgproc
::
transform
FD
(
ctrRot2d
,
t
,
dst
,
false
);
c
.
push_back
(
dst
);
drawContours
(
img
,
c
,
2
,
Scalar
(
0
,
255
,
255
));
circle
(
img
,
c
[
2
][
0
],
5
,
Scalar
(
0
,
255
,
255
));
...
...
modules/ximgproc/src/fourier_descriptors.cpp
View file @
e8c03fc1
...
...
@@ -281,7 +281,7 @@ void contourSampling(InputArray _src, OutputArray _out, int nbElt)
r
.
copyTo
(
_out
);
}
void
transform
(
InputArray
_src
,
InputArray
_t
,
OutputArray
_dst
,
bool
fdContour
)
void
transform
FD
(
InputArray
_src
,
InputArray
_t
,
OutputArray
_dst
,
bool
fdContour
)
{
if
(
!
fdContour
)
CV_Assert
(
_src
.
kind
()
==
_InputArray
::
STD_VECTOR
);
...
...
@@ -325,7 +325,7 @@ void transform(InputArray _src, InputArray _t,OutputArray _dst, bool fdContour)
Mat
(
z
).
copyTo
(
_dst
);
}
cv
::
Ptr
<
ContourFitting
>
create
(
int
ctr
,
int
fd
)
cv
::
Ptr
<
ContourFitting
>
create
ContourFitting
(
int
ctr
,
int
fd
)
{
return
makePtr
<
ContourFitting
>
(
ctr
,
fd
);
}
...
...
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