Line structuring element

Stéfan van der Walt stefan at sun.ac.za
Wed Feb 26 17:14:16 EST 2014


On 26 Feb 2014 23:25, "Neil Isaacs" <bluewap2 at gmail.com> wrote:
>
> I want to get back an array that I can pass to a filter or morphology
function as a structuring element. Similar to morphology.square or
morphology.disk. For a horizontal line the selem would be something like [1
1 1 1 1] and I could use eye to generate a selem at 45 deg angle but I was
looking for an existing function that might return an array of ones at
arbitrary angles. Looks like draw.line just returns pixel coords.

You can index into an empty structuring element with those coordinates and
set them to one.

Regards
Stéfan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20140227/84dc31e5/attachment.html>


More information about the scikit-image mailing list