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
d0fc6023
Commit
d0fc6023
authored
Jun 22, 2018
by
Davis King
Browse files
Updated count_points_on_side_of_line() python binding.
parent
0c652dd4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
tools/python/src/line.cpp
tools/python/src/line.cpp
+18
-6
No files found.
tools/python/src/line.cpp
View file @
d0fc6023
...
...
@@ -132,15 +132,27 @@ is perpendicular to the line.";
!*/
);
m
.
def
(
"count_points_on_side_of_line"
,
&
count_points_on_side_of_line
<
long
>
,
py
::
arg
(
"l"
),
py
::
arg
(
"reference_point"
),
py
::
arg
(
"pts"
),
py
::
arg
(
"dist_thresh"
));
m
.
def
(
"count_points_on_side_of_line"
,
&
count_points_on_side_of_line
<
double
>
,
py
::
arg
(
"l"
),
py
::
arg
(
"reference_point"
),
py
::
arg
(
"pts"
),
py
::
arg
(
"dist_thresh"
),
m
.
def
(
"count_points_on_side_of_line"
,
&
count_points_on_side_of_line
<
long
>
,
py
::
arg
(
"l"
),
py
::
arg
(
"reference_point"
),
py
::
arg
(
"pts"
),
py
::
arg
(
"dist_thresh_min"
)
=
0
,
py
::
arg
(
"dist_thresh_max"
)
=
std
::
numeric_limits
<
double
>::
infinity
());
m
.
def
(
"count_points_on_side_of_line"
,
&
count_points_on_side_of_line
<
double
>
,
py
::
arg
(
"l"
),
py
::
arg
(
"reference_point"
),
py
::
arg
(
"pts"
),
py
::
arg
(
"dist_thresh_min"
)
=
0
,
py
::
arg
(
"dist_thresh_max"
)
=
std
::
numeric_limits
<
double
>::
infinity
(),
"ensures
\n
\
- Returns a count of how many points in pts are on the same side of l as
\n
\
reference_point, but also no more than dist_thresh distance from the line."
- Returns a count of how many points in pts have a distance from the line l
\n
\
that is in the range [dist_thresh_min, dist_thresh_max]. This distance is a
\n
\
signed value that indicates how far a point is from the line. Moreover, if
\n
\
the point is on the same side as reference_point then the distance is
\n
\
positive, otherwise it is negative. So for example, If this range is [0,
\n
\
infinity] then this function counts how many points are on the same side of l
\n
\
as reference_point."
/*!
ensures
- Returns a count of how many points in pts are on the same side of l as
reference_point, but also no more than dist_thresh distance from the line.
- Returns a count of how many points in pts have a distance from the line l
that is in the range [dist_thresh_min, dist_thresh_max]. This distance is a
signed value that indicates how far a point is from the line. Moreover, if
the point is on the same side as reference_point then the distance is
positive, otherwise it is negative. So for example, If this range is [0,
infinity] then this function counts how many points are on the same side of l
as reference_point.
!*/
);
...
...
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