How to implement deinterlace "weave + bob" in C ?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
eesutton

How to implement deinterlace "weave + bob" in C ?

Post by eesutton »

This is off topic. I ask the question here because of the imaging expertise found on this forum. For interlaced video I have implemented bob and weave deinterlace methods in C. As expected, the weave method looks bad when objects are moving and bob (line doubling) cuts vertical resolution in half. I have seen mentioned a combined approach called "weave + bob" that is suppose to achieve decent results but do not understand what the implementation would be.

Any clues on how to approach a "weave + bob" deinterlace implementation in C ?

Thanks in advance,

-Ed
eesutton

Re: How to implement deinterlace "weave + bob" in C ?

Post by eesutton »

Thanks but I have and already seen most all of these links. However on second look at the Altera description, that may work for me.

Thanks again,

-Ed


dproc
Posts: 19
Joined: 2010-09-14T20:39:15-07:00
Authentication code: 8675308

Re: How to implement deinterlace "weave + bob" in C ?

Post by dproc »

If its from a video then the information in the previous & next frames is VERY valuable. If so then you might try his filter with virtualdub: http://neuron2.net/smart/smart.html
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: How to implement deinterlace "weave + bob" in C ?

Post by Drarakel »

The "Smart Deinterlacer" from Donald Graft is not a bobbing filter. But eesutton could take a glance at the sources of some 'smart bob' implementations from those AviSynth/VirtualDub gurus:
http://neuron2.net/dgbob/dgbob.html
http://neuron2.net/bob.html
http://www.guthspot.se/video/#deinterlacesmooth
Don't know if that helps you with your own code...
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: How to implement deinterlace "weave + bob" in C ?

Post by anthony »

Look at the command line deinterlace examples,
and create the C equivelent! Should be simple enough!

http://www.imagemagick.org/Usage/video/#deinterlace

Note for BoB use the second "composition" method.
Whether you get black or white depends on if you use "screen" or "multiply"
to get the other frame, roll the overlay template.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: How to implement deinterlace "weave + bob" in C ?

Post by Drarakel »

Well, eesutton wrote that he already has a bob method. I have the impression that he wants a (not too difficult) 'smart bob' method (or 'weave+bob') - that interpolates (or doubles) the lines in moving areas and just uses the previous field in static areas.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: How to implement deinterlace "weave + bob" in C ?

Post by anthony »

That is also covered in IM examples, after the simplier bob methods
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: How to implement deinterlace "weave + bob" in C ?

Post by Drarakel »

anthony wrote:That is also covered in IM examples
An automatic solution, that analyzes the fields and applies different methods to different regions of one field??
One could try to mimic that with ImageMagick, but I think that eesutton doesn't need an ImageMagick solution anyway - but a standalone C program ("off topic").
Post Reply