For this example, we are going to make a simple function implementing the field merging technique. We will assume that our video is small and given as a matrix variable input to the function, and we are also going to include a second input that will help us decide which rows to start replacing. If the input is 1
, the odd rows of the first frame will be replaced by the odd rows from the second frame and the even rows of the second frame will be replaced by the even rows of the first frame. If the input is 2
, the even rows of the first frame will be replaced by the even rows from the second frame, and the odd rows of the second frame will be replaced by the odd rows of the first frame. Finally, the output will be the deinterlaced video.
Let's write the function implementing the field merging technique:
function [vid] = FieldMerge(vid,order) % Function for de-interlacing a video using Field Merging % Inputs: % vid – Input video matrix...