Canny Edge Detection - coordinates of edge points to subpixel accuracy

8 次查看(过去 30 天)
Hi,
I know I can get white pixels showing me edges in an image when using the edge function with the canny method and I am also aware that one can easily find the coordinates of those pixels.
But does anyone know how to get the exact coordinates of the edge "points". I don´t know how this function works exactly but I assume it fits a function of intensity normal to the edge and then finds a middle ground between the darkest and brightest pixel. And it does that for every row/column (depending on the orientation of the edge). For example for a horizon it will do this for every column to find the "crossover point".
Instead of matlab painting the pixel nearest to that coordinate white I would like to get the actual coordinate.
Any thoughts and ideas are most welcome!

回答(3 个)

Stefan
Stefan 2014-8-22
Does anyone have any ideas?

Image Analyst
Image Analyst 2014-8-22
Try bwboundaries(). Usually people upload an image when asking for image processing advice.

Stefan
Stefan 2014-8-22
编辑:Stefan 2014-8-22
The following image was taken with a high speed camera at 100000 fps and shows a rod on rod impact (they bounce off one another after impact - this is what is shown here). If anyone is interested this is called a symmetric Taylor impact test.
The top image is the original and the bottom one was produced using the Matlab function edge with option 'canny'. With bwboundaries() I can find the coordinates of those pixels but I need to get coordinates accurate to subpixel levels.
I have 24 of those images showing the impact over time. The idea is to capture how the radius of the rod evolves in time - hence I need coordinates of the top and bottom edge of the rod.
What I know so far is:
1. One can resize the image to a higher sort of fake resolution, then use edge() and downsize the image afterwards but I don´t exactly know how to do that.
2. Another option I believe is fitting a function to the intensity profile of the edge and then somehow decide through a threshold or something at what point the edge "occurs".
I am looking for some help with 1. or 2. depending on which option is easier to achieve. I am not sure how to implement this.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by