图像处理..背景减法

发布于 2024-10-24 18:40:53 字数 102 浏览 1 评论 0原文

我有一系列从相机拍摄的图像。图像由手和周围环境组成。我需要把除了手以外的所有东西都移开。

我是图像处理新手。有人可以帮助我解决上述问题吗?我很擅长使用 C 和 Matlab。

I have a sequence of images taken from a camera. The images consists of hand and surroundings. I need to remove everything except the hand.

I am new to Image processing. Would anyone help me in regard with the above Question. I am comfortable using C and Matlab.

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

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

发布评论

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

评论(5

¢好甜 2024-10-31 18:40:53

如果您有固定的背景和移动的手(以及相当多的图像!),一个非常简单的方法就是从每个图像中获取这组图像的平均值。不出意外的话,这只是对 Matlab 的简单介绍。

A really simple approach if you have a stationary background and a moving hand (and quite a few images!) is simply to take the average of the set of images away from each image. If nothing else, it's a gentle introduction to Matlab.

生活了然无味 2024-10-31 18:40:53

您试图解决的问题的名称是“图像分割”。维基百科页面在这里:wiki 是一个好的开始。

如果照明一致性对您来说不是问题,我建议您从简单的 RGB 阈值开始,看看能达到什么效果,然后再尝试更复杂的操作。

The name of the problem you are trying to solve is "Image Segmentation". The Wikipedia page here: wiki is a good start.

If lighting consistency isn't a problem for you, I'd suggest starting with simple RGB thresholding and see how far that gets you before trying anything more complicated.

心在旅行 2024-10-31 18:40:53

查看 OpenCV,这是一个用于计算机视觉应用程序的 FOSS 库。具体请参阅视频监控模块。有关 MATLAB 中背景减法的演练,请参阅此 EETimes 文章

Have a look at OpenCV, a FOSS library for computer vision applications. Specifically, see the Video Surveillance module. For a walk through of background subtraction in MATLAB, see this EETimes article.

﹉夏雨初晴づ 2024-10-31 18:40:53

您能指定您拥有什么类型的图像吗?背景是移动的还是静态的?对于静态背景来说有点简单。您只需从背景图像中减去传入图像即可。您可以使用一些形态学操作来使其看起来更好。它们都取决于您所拥有的图像的质量。如果您有移动背景,我建议您进行基于颜色的分割。将图像转换为 YCbCr,然后适当地设置阈值。我知道上面有一些论文(但是我没有时间找到它们)。我建议先阅读它们。这是一个可能对您有帮助的链接。阅读皮肤分割部分。

http://www.stanford.edu/class/ee368/Project_03 /Project/reports/ee368group08.pdf

Can you specify what kind of images you have. Is the background moving or static? For a static background it is a bit straightforward. You simply need to subtract the incoming image from the background image. You can use some morphological operations to make it look better. They all depend on the quality of images that you have. If you have moving background I would suggest you go for color based segmentation. Convert the image to YCbCr then threshold appropriately. I know there are some papers available on it(However I dont have time to locate them). I suggest reading them first. Here is one link which might help you. Read the skin segmentation part.

http://www.stanford.edu/class/ee368/Project_03/Project/reports/ee368group08.pdf

貪欢 2024-10-31 18:40:53

背景减法实现起来很简单(将背景估计为所有帧的平均值,然后从背景和阈值中减去每个帧,从而产生绝对差),但不幸的是,只有在以下情况下才能正常工作: 1. 相机具有手动增益和曝光 2. 照明条件不改变 3.背景是静止的。 4. 背景的可见时间比前景长得多。

根据您的描述,我认为情况并非如此 - 所以您可以使用 - 正如已经指出的 - 颜色作为从背景分割前景的手段。因为您要尝试隔离这是一只手,所以最好的办法是了解手的颜色。 opencv 提供了一些方法来做到这一点。如果您想自己执行此操作,您只需获取一些手部像素的颜色(您需要为至少一帧手动指定此颜色)并将它们转换为 HUE(以与亮度无关的方式封装颜色)。肤色具有非常恒定的色调),然后制作色调直方图。将其与其余像素进行比较,然后确定色调是否足够相似。

background subtraction is simple to implement (estimate background as average of all frames, then subtract each frame from background and threshold resulting absolute difference) but unfortunately only works well if 1. camera has manual gain and exposure 2. lighting conditions do not change 3.background is stationary. 4. the background is visible for much longer than the foreground.

given your description i assume these are not the case - so what you can use - as already pointed out - is colour as a means of segmenting foreground from background. as it's a hand you are trying to isolate best bet is to learn the hand colour. opencv provides some means of doing this. if you want to do this yourself you just get the colour of some of the hand pixels (you would need to specify this manually for at least one frame) and convert them to HUE (which encapsulates the colour in a brightness independen way. skin colour has a very constant hue) and then make a HUE histogram. compare this to the rest of the pixels and then decided if the hue is simmilar enough.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文