May 8, 2009

edge detection

Computer vision 中,edge 就是点,但是 edge detection 算法有步骤将这些点连起来。

Canny edge detection:
Wikipedia 上对 nonmaximal suppression 的描述很有问题。混淆了两个概念 edge direction 和 gradient direction.

这里只用 gradient direction: theta = atan(gy/gx)
nonmaximal suppression 就是要找到 ridge 的 top (山脊的 top 是一条线),所以是在垂直于山脊走向的方向上找局部最大,即 gradient 方向。
最后一个步骤是 double thresholding 和 edge linking。所以 Canny 算子生成 binary image.
(Matlab 的 edge
Opencv 的cvCanny 都是生成 binary image)

但是
vgg_xcv_segment
curves=vgg_xcv_segment(uint8(im),'canny_edges');
产生很多edge线,这些线范围很小(位置都是 subpixels),很可能是弯曲的。实际上它给出了组成这条线的点的位置,以及每一点的 edge intensity(非 binary)和 edge direction.

experiment:
vgg_xcv_segment canny edge 的效果不错,

但是如何去描述这些 edge 是个难题。

note:
canny_edge 和 break_edges 效果一样
lines 好像是找直线,但是用在 Lena 上效果很怪

OCR tutorial (bag of words 程序里)里面并没有去描述这些 edge,而是将edge (points) 的intensity 作为概率,进行采样,作为 Interesting point 的位置,scale 是 uniform distribution. 再将 interesting point 用 SIFT 的方式进行描述。

所以我一直想要的描述 edge 是不是一种误导。

0 comments: