Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
baaec4a5
Commit
baaec4a5
authored
May 20, 2018
by
Davis King
Browse files
Fixed label_connected_blobs_watershed() only working in C++14 and if all
parameters were given.
parent
e15fcbd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
dlib/image_transforms/label_connected_blobs.h
dlib/image_transforms/label_connected_blobs.h
+6
-3
No files found.
dlib/image_transforms/label_connected_blobs.h
View file @
baaec4a5
...
@@ -223,6 +223,9 @@ namespace dlib
...
@@ -223,6 +223,9 @@ namespace dlib
struct
watershed_points
struct
watershed_points
{
{
watershed_points
()
=
default
;
watershed_points
(
const
point
&
p_
,
float
score_
,
unsigned
int
label_
)
:
p
(
p_
),
score
(
score_
),
label
(
label_
)
{}
point
p
;
point
p
;
float
score
=
0
;
float
score
=
0
;
unsigned
int
label
=
std
::
numeric_limits
<
unsigned
int
>::
max
();
unsigned
int
label
=
std
::
numeric_limits
<
unsigned
int
>::
max
();
...
@@ -286,7 +289,7 @@ namespace dlib
...
@@ -286,7 +289,7 @@ namespace dlib
continue
;
continue
;
}
}
next
.
push
(
{
point
(
c
,
r
),
val
,
std
::
numeric_limits
<
unsigned
int
>::
max
()
}
);
next
.
push
(
watershed_points
(
point
(
c
,
r
),
val
,
std
::
numeric_limits
<
unsigned
int
>::
max
()
)
);
}
}
}
}
...
@@ -322,7 +325,7 @@ namespace dlib
...
@@ -322,7 +325,7 @@ namespace dlib
continue
;
continue
;
labels
[
n
.
y
()][
n
.
x
()]
=
label
;
labels
[
n
.
y
()][
n
.
x
()]
=
label
;
next
.
push
(
{
n
,
img2
[
n
.
y
()][
n
.
x
()],
label
}
);
next
.
push
(
watershed_points
(
n
,
img2
[
n
.
y
()][
n
.
x
()],
label
)
);
}
}
}
}
...
@@ -338,7 +341,7 @@ namespace dlib
...
@@ -338,7 +341,7 @@ namespace dlib
out_image_type
&
labels
out_image_type
&
labels
)
)
{
{
return
segment_image
_watershed
s
(
img
,
labels
,
partition_pixels
(
img
));
return
label_connected_blobs
_watershed
(
img
,
labels
,
partition_pixels
(
img
));
}
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
...
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