On 26 Feb 2014 23:25, "Neil Isaacs" <bluewap2@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