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
df56f27e
Commit
df56f27e
authored
Dec 22, 2015
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #483 from cbalint13:slic_lsc
parents
e8937cc0
e5612c3c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
lsc.cpp
modules/ximgproc/src/lsc.cpp
+3
-3
seeds.cpp
modules/ximgproc/src/seeds.cpp
+1
-1
slic.cpp
modules/ximgproc/src/slic.cpp
+3
-3
No files found.
modules/ximgproc/src/lsc.cpp
View file @
df56f27e
...
...
@@ -274,10 +274,10 @@ void SuperpixelLSCImpl::getLabelContourMask(OutputArray _mask, bool _thick_line)
if
(
!
_thick_line
)
line_width
=
1
;
_mask
.
create
(
m_height
,
m_width
,
CV_8
S
C1
);
_mask
.
create
(
m_height
,
m_width
,
CV_8
U
C1
);
Mat
mask
=
_mask
.
getMat
();
mask
.
setTo
(
1
);
mask
.
setTo
(
0
);
const
int
dx8
[
8
]
=
{
-
1
,
-
1
,
0
,
1
,
1
,
1
,
0
,
-
1
};
const
int
dy8
[
8
]
=
{
0
,
-
1
,
-
1
,
-
1
,
0
,
1
,
1
,
1
};
...
...
@@ -309,7 +309,7 @@ void SuperpixelLSCImpl::getLabelContourMask(OutputArray _mask, bool _thick_line)
}
if
(
np
>
line_width
)
{
mask
.
at
<
char
>
(
j
,
k
)
=
-
1
;
mask
.
at
<
char
>
(
j
,
k
)
=
(
uchar
)
255
;
istaken
[
mainindex
]
=
true
;
}
mainindex
++
;
...
...
modules/ximgproc/src/seeds.cpp
View file @
df56f27e
...
...
@@ -1214,7 +1214,7 @@ void SuperpixelSEEDSImpl::getLabelContourMask(OutputArray image, bool thick_line
}
}
if
(
neighbors
>
1
)
*
dst
.
ptr
<
uchar
>
(
j
,
k
)
=
(
uchar
)
-
1
;
*
dst
.
ptr
<
uchar
>
(
j
,
k
)
=
(
uchar
)
255
;
}
}
}
...
...
modules/ximgproc/src/slic.cpp
View file @
df56f27e
...
...
@@ -258,10 +258,10 @@ void SuperpixelSLICImpl::getLabelContourMask(OutputArray _mask, bool _thick_line
if
(
!
_thick_line
)
line_width
=
1
;
_mask
.
create
(
m_height
,
m_width
,
CV_8
S
C1
);
_mask
.
create
(
m_height
,
m_width
,
CV_8
U
C1
);
Mat
mask
=
_mask
.
getMat
();
mask
.
setTo
(
1
);
mask
.
setTo
(
0
);
const
int
dx8
[
8
]
=
{
-
1
,
-
1
,
0
,
1
,
1
,
1
,
0
,
-
1
};
const
int
dy8
[
8
]
=
{
0
,
-
1
,
-
1
,
-
1
,
0
,
1
,
1
,
1
};
...
...
@@ -293,7 +293,7 @@ void SuperpixelSLICImpl::getLabelContourMask(OutputArray _mask, bool _thick_line
}
if
(
np
>
line_width
)
{
mask
.
at
<
char
>
(
j
,
k
)
=
-
1
;
mask
.
at
<
char
>
(
j
,
k
)
=
(
uchar
)
255
;
istaken
[
mainindex
]
=
true
;
}
mainindex
++
;
...
...
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