OpenCV: Making GPU pyrlk_optical_flow.cpp work on video input - opencv

It seems that the pyrlk_optical_flow.cpp sample code (opencv\samples\gpu) only works on two still images.
If so, do any of you know of examples of how to convert the code from still image input to streaming video or webcam input?
Any help is appreciated. Thank you.

Related

Problems when capturing video using AVCaptureVideoDataOutput and AVCaptureAudioDataOutput

fellow developers!
I am working on an application for photo and video shooting with the ability to apply filters of the Core Image to frames right during shooting. Rendering and displaying frames using MTKView/Metal.
Everything seems to work well, but I ran into an unpleasant problem: Randomly, from time to time, video recording turns out to be "broken" and the native video player does not open it. In order not to clog up the space here, I pulled the problematic pieces of code into a separate project and posted them on GitHub: https://github.com/VKostin8311/LiveEffectCamera.git .
I hope someone can help me. Thank you in advance!

Is there any way to detect and cut out the real video part from a full video

Not sure whether I can explain my question. I have a bunch of video material. Some of them are recorded videos from mobile phones. When people record the video on their phone, their produced video may contain more than just the recorded video I need. I need to detect and cut out the useless part. The useless part would be still while the part I need is changing and on the play.
I do not know whether there is any way for me to do it. I can write some code but I just do not know what libraries to use. Does it have something to do with OpenCV. Or is there a way to solve it with ffmpeg?
Hopefully someone can give me some ideas. Thanks a lot.

Converting GIF to MOV IOS

In my IOS App I want to Convert GIF to MOV/Video.
I don't Know Where To start.
I researched much and finally I know is I have to use ImageMagic API for this But don't Know How to Apply It.
Is there any other way except using ImageMagick???
Please Guide me In this Case That how to do so. Thanks in Advance.
You can Get sequence of images from that GIF. And then you need to convert those all into .png and then you can play that frames as mov.
That's the nice solution. For both steps libraries and tutorials are available

Drawing video frames (images) - ios

I'm working on a project and one of the features is to play a video from a rtmp path. I'm trying to find the best way to draw the frames. Right now I'm using a UIImageView and works, but It's not very elegant nor efficient. OpenGL might do the trick but I've never used it before. Do you have some ideas what should I use? If you agree with OpenGL can you give me a code snippet that I could use for drawing the frames?
Thank you.

What algorithm is used here?

This is simple text detection video made using an opencv.
Any ideas how was that made?
Opencv video 1
Opencv video 2
The author describes what he's doing in the comments to the video you linked.
I basically look for dark pixels
aligned horizontally, put a box around
them and call them letters.
He also mentions
If you like i could share the source code.
...so if you're still curious, you know what to do.

Resources