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
49e6002d
Commit
49e6002d
authored
Jun 22, 2018
by
Davis King
Browse files
Fixed hough_transform::find_pixels_voting_for_lines(). It would sometimes
include a pixel multiple times in the output lists.
parent
d0fc6023
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
dlib/image_transforms/hough_transform.h
dlib/image_transforms/hough_transform.h
+5
-1
dlib/image_transforms/hough_transform_abstract.h
dlib/image_transforms/hough_transform_abstract.h
+3
-3
No files found.
dlib/image_transforms/hough_transform.h
View file @
49e6002d
...
...
@@ -365,7 +365,11 @@ namespace dlib
{
auto
idx
=
hmap
(
hough_point
.
y
(),
hough_point
.
x
());
if
(
idx
<
constituent_points
.
size
())
constituent_points
[
idx
].
push_back
(
img_point
);
{
// don't add img_point if it's already in the list.
if
(
constituent_points
[
idx
].
size
()
==
0
||
constituent_points
[
idx
].
back
()
!=
img_point
)
constituent_points
[
idx
].
push_back
(
img_point
);
}
};
perform_generic_hough_transform
(
img
,
box
,
record_hit
);
...
...
dlib/image_transforms/hough_transform_abstract.h
View file @
49e6002d
...
...
@@ -240,9 +240,9 @@ namespace dlib
that if angle_window_size or radius_window_size are made so large
that HP[i] overlaps HP[j] for i!=j then the overlapping regions
of Hough space are assigned to HP[i] or HP[j] arbitrarily.
Th
erefore, all points in CONSTITUENT_POINTS are unique, that is,
there is no overlap in points between any two elements of
CONSTITUENT_POINTS
.
Th
at is, we treat HP[i] and HP[j] as disjoint even if their boxes
overlap. In this case, the overlapping region is assigned to
either HP[i] or HP[j] in an arbitrary manner
.
!*/
template
<
...
...
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