如何从边缘检测图像标记对象?

时间:2011-06-18 12:54:30

标签: image image-processing

如何标记图像中的边缘,我有一些我应用边缘检测技术的单元格。现在我想从图像标记边缘检测单元格。

1 个答案:

答案 0 :(得分:1)

您需要提供更多信息:边缘检测的效果如何?你得到整个blob,或断开连接,但相关的边缘?张贴一个图像的例子,问题就是好的---图片(图像)值得千言万语,特别是在描述图像处理问题时。

This page might be a start.它给出了伪代码:

l = 1                              // Initial Label number
for each pixel
  if pixel X is foreground
    if neighbours A,B,C & D are unlabelled (equal to zero)
      label pixel X with l
      increment l
    else
       num = neighbour label A,B,C & D with least value, not including 0
       label pixel X and pixels A, B, C & D if foreground with num
    end if
  end if
done
相关问题