View Full Version : EEDIBob - Batch Image Deinterlacing
DSP8000
7th March 2007, 11:44
Hi guys,
After some testing I found a solution that just blew me away with the results.
First of all, big thank you to Didée, scharfis_brain and all of the devs of the required filters.
Most of the time I work with DV video & finding a good deinterlacer is a challenge.
Recent script functions like MVBob, MCBob do a realy good job and this is another exploatation of MCBob by Didée.
Actualy, this is a helper script function built in the MCBob v0.3 called EEDIBob, courtesy of scharfis_brain.
I use this technique for deinterlacing still images, freeze frames from PAL DV video.
I did some testing with TDeint, Bob, Decomb, MVBob, MCBob and finally EEDIBob.
To my eyes EEDIBob output looks amazing, does the job perfectly, even in fast motion scenes.
This is the script that I use:
SetMemoryMax(512)
Import("C:\Program Files\AviSynth 2.5\plugins\MCBob_v03c.avs")
ImageReader("D:\Image17.jpg") # ( original source size 787,576 - timeline frame export from Vegas)
ConvertToRGB32() # ( imagereader requires RGB input source )
AssumeFrameBased()
Crop(41, 0, -42, -0) # ( crop to 704,576 for PAL / width MUST be even )
ConvertToYV12(interlaced=true) # ( EEDIBob, McBob works in YV12 colorspace )
AssumeBFF() # ( set field order correctly/check with VDub )
EEDIbob() # ( default parameters work just fine, but feel free to experiment )
SelectEven()
ConvertToRGB32()
ImageWriter("D:\Image02", start = 01, end = 01, type = "png", info = true)
If there is anything wrong with it, or maybe just a optimization tips, I'm open for suggestions.
I need a help with creating a batch script for processing multiple files at once.
I'm not very good with batch files so, if anyone can help, it would be a timesaver for me.
Also maybe GUI for this function would be great.
Maybe something similar to neuron2's JPEG Deinterlacer (http://neuron2.net/jpgdeint.zip)
The batch should give an option to modify:
%IMAGE_INPUT%
%IMAGE_INPUT_FOLDER%\%IMAGE_NAME%
%IMAGE_OUTPUT%
%IMAGE_OUTPUT_FOLDER%\%IMAGE_NAME%
%OUTPUT_NAMING_SCHEME%
%GENERATE_FILENAME_FROM_INPUT%
%FRAMES_WRITEN%
%OUTPUT_TYPE_FORMAT%
If someone can think of anything else, please post your suggestion.
This deinterlacing method works much better than Photoshop's Video Deinterlacing Filter.
I think it would be very useful for other forum members as well.
PLEASE NOTE: I am using this deinterlacing method ONLY for images !!!
Thanks for any contributions upfront.
DSP8000
foxyshadis
7th March 2007, 13:28
Have you tested speed against SecureBob? The speed difference should be minimal, but SecureBob should reduce EEDI2's shimmering noticeably. (Not like mcbob, of course, but we don't all have overclocked demons...) That was my result in testing, hm, 9 months ago or so. SecureBob uses a simple motionmask to blend in detail from both fields in static areas. In active scenes, there will be minimal difference.
Chainmax
7th March 2007, 13:58
But isn't SecureBob supposed to exhibit up-and-down bobbing on static scenes? I was refraining from using it instead of TDeint+EEDI2 as an alternate clip for TIVTC on my Simpsons rips for that reason.
DSP8000
7th March 2007, 14:03
The speed it is not very important for me.
As long as I can get perfect looking deinterlaced picture I'll use whatever produces the best results.
I remember, I did some tests with SecureBob a while ago, but I'll give it a go again.
The script that I posted in my previous post does the job for me, but I need batch or GUI solution for multi file processing.
foxyshadis
7th March 2007, 14:17
Of course SecureBob has some bobbing/shimmering, it uses only very simple masking. TDeint+EEDI might be better, I'm not sure, but there's no TDeint in EEDIBob(). =p
EEDIBob will actually probably perform best on fast scenes. The areas you'd most notice a problem are text overlays and still scenes.
But if it's a single image, now that I read the entire post, I don't think you can get any better than EEDI. Aside from text overlays, which you'd have to mask off manually. (Like a timestamp.)
davidhorman
7th March 2007, 15:07
Do you still have the original video, or only the individual frames? If you have the original video you could pass that through mv/mcbob and then trim down to the single frame you want. This will allow you to keep (if there is any) detail available from other frames.
David
DSP8000
7th March 2007, 16:37
I do have the original video, but as I edit, do effects, color correction... I take freeze frames that I later on use them for a picture slideshow or highlights.
Manualy deinterlacing all of them just takes too much time.
The JPEG Deinterlacer by neuron2 does exactly this.
Batch or GUI solution would do the job automated, but based on the parameters that I use in the script.
Terranigma
7th March 2007, 16:42
Speaking of eedi. What if I tell you that eedi will be superseded by something else that uses a completely different method and is much better at retaining sharpness, avoiding artifacts, and maintaining spatial/temporal steadiness within a couple of months or so? :cool:
Anyways, DSP8000.
As long as I can get perfect looking deinterlaced picture I'll use whatever produces the best results.
The closest you'll get to perfectly deinterlaced frames, is by using the latest version of mcbob(). Make sure to tweak the default settings.
davidhorman
7th March 2007, 17:03
Speaking of eedi. What if I tell you that eedi will be superseded by something else that uses a completely different method and is much better at retaining sharpness, avoiding artifacts, and maintaining spatial/temporal steadiness within a couple of months or so? :cool:
The closest you'll get to perfectly deinterlaced frames, is by using the latest version of mcbob(). Make sure to tweak the default settings.
Will this new thing beat EEDI2 on a single interlaced frame, or does it need to work on a set of frames? I ask because, after testing, it seems to me that mcbob reduces to EEDI2 in the case of a single frame, which is what DSP's working on.
David
Terranigma
7th March 2007, 17:34
Will this new thing beat EEDI2 on a single interlaced frame, or does it need to work on a set of frames? I ask because, after testing, it seems to me that mcbob reduces to EEDI2 in the case of a single frame, which is what DSP's working on.
David
Well, EEDI2's not being worked on anymore (according to tritical). The replacement has been in development for over 6 months now. Now I don't know the full details yet, but about it being better. That's a definate yes. Watch this space! :D
foxyshadis
7th March 2007, 21:16
If you can keep temporal sharpness with a single frame, you've just invented psychic deinterlacing. :p Better reconstruction/interpolation methods are nice, though, of course. Especially if it has the level of static stability that mcbob does, while being faster, but as always we'll have to see what actually shows up. Can't deinterlace on promises alone. XD
DSP8000
8th March 2007, 01:13
Speaking of eedi. What if I tell you that eedi will be superseded by something else that uses a completely different method and is much better at retaining sharpness, avoiding artifacts, and maintaining spatial/temporal steadiness within a couple of months or so?
I'm all ears, can't wait to test it.:)
retaining sharpness, avoiding artifacts, and maintaining spatial/temporal steadiness
After some testing(again) I found that even that EEDIBob does an excellent job on a single frame, looses a bit of sharpness.
For me, that's not a big issue, considering that I'm processing pictures. ATM I'm doing a full video test just to see how performs on video as well.
Current processing speed 2.20FPS:D
Any tips on how to incorporate this deinterlacing technique in my first ever GUI?
DSP8000
8th March 2007, 09:03
Well, seems like there's no easy solutions for my needs. I've searched thru the forum & the only thing that's getting close to what I want is avsutil, which does not work at all.
Here's couple of questions:
How do I get ImageWriter to write just one frame & then exit?
How do I open the avs script without MPC, mplayer, Vdub... & then exit?
How to produce 1 frame with avsutil(also maybe updated working binary) & then exit the program?
And finally,
How do I automate this process?:confused:
I found AVISynth Batch Scripter & modified the settings.ini to read images in jpg, jpeg format & that part of the problem is solved & works well.:cool:
Any help is greatly appreciated:)
:thanks:
davidhorman
8th March 2007, 10:51
How do I open the avs script without MPC, mplayer, Vdub... & then exit?
Have you tried avs2avi? It's a command-line AVS renderer.
David
foxyshadis
8th March 2007, 13:49
You could use AvsP and save the image that comes up, and drive it with macros. Or save images from virtualdub's file menu, and drive it with sylia script. Both overcomplicated solutions when avs2avi will probably work. :p
btw, you're probably better off using imagereader(end=0) if you're not splicing it into another video, to prevent all the duplicate frames from being written out.
DSP8000
8th March 2007, 16:51
After the suggestions from foxyshadis & davidhorman I finally found very good solution that automates the process.
:thanks:
The batch will process 20 images/pictures with avs2avi & put them in DEINT_IMAGES folder.
It's not a GUI solution, but it works:)
I'll post all of the required filters & the batch file tomorrow.
HeadBangeR77
9th March 2007, 02:59
The batch will process 20 images/pictures with avs2avi & put them in DEINT_IMAGES folder.
It's not a GUI solution, but it works:)
I'll post all of the required filters & the batch file tomorrow.
I would be very much interested, yet from other reasons: mostly denoising, sometimes subtle sharpening instead of just using UnsharpMask. Waiting impatiently. ;)
cheers,
HDBR77
DSP8000
9th March 2007, 11:33
OK, here we go,
This is automated image/picture deinterlacing batch that will process the files in the provided directories.
In the package are included all of the required filters/plugins, so first of all you'll have to unzip'em in your AVISynth plugins directory. There is a separate folder for the deinterlaced pictures and be sure to double check the dirs in the scripts and the batch files.
I find this deinterlacing batch very useful, for deinterlacing freeze frames from DV video that I use almost every day.
I've tested a lots of deinterlacers and to my eyes EEDIBob does excellent job. Of course, you can modify the scipts or the batch to suit your needs.
After searching the forums I couldn't find a solution for my needs, so here we are. Maybe this will be useful to someone else.
Thanks again to Didée for providing MCBob and scharfis_brain for EEDIBob, foxyshadis, davidhorman, ABatchScripter, avs2avi.
Here's the link for the batch EEDIBob_BATCH_DEINTERLACE.7z (http://members.iinet.com.au/~isdmultimedia/files/EEDIBob_BATCH_DEINTERLACE.7z)
DSP8000
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.