How to stabilize and warp images from a recording of a computer screen video played in VLC
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have a video file. The video is a recording of a video shown on a computer. The recorder is hand held, so it moves slightly during the recording. I believe the original video (on the computer screen) is rectangular, but, in the video from the hand held recorder the video appears to be trapazoid. The upper left corner of the computer screen video is cut off in my copy, but there's no useful information up in that corner. I would like to transform the video so it it rectangular, and fills the screen. The computer that was recorded, is black outside the video on the left and right sides. At the top and bottom, there is a menu bar (top) and taskbar (bottom).
What I would like is to extract the trapozoidal region that is the video (on the computer screen) and warp the region to be rectangular.
I believe I can use the warp command, in the image processing toolbox, if I could identify the four corners.
I'll describe a quisi algorithm
1) I dentify the triangular black region of the computer screen on the left side. On the left side, the image appears to stop before the end of the computer screen, so what is seen is a triangular region of the black, or dark, computer screen. The top left corner of the video played on the computer screen is cut off, so there is a triangular black region above the task bar, representing the bottom of the video. The black region is the area in VLC to the left of the video display.
2) On the top side, the video was played in the software VLC, so the window header and VLC menu bar is visible.
3) On the right side, there is a rectangular area that is black, or dark, that represents the area in VLC that is to the right of the video display. Then further to the right would be the edge of the computer screen. And further right is the desk / wall behind the computer screen.
4) On the bottom side, there's the VLC playback bar, and below that is a windows taskbar.
5) The area of the video is defined best by the rectangular area on the right. The top and bottom of the video are the top and bottom of the rectangular area extended. The right edge of the video is the left edge of the rectangular area. I guess the rectangular is actually trapazoidal, due to skew resulting from the recording video being above the display looking downward.
6) The area of the video is defined by the triangular black area on the left, the left edge of the video is the right edge of the triangle.
0 Commenti
Risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!