Interlaced frame - Presence of odd field's data in even fields

asked 2019-04-22 04:59:41 -0500

updated 2019-04-22 05:52:11 -0500

supra56 gravatar image

I am trying to isolate the odd fields and even field from a interlaced frame. The algorithm that I use is simply matrix slicing.

When I display the images, I see that there are remanants of odd field in even field image and vice versa.

What could be the reason? How to avoid this? Am I doing something wrong here?

Here is the Python code I am using. PFA the images. To better visualize the problem, I plotted a line trace of a colum and one can see the jagged trend on the right end of the plot.

import numpy as np
import cv2
import matplotlib.pyplot as plt


cv2.imshow('cropped frame',cropped_frame);
cv2.imshow('even rows',even_fields);
cv2.imshow('odd rows',odd_fields);



In the image below, the interlaced frame on the left; even field on the top right; odd field on the bottom left.

image description

Plot of a single colum data from the isolated odd field.

Plot of a single colum data from the isolated odd field

The frame used from the video is also attached for reference.Here is the link

edit retag flag offensive close merge delete


You want to crop on right side of border?

supra56 gravatar imagesupra56 ( 2019-04-22 05:54:01 -0500 )edit

No, i was trying to isolate the two fields from the interlaced image. I guess I found my mistake. I used the wrong color converter. RGB2Gray gave better results than BGR2Gray.

Karthikyan gravatar imageKarthikyan ( 2019-04-22 11:52:30 -0500 )edit