MATLAB: How to find edges in an image with slightly noisy/uneven sides

Image Processing Toolbox

How do I find edges in an image with slightly noisy/uneven sides? An image that was generated by scanning in a shape has slightly distorted edges, but I would like to 'straighten' them in order to better analyze the shape.

Best Answer

One method to do this is to extract line segments based on the Hough transform. The function 'houghlines' and the example in the documentation show how to do this: