Hi Venka,

i.edge, or Canny Edge Detector, is definitely built for something else.
Lines are output, not input. However, we created i.edge together with
r.houghtransform which works on the result from i.edge or any other thin
lines. The line segments it extracts might be what you are looking for.
Maybe you are just looking for r.to.vect followed by v.to.db with azimuth,
maybe with v.split in between.

Best,
Vaclav

On Mon, 24 Jul 2023 at 06:18, Venka <venka.os...@gmail.com> wrote:

> Hi Micha,
>
> Thanks for your response.
>
> Is there any other way to generate edge_map and angle_map
> from single pixel width areas?
>
> Venka
>
> On 7/24/2023 6:23 PM, Micha Silver wrote:
> > AFAIK, the Canny algorithm requires large, wide areas of black pixels,
> adjacent
> > to large wide areas of white pixels in order to find the edge. It
> compares the
> > change in value over a wide "strip" to determine the edge.
> >
> > It's a bit counter-intuitive, but the algorithm will not work on single
> pixel
> > width areas.
> >
> >
> > On 24/07/2023 6:28, Venka wrote:
> >> Hi All,
> >>
> >> I have a question about Canny Edge Detection using i.edge
> >>
> >> 1) I produce a thinned binary image as below
> >>
> >> r.thin --overwrite input=line_element output=thinned_line_element
> >>
> >> a) the "line_element" represents valleys that are, at places, few pixel
> >> wide
> >>
> >> b) the output "thinned_line_element" represents valley lines that are
> >> a single pixel wide
> >>
> >> 2) I run the Canny edge detector on "thinned_line_element" as below
> >> i.edge --overwrite input=thin_line_element output=edge_map
> angles_map=angle_map
> >>
> >>
> >> The resultant "edge_map" produces a monotone (no edges) edge map and
> the
> >> "angle_map" outputs the angles
> >> correctly
> >>
> >> 3) Running the Canny edge detector on the un-thinned "line_element"
> >>
> >> i.edge --overwrite input=line_element@PERMANENT output=edge_map1
> >> angles_map=angle_map1
> >>
> >> produces both "edge_map1" and "angles_map1" correctly.
> >>
> >> Any idea why the Canny edge detector does not produce edge map on
> thinned image?
> >>
> >> Kind regards,
> >>
> >> Venka
> >> _______________________________________________
> >> grass-user mailing list
> >> grass-user@lists.osgeo.org
> >> https://lists.osgeo.org/mailman/listinfo/grass-user
> >
> > --
> > Micha Silver
> > Ben Gurion Univ.
> > Sde Boker, Remote Sensing Lab
> > cell: +972-523-665918
> >
>
> _______________________________________________
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
>
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to