在运动检测系统中区分运动物体. [英] differenciating moving objects in a motion detection system.

查看:121
本文介绍了在运动检测系统中区分运动物体.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Matlab和C ++开发代码来区分不同的运动对象.但是我什么都不知道...

可以检测到移动的物体,但是如何将其分类为人,动物或车辆?

提前谢谢您.

[edit]改进了拼写和语法,并将大写字母更改为普通[/edit]

I’m trying to develop a code in Matlab and C++ to distinguish different moving objects. But I couldn’t get any concept...

A moving object can be detected but how will I classify that as human, animal or vehicle?

Thank you in advance.

[edit]improved spelling and grammar and changed caps to normal[/edit]

推荐答案

使用神经网络的AI解决方案通常用于识别图像中的图案.知道要搜索的内容至关重要:模式匹配神经网络 [ ^ ]
AI solutions using neural networks is common for recognizing patterns within an image. Knowing what to search for is essential: pattern matching neural networks[^].


如果您真的想解决区分人,动物和车辆的问题,建议您退后一步,考虑添加其他传感器:

红外/热传感器-对红外传感器进行一些研究,看看是否有可以在您想要检测的距离范围内给物体提供温度读数的传感器.人类将阅读大约99 +/-华氏度.较小的动物通常会具有较高的温度,较大的动物通常会具有较低的温度.内燃机的温度更高.

添加第二个摄像头以获取立体数据,以便您可以得出到物体的距离.根据与物体的距离及其在视频中显示的尺寸,您可以得出物体的实际尺寸,这将使您对动物/人类/车辆有一个很好的初步估计,除了小孩可能与大狗和摩托车混为一谈之外与人类混淆.

添加雷达,车辆应能给您带来良好的雷达回报,而人类则不会.

声音可能也有帮助,至少对于检测内燃机驱动的车辆是有用的.

额外的传感器输入,实际可行的解决方案将更加可靠.

另一方面,如果您只是将其作为理论练习(自从您谈论使用Matlab以来,我就怀疑这一点).首先要注意的是您实际的运动检测算法:

SafarTimura是正确的,您需要考虑连续帧之间的差异,以检测运动.但这不是那么简单.从一帧到下一帧,大多数像素会有微小的变化.因此,您首先要尝试如何处理差异"-您可以比较原始像素,然后查看其值变化大于某个阈值的像素(您可以通过实验进行调整,也可以动态地调整)确定您所采取的每个差异的阈值).或者,也许您想对每帧进行边缘检测,然后求出边缘检测结果之间的差.您可以分别进行边缘检测或每种颜色(红色,绿色,蓝色)中的差异或灰度差异.

编写代码以求出差异并根据差异生成新框架-然后查看差异"输出并调整阈值,直到获得看起来像正在移动的事物为止(如果可以的话).无法识别形状,那么您几乎不可能提出一种算法来实现.)

一旦有了一个好的运动检测算法,不仅可以检测运动,还可以识别出某种形状,那么您就可以进行区分运动的问题了.

根本上很难区分正在发生的事情.您可以尝试根据形状进行匹配,但是这可能非常困难,因为移动的对象可以与您以任意角度旋转任意距离,并且运动检测算法将丢弃大量数据.

如果您具有立体数据并且可以估计深度,则可以得出大小的粗略估计,这将为您提供对大大小小的事物进行快速分类的方法.

您可能会发现,检测到运动之后,需要返回原始帧数据,并对运动区域中的原始帧进行边缘检测,以提取出更好的形状信息.

无论您做什么,要获得一个好的算法,您都将需要成千上万的示例输入进行测试.通常,您会采用大量示例输入,并手动确定每个输入的正确答案.然后,您将输入分为两半,并使用另一半来开发算法/针对其进行模式识别.训练完算法后,您将使用测试集的后半部分进行测试,看看效果如何.

这是一个有趣的问题,只是意识到这是一个巨大的问题,并且需要大量资源才能找到实用的解决方案.
If you are serious about solving the problem of distinguishing between human, animal and vehicle, I would suggest you take a step back and consider adding additional sensors:

Infrared / thermal sensor -- do some research into infrared sensors and see if there is one that can give you temperature readings on objects at the distance you want to detect them at. Humans will read around 99 +/- degrees farenheit. Smaller animals will generally have higher temperatures, larger animals generally have lower temperatures. Internal combustion engines run a lot hotter.

Add a second camera to get steroscopic data so that you can derive distance to object. Given the distance to object, and the size it appears in your video, you can derive actual size of object which would give you a good first estimate of animal / human / vehicle, except small children might be confused with large dogs and motorcycles might be confused with humans.

Add radar, vehicles should give you a good radar return, animals an humans won''t.

Sound might also help, at least for detecting internal combustion driven vehicles.

An actual practical solution will be a lot more reliable with additional sensor inputs.

If on the other hand you are just pursuing this as a theoretical exercise (which I suspect since you talk about using Matlab). The first thing to concentrate on is your actual motion detection algorithm:

SafarTimura is right, you need to take the difference between successive frames, to detect motion. But it isn''t as simple as that. There will be minor variations in most pixels from one frame to the next. So you''ll first want to experiment with how you take the "difference" -- you might compare raw pixels and just look at the pixels whose values change by greater than some threshold (which you either tune by experimenting, or maybe you dynamically determine the threshold for each difference you take). Or maybe you''ll want to do edge detection on each frame and then take the difference between the edge detection results. You might do your edge detection or differences in each color (red, green, blue) separately, or as a greyscale difference.

Write the code to take the diffences and generate a new frame based on the differences -- then look at the "difference" output and adjust your threshold until you are getting something that looks to you like the thing that is moving (if you can''t recognize the shape then there it''s pretty unlikely you''ll be able to come up with an algorithm to do so).

Once you''ve got a good motion detection algorithm that is not just detecting motion but giving you something that you can recognize as a shape, then you can proceed to the problem of distinguishing what is moving.

Distinguishing what is moving is fundamentally hard. You can try to match based on shape, but that may be very difficult since the moving object could be rotated at any angle from you and at any distance, and your motion detection algorithm is going to be throwing away a lot of data.

If you have stereoscopic data and can estimate depth, you can derive rough estimate of size which will give you a quick way of classifying large and small things.

You may find that after you''ve detected the motion, you need to go back to the original frame data and do edge detection on your original frame in the region of the motion, to extract a better idea of the shape.

No matter what you do, to get a good algorithm you are going to have to have hundreds of thousands of example inputs to test against. Typically you''d take a huge set of example inputs and determine the right answer for each of them by hand. Then you''d divide the input into half, and use one half to develop your algorithms / train your pattern recongition against. Once you''ve trained your algorithm, you''d use the second half of your test set to test against and see how you did.

It''s a fun problem, just realize it''s huge and would take quite a bit of resources to arrive at a practical solution.


您可能必须确定一些基本形状-人类,四足动物,汽车/卡车/摩托车/自行车/飞机/导弹/哥斯拉,然后提出某种匹配的算法,可以确定哪种形状最适合移动物体.
You would probably have to identify some basic shapes - a human, a four-legged anmal, and a car/truck/motorcycle/bicycle/airplane/missile/godzilla, and then come up with some sort of matching algorythm that can determine what shape best matches the moving object.


这篇关于在运动检测系统中区分运动物体.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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