简体   繁体   English

使用OpenCV C ++裁剪视频中的ROI

[英]Cropping the ROI in video using opencv c++

My query is related to how can i crop the ROI in video file using Opencv (c++) for instance the video dimensions are 640x480 and i want to remove the horizon in the video which is specifically a sky above the track. 我的查询与如何使用Opencv(c ++)裁剪视频文件中的ROI有关,例如,视频尺寸为640x480,并且我想删除视频中的地平线,尤其是轨道上方的天空。 An algorithm related to it would be quite helpful. 与之相关的算法将非常有帮助。 Although the Rect property can be used for images but what would be the application for video.? 尽管Rect属性可以用于图像,但是视频的应用程序是什么? how can it be sliced with the dimension like if i want to reduce it to 600x380 etc.. 怎样像我想将其缩小到600x380等尺寸切成薄片。

Considering a video to be a collection of images , u can read the entire video in terms of frames(or images) and apply crop to each individual image. 将视频视为图像的集合,您可以按照帧(或图像)读取整个视频,并将裁剪应用于每个单独的图像。 U can follow this link crop video and this link for reading from video read video in opencv 您可以按照以下链接裁剪视频 ,也可以通过该链接从opencv中的视频中读取视频

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

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