分支点(OpenCV,C++)

发布于 2024-12-06 03:02:29 字数 452 浏览 1 评论 0原文

我想识别此图像中闪电的分支点:

https://i.sstatic.net/PXujf .jpg

我首先做的是对图像进行阈值处理,以便获得闪电部分 图像并丢弃背景。这是结果

https://i.sstatic.net/IYNTi.jpg

我使用了阈值openCV 中的函数,生成的图像非常糟糕 随着质量的丧失,树枝不再可见。

好吧,基本上我有两个问题:

  1. 如何正确分割图像,以便正确捕获图像的闪电部分。
  2. 那么我怎样才能识别分支点呢?对于我想要的每个分支点 在其上画一个红色圆圈。

预先感谢您

I want to identify the branching points of the lightning in this image:

https://i.sstatic.net/PXujf.jpg

What I did first was threshold the image such that I get the lighning part
of the image and discard the backround. This is the result

https://i.sstatic.net/IYNTi.jpg

I used the threshold function in openCV and the resulting image is pretty much bad
as the quality is lost, the branches are no longer visible.

Ok, basically I have 2 problems:

  1. How can i properly segment the image such that the lightning part of the image is properly captured.
  2. How can I then, identify the branching points? For every branch point i want to
    draw a red circle over it.

Thanking you in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

温馨耳语 2024-12-13 03:02:29

分割/阈值:
我会尝试这个
他们还有一篇关于图像分割的 NIPS2012 研讨会 (DISCML) 论文,该论文似乎可以处理相当优雅的细长物体(例如图中的闪电)。

分支点:
一旦你有了一个好的掩模,你就可以使用形态操作来提取分支点(Matlab代码):

 bw = myGoodSegmentation( img ); % replace with whatever segmentation/thresholding that works best for you.
 tbw = bwmorph( bw, 'skel', inf );
 [y x] = find( bwmorph( tbw, 'branchpoints' ) ); % get x,y coordinates of branch points

Segmentation / thresholding:
I would give this a try.
They also had a NIPS2012 workshop (DISCML) paper on image segmentation that seems to handle quite elegantly thin elongated objects (like the lightnings in the picture).

Branching points:
Once you have a good mask you can use morphological operations to extract the branching points (Matlab code):

 bw = myGoodSegmentation( img ); % replace with whatever segmentation/thresholding that works best for you.
 tbw = bwmorph( bw, 'skel', inf );
 [y x] = find( bwmorph( tbw, 'branchpoints' ) ); % get x,y coordinates of branch points
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文