1

I am working on edge detection, i tried the method of canny(matlab function). but it only detect edge in the pixel level, I'm looking for a subpixel edge detection algorithm/code with high accuracy.

CS2013
  • 133
  • 1
  • 5
  • 14
  • I used such an algorithm a long time ago for testing the performance of some imaging equipment, it was simple and worked very well. But it only applied to vertical or horizontal edges. Do you have a similar constraint? – Mark Ransom Nov 07 '13 at 19:46
  • Could you be more specific about the images for which you wish to find edges? Finding subpixel edge fits for lines and curves is straightforward IF you know the proper scan direction. If you're simply looking to find all edges for arbitrary curves in any arbitrary image, then that's another matter. – Rethunk Nov 09 '13 at 00:49

4 Answers4

3

AFAIK state-of-the-art edge detection algorithms operate at a pixel-level accuracy (e.g., gPb).

If you want to get sub-pixel accuracy, you may apply a post-processing stage to the pixel-level results obtained by canny or gPb.

You can fit a parametric curve to small neighborhoods of detected edges thus obtaining sub-pixel accuracy.

Shai
  • 111,146
  • 38
  • 238
  • 371
2

The problem with running edge() on your original image is that the returned black and white image is the same size as your original image. Can you increase the size of your image with the imresize() function and do edge detection on that?

Daniel Golden
  • 3,752
  • 2
  • 27
  • 32
2

Most of these sub-pixel edge detection algorithms simply involve upsampling the image, typically with bicubic spline interpolation, and then performing the edge detection on the result, and then downsampling the image to the original resolution again.

Have you tested any of these simple algorithms yet? Are they suitable for your purposes?

The matlab resampling and edge detection algorithms are already quite well documented.

Cloud
  • 18,753
  • 15
  • 79
  • 153
  • +1 This is the straightforward solution. Otherwise it gets complex, like fitting a curve to the edge and interpolating. – chappjc Nov 07 '13 at 19:40
0

If you need sub-pixel detection, you can try subpixelEdges() method in Matlab, described in Accurate Subpixel Edge Location Based on Partial Area Effect (Agustin Trujillo-Pino et al.) and in these Slides.

greybeard
  • 2,249
  • 8
  • 30
  • 66