如何在图像上找到形状 [英] How to find shapes on image

查看:113
本文介绍了如何在图像上找到形状的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这与任何语言atm无关,只需要数学算法。我有一些图片,让我们说这个



<我需要从这张图片中剪切树,云与草的天空应该作为背景。感谢您的帮助。

解决方案

您所寻找的算法可能是blob detection。这是一个视频示例。 Blob检测例如在OpenCV中实现。



一般来说,正如几位人士在评论中指出的那样,对象的含义需要由图像属性定义而不是图像解释。例如,在您的图像中,物体是树木,狮子还是云?树是绿色斑点,云是白色斑点等。


This is not related to any language atm, only math algorithm required. I have some image, lets say this one

I need to cut tree from this image, sky with clouds and grass should be threated as background. Thanks for any help.

解决方案

Probably the algorithm that your looking for is "blob detection". Here's a video example. Blob detection is implemented, for example, in OpenCV.

In general, though, as several people have pointed out in the comments, what one means by "object" needs to be defined by image properties and not image interpretation. For example, in your image, are the "objects" the tress, lions, or clouds? Trees are green blobs, clouds are white blobs, etc.

这篇关于如何在图像上找到形状的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆