问题提出:
给定一个二维图像,基于某个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

本文介绍了如何使用Moore-Neighbor算法来提取二维图像的contours。算法从图像底部开始,按照特定顺序扫描,找到黑色像素并进行回溯,记录边界像素。文章提供了C++代码实现,并强调了搜索顺序和结束条件的重要性。
最低0.47元/天 解锁文章
1151

被折叠的 条评论
为什么被折叠?



