
I would like to create linear structuring element but at different angles, are there any functions in scikit that will readily achieve this? Thanks for any assistance.

If I understand correctly, you want to draw line segments with different slope. How about generating start and end points with length*sin(angle), length*cos(angle) and using `skimage.draw.line*`? On Feb 26, 2014, at 2:43 PM, Neil Isaacs <bluewap2@gmail.com> wrote:
I would like to create linear structuring element but at different angles, are there any functions in scikit that will readily achieve this? Thanks for any assistance.
-- You received this message because you are subscribed to the Google Groups "scikit-image" group. To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.

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. On Wednesday, February 26, 2014 1:09:29 PM UTC-7, Johannes Schönberger wrote:
If I understand correctly, you want to draw line segments with different slope.
How about generating start and end points with length*sin(angle), length*cos(angle) and using `skimage.draw.line*`?
On Feb 26, 2014, at 2:43 PM, Neil Isaacs <blue...@gmail.com <javascript:>> wrote:
I would like to create linear structuring element but at different angles, are there any functions in scikit that will readily achieve this? Thanks for any assistance.
-- You received this message because you are subscribed to the Google Groups "scikit-image" group. To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image...@googlegroups.com <javascript:>. For more options, visit https://groups.google.com/groups/opt_out.

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
participants (3)
-
Johannes Schönberger
-
Neil Isaacs
-
Stéfan van der Walt