matlab - How to find normals to an edge in an image -
i doing work related eye images. did edge detection it. edge curve , not continuous. have assume continuous , find normals curve. how find normals using matlab?
you can see image below.
i want find normals upper curve. hope clear enough.
even though seems unintuitive, edge direction @ every pixel pretty estimate of normal. simplest solution, because doesn't involve curve fitting.
in matlab, can find pixel-wise edge directions using sobel filter:
[bw,thresh,gv,gh] = edge(i,'sobel'); edgedir = atan2(gv, gh);
this gives edge directions angles in radians.
Comments
Post a Comment