[SciPy-Dev] [ANN] Release of scikit-spatial package

Andrew Hynes andrewjhynes at gmail.com
Mon Apr 8 19:09:15 EDT 2019


Hi Stéfan,

> This looks neat!  It reminds me a bit of the following book which I
> enjoyed:
>
> http://www.geometricalgebra.net/
>

Thanks for the link - it looks like a good source for expanding the package.

Can you tell us a bit more about how you see these functions typically
> being applied in practice?
>
Sure, I can give an example from my masters project. It involved clinical
gait analysis with a depth camera, so I used some of these functions to
calculate gait parameters from positions in space.

A basic walking stride consists of three positions: The initial swing foot,
the stance foot, and the final swing foot. The stride length is the
distance from the initial to final swing foot. The stride width is the
length of the projection from the stance foot to the swing path (the line
from the initial swing foot to the final).

Here's a snippet of code using scikit-spatial to calculate gait parameters
from three points: point_a_i (initial swing foot), point_b (stance foot),
and point_a_f (final swing foot).

from skspatial.objects import Vector, Line

vector_a = Vector.from_points(point_a_i, point_a_f)
line_a = Line(point=point_a_i, direction=vector_a)

point_b_proj = line_a.project_point(point_b)

stride_length = vector_a.norm()
absolute_step_length = Vector.from_points(point_b, point_a_f).norm()
step_length = Vector.from_points(point_b_proj, point_a_f).norm()
stride_width = line_a.distance_point(point_b)


Hopefully that gives an idea as to how the package can be used.

Thanks,

Andrew

P. S. Great job on scikit-image!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20190408/01852b37/attachment.html>


More information about the SciPy-Dev mailing list