Separate fields (deinterlace) to 60fps

    Jul 18 2011 | 6:30 am
    I'm trying to deinterlace a camera feed, and rather than throw out every other field I'd like to use the extra temporal resolution for some CV processing. It's also kind of interesting to see the 'hyperreal' feel it gives everything. Somewhere between cheap video and the sped-up film they used in the 60s for car-chases.
    The only issue I have is getting the frame order right. I seem to get getting different frame orders each time I start the patch (even when just-loaded). The drift caused by the approximate metro figure also means it eventually gets out of order by itself in a few minutes too. I think the key is to lock the field-switching to the updating of the grab object, but if I use unique frames its only running at 29.97 fps (metro 33ish), and I would need some kind of timer to measure 'half-bangs'.
    Here's the patch so far - of course it will need an interlaced feed from a DV camera or capture card: