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
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
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.
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
My purpose is to generate edge and angle map and use them as
input for r.houghtransform.
The workflow works well for detecting linear valley features
form DEM. I notice that r.houghtransform works better when we
use the angle map and set the appropriate angle_width parameter
as shown below.
I was trying to find a way to generate angle map for a thinned
"line element" image and use the "line element" image and angle
map to extract lines using r.houghtransform.
Thanks for pointing to v.to.db with azimuth option, I will try to figure
out if it can be use to generate an angle map.
Best,
Venka
On 7/25/2023 10:11 AM, Vaclav Petras wrote:
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.osgeo@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