问题提出:
给定一个二维图像,基于某个threshold,来提取contours。
在图形图像学中,这个问题有比较好的解决方案,google "coutour trace",可以得到以下2个比较好的参考文献:
1. http://en.wikipedia.org/wiki/Moore_neighborhood
算法描述:
The following is a formal description of the Moore-Neighbor tracing algorithm:
Input: A square tessellation, T, containing a connected component P of black cells.
Output: A sequence B (b1, b2 ,..., bk) of boundary pixels i.e. the contour.
Define M(a) to be the