如何用鼠标从视频中拍照
我有一段高速公路上汽车的视频,所以我想用鼠标一张一张地剪切。但我需要更自动地执行此操作,例如,一种更改框架的方法,按空格键并用鼠标剪切并将图像自动保存在文件夹中。
你在 Linux 上见过类似的东西吗?我正在尝试在 OpenCV 中执行此操作,尽管这不是必需的。
提前致谢。
I have a video with cars on a highway, so i would like to cut one by one with the mouse. But i need to do this more automatically, for example, one way to change the frame pressing the space bar and cuting with the mouse and saving the image automatically in a folder.
Have you ever seen something like this for Linux? I'm trying to do in OpenCV, although it isn't necessary.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在下面添加了代码。它对我来说效果很好。在要单独保存的对象周围绘制矩形。按“空格”进入下一帧。(有时您需要按更长的时间才能向前移动。我不知道为什么)。同样按“Esc”退出。
用法: python car.py 视频文件
I have added a code below. It works fine for me. Draw rectangle around object you want to save separately. Press 'Space' to go for next frame.( sometimes you need to press longer to move foreward. i don't know why). Similarly 'Esc' to exit.
usage: python car.py videofile