But what happens if we do not have two cameras and we want to experiment with the 3-D video making process? Well, we can actually be creative. A left and right image from a stereoscopic video will ideally only have a horizontal shift of some pixels. This means that if we take a simple, monocular video and shift its frames towards one horizontal direction, we can create a synthetic right, or left image. More specifically, by shifting the frame to the right, we create a synthetic left frame and shifting it to the left, we create a synthetic right frame. Let's demonstrate this and adjust the previous example to work with a regular video.
First, we will open a regular video. We can use one of the videos included in MATLAB. Here, we will use the video file
rhinos.avi
distributed with the Image Processing Toolbox:>> vid = VideoReader('rhinos.avi'); % Open video file
Create and open a video to write our results in:
>> sV = VideoWriter...