Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试编写以下函数:给定一个全为零但对象外边界(等于1)的矩阵,我想生成一个边界链代码。孔对象不在矩阵中,只是它的外边界。
*在示例图片中 - 所有矩阵单元为 0,但蓝色单元格为 1。
非常感谢任何帮助!
我认为您正在寻找的是边缘检测:
http://en.wikipedia.org/wiki/Edge_detection