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
a087db6b
Commit
a087db6b
authored
Mar 15, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1045 from sturkmen72:Update_thinning_cpp
parents
f1a198d1
9ca51fe7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
thinning.cpp
modules/ximgproc/samples/thinning.cpp
+3
-2
No files found.
modules/ximgproc/samples/thinning.cpp
View file @
a087db6b
...
...
@@ -11,6 +11,7 @@ using namespace cv;
int
main
()
{
Mat
img
=
imread
(
"opencv-logo.png"
,
IMREAD_COLOR
);
resize
(
img
,
img
,
Size
(),
0.5
,
0.5
);
/// Threshold the input image
Mat
img_grayscale
,
img_binary
;
...
...
@@ -19,8 +20,8 @@ int main()
/// Apply thinning to get a skeleton
Mat
img_thinning_ZS
,
img_thinning_GH
;
//ximgproc::thinning(img_binary, img_thinning_ZS,
THINNING_ZHANGSUEN);
//ximgproc::thinning(img_binary, img_thinning_GH,
THINNING_GUOHALL);
ximgproc
::
thinning
(
img_binary
,
img_thinning_ZS
,
ximgproc
::
THINNING_ZHANGSUEN
);
ximgproc
::
thinning
(
img_binary
,
img_thinning_GH
,
ximgproc
::
THINNING_GUOHALL
);
/// Make 3 channel images from thinning result
Mat
result_ZS
(
img
.
rows
,
img
.
cols
,
CV_8UC3
),
result_GH
(
img
.
rows
,
img
.
cols
,
CV_8UC3
);
...
...
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