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
57be99ff
Commit
57be99ff
authored
Oct 07, 2016
by
Graham Fyffe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added getLeadingEdges function to subdivision2d
parent
dd379ec9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
imgproc.hpp
modules/imgproc/include/opencv2/imgproc.hpp
+8
-0
subdivision2d.cpp
modules/imgproc/src/subdivision2d.cpp
+20
-0
No files found.
modules/imgproc/include/opencv2/imgproc.hpp
View file @
57be99ff
...
...
@@ -1012,6 +1012,14 @@ public:
*/
CV_WRAP
void
getEdgeList
(
CV_OUT
std
::
vector
<
Vec4f
>&
edgeList
)
const
;
/** @brief Returns a list of the leading edge ID connected to each triangle.
@param leadingEdgeList – Output vector.
The function gives one edge ID for each triangle.
*/
CV_WRAP
void
getLeadingEdgeList
(
CV_OUT
std
::
vector
<
int
>&
leadingEdgeList
)
const
;
/** @brief Returns a list of all triangles.
@param triangleList – Output vector.
...
...
modules/imgproc/src/subdivision2d.cpp
View file @
57be99ff
...
...
@@ -733,6 +733,26 @@ void Subdiv2D::getEdgeList(std::vector<Vec4f>& edgeList) const
}
}
void
Subdiv2D
::
getLeadingEdgeList
(
std
::
vector
<
int
>&
leadingEdgeList
)
const
{
leadingEdgeList
.
clear
();
int
i
,
total
=
(
int
)(
qedges
.
size
()
*
4
);
std
::
vector
<
bool
>
edgemask
(
total
,
false
);
for
(
i
=
4
;
i
<
total
;
i
+=
2
)
{
if
(
edgemask
[
i
]
)
continue
;
int
edge
=
i
;
edgemask
[
edge
]
=
true
;
edge
=
getEdge
(
edge
,
NEXT_AROUND_LEFT
);
edgemask
[
edge
]
=
true
;
edge
=
getEdge
(
edge
,
NEXT_AROUND_LEFT
);
edgemask
[
edge
]
=
true
;
leadingEdgeList
.
push_back
(
i
);
}
}
void
Subdiv2D
::
getTriangleList
(
std
::
vector
<
Vec6f
>&
triangleList
)
const
{
triangleList
.
clear
();
...
...
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