检测opencv c ++上的运动(移动相机) [英] detecting motion on opencv c++ (moving camera)

查看:518
本文介绍了检测opencv c ++上的运动(移动相机)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了大学的项目,我跟OpenCV的工作(这是真的真棒)

I'm doing a project for the university and I'm working with OpenCV (that is really awesome).

现在我的问题是:结果
口有一个视频(.AVI),我已经发现的所有我想知道这个问题突然出现在红色和黄色之间的RGB范围内的斑点的信息。我已经意识到,保存有关的像素值的所有信息矩阵后,我终于创建红色表示平均像素值缩放图像。

Now my problem is:
I have a video (.avi) and I have detected all the information I want to know about the blobs that suddenly appear in the RGB range between red and yellow. After I have realized a matrix that saves all the information about the pixel values, finally I create an image in the scale of red that represents the median pixel values.

真正的问题是,视频是不是静态的,相机而动(不太多,但它的动作)。结果
我可以计算相机运动的X和Y坐标,这样我就可以转移矩阵的值?

The real problem is that the video is not static and the camera moves (not too much but it moves).
Can I calculate the x and y coordinates of the camera motion so I could shift the value of the matrix?

推荐答案

谁在乎你的英语?直到我们了解你的问题:)你真正能做的是给在KLT运动检测在OpenCV中实现一个镜头。这里是KLT的链接,也称为光流如果你可以过滤下来限于你一定能得到你要跟踪的对象持有的斑点的运动矢量。甚至更好的给KLT的对象初始坐标/区域来跟踪。你已经检查了OpenCV blobs库来获取blob?这是链接

Who cares about your English? Till we understand your problem :) What you could really do is to give a shot at KLT motion detection that is implemented in OpenCV. Here is a link to KLT also known as optical flow If you can filter down the motion vectors limited to the blobs you can certainly get hold of the object you want to track. Even better to give KLT the objects initial coordinates/area to track. Have you checked OpenCV blobs library to get hold of the blobs? Here is the link

这篇关于检测opencv c ++上的运动(移动相机)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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