问题描述
我有一个视频序列,其中一帧如下所示,如下所示。
我尝试使用角点检测来查找纸张上矩形的边缘。
我使用的是Shi-Tomasi角检测器。然而它检测到我不需要从图像的背景的许多其他事情。
第二个问题:
在视频序列中检测到角点后,我需要在矩形内播放另一个视频。我试图这样做使用单线程,但它导致了很多滞后和颠簸。我可以做什么来提高我的处理速度。我需要为每个视频使用多个主题。一个视频来自网络摄像头,另一个来自硬盘驱动器。
这里是我为之前的一个
- 查找图片中的所有轮廓,并用4个角形对每个轮廓进行逼近
- 矩形与您自己的条件,如矩形面积> 1000000
- (可选)你会注意到,你的矩形不是真正的矩形,因为3D世界。
在所找到的矩形上绘制绿色或任何纹理>
对于不稳定的播放,你不仅可以使用GPU的多线程,还可以使用加密来提高速度。
I have a video sequence of which one frame is shown below as shown below.I was trying to use corner detection to find the edges of the rectangle on the sheet of paper.
I am using the Shi-Tomasi corner detector for the same. However it detects a number of other things that I don't need from the background of the image. How can I narrow down my ROI to only the sheet of paper.
Second Question:
In the video sequence upon detecting The corners I need to play another video inside the rectangle. I was trying to do this using a single thread but it lead to a lot of lag and jerks. What can I possibly do to improve my processing speed. Do I need to use multiple threads for each video. One video is from the webcam while the other is from the hard-drive.
Here is what I did for one of previous projects.
- Find all contours in your picture and approximate each with 4 corner shape
- Find right rectangle with your own condition such as rectangle with area > 1000000
- (optional) you will notice that your rectangle is not real rectangle because of 3D world. You might want to do perspective transformation to get correct rectangle
- Paint green or whatever texture on the found rectangle since you already have 4 corners from above
As for jerky playing, you might want to use not only multithreading with GPU but also encryption to improve speed.
这篇关于在网络摄像头图像中查找投资回报率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!