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