简体   繁体   English

查找两帧之间的移动距离——python

[英]Find movement distance between two frames -- python

I have a short video of a moving object.我有一个移动物体的短视频。 for some reason I need to estimate the object's movement distance between two specific frames.出于某种原因,我需要估计两个特定帧之间对象的移动距离。 It is not necessary to be exact.没有必要精确。 Does anyone know how I can do this in python and opencv or any image processing library?有谁知道我如何在 python 和 opencv 或任何图像处理库中做到这一点? Thanks谢谢

I don't know in opencv, there is for sure something similar but you can easily do it with scikit-image module.我不知道在 opencv 中,肯定有类似的东西,但您可以使用scikit-image模块轻松完成。 I do it on a regular basis to align frames.我定期这样做以对齐框架。

See this example here:在此处查看此示例:

https://scikit-image.org/docs/dev/auto_examples/transform/plot_register_translation.html#sphx-glr-auto-examples-transform-plot-register-translation-py https://scikit-image.org/docs/dev/auto_examples/transform/plot_register_translation.html#sphx-glr-auto-examples-transform-plot-register-translation-py

EDIT: I found something very similar in opencv here编辑:我在这里的 opencv 中发现了一些非常相似的东西

https://docs.opencv.org/4.2.0/db/d61/group__reg.html https://docs.opencv.org/4.2.0/db/d61/group__reg.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM