View Full Version : Dot Crawl issue


sirt
17th July 2012, 08:47
Hello,

I know this subject has been talked over many times...howhever, in spite of the numerous threads dealing with Dot Crawl, I still can't manage to get rid of it.

So let's put the record straight : I am currently working at a video compression firm and I am trying to correct artefacts like that dotcrawl on many frames. Here is the problematic one :

http://img96.imageshack.us/img96/5425/testckv.png

First of all, do you agree it is indeed dot crawl ?

Then my problem is I can't correct it without giving rise to harmful secondary effects typically blending on the hair or edges. Of course I still haven't been able to completely eliminate dotcrawl from that frame above. I've tried this :

DeDot(luma2d=255, lumaT=25, chromaT1=0, chromaT2=255)

LUTDeCrawl(ythresh=10, cthresh=10, maxdiff=50, scnchg=25, usemaxdiff=true, mask=false)

It is not worth I show you the bad results I get, either I won't show you the Checkmate() one in so far it blurs too much. I've tried to ajust them with no sucess.

Then how the hell could I correct that frame without reverberations where not intended ? Only the face and the borders should be processed !

Ghitulescu
17th July 2012, 10:43
First of all, do you agree it is indeed dot crawl ?

Dot crawl can 100% sure be diagnosticised only on moving images :)

Dot crawl is caused by chroma interference with luma. So it should appear on the neck too :) as the same conditions apply there too.

sirt
17th July 2012, 10:54
Thanks, here is another examples :

http://img713.imageshack.us/img713/9894/test4ff.png

http://img163.imageshack.us/img163/3545/test5n.png

http://img62.imageshack.us/img62/8867/testzqr.png

(For the second one, I ignore rainbow)

Assuming it is dot crawl, what would you to correct it in accordance with my previous expectations ?

Emulgator
17th July 2012, 11:09
Yes, that looks like dot crawl. The saturation borders tell.
Rainbowing is in there as well. The left/right railing shows it.
I had good success with FFT in cases of dot crawl from SVHS recordings.
First you want to check which planes Y or (UV) are affected.
For Y F2Quiver with pairs of elliptical filters (nef=2,...)may help.
For UV F2QuiverUV with gp4 or bp4.
First test=true, then find the frequency spots and apply.
Both FFT filters eat up their domain, so need refixing.
F2Quiver eats up Y, F2QuiverUV eats up saturation and shifts hue.
You got to find out.

jmac698
17th July 2012, 11:13
I have some ideas for that that have never been used before. It is ntsc or pal? Can we have a short clip?

sirt
17th July 2012, 11:21
Emulgator

Do you refer to FFT3Dfilter ?

I have never went in for which planes are affected, so that's new to me ! Assuming I find the good ones, do you mean FFT3Dfilter can do the trick ?

jmac698

Thanks for your interest. I would be in rapture you to give me some ideas, unfortunately I can't share a short clip in so far - as I said - I am currently doing postprocessing at a video compression firm and the source is a YUV Uncompressed one that belongs to them.

Emulgator
17th July 2012, 11:23
Not FFT3D, but VCMohan's F2Quiver.
http://avisynth.org/vcmohan/

In my case the F2Quiver/UV combo left all details untouched and only removed what I intended to.
But setting the filters and their appropriate compensation may well take hours to adjust.

I would have tried Fizick's Defreq as well, but I haven't gotten it to work.
The frequency pattern showed, but I saw no effect when applied.
Maybe driver error on my side...

Didée
17th July 2012, 11:28
prefilter with removegrain(4).removegrain(11)
get vectors on prefilter
mdegrain3 the original, with high thSAD (800 or so)
get difference from mdegrain3
sieve difference by, again, removegrain(4).removegrain(11)
apply sieved difference


BTW, it seems pretty unclear what your original source actually is. The first screenshot is 800x533, the later ones are 1094x729. Varying resolution within one source is unlikely. None of those resolution is a standard res.

In any case, process dotcrawl *without* any resizing beforehand.

sirt
17th July 2012, 11:36
Thanks Emulgator and Didée. It looks like your ideas are really interesting, but unfortunately I really don't understand what to do. Would you give me an or several example(s) of your methods ? I don't ask for the "adjusted parameters" for my case of course but for one or several scripts to exemplify what you tell me to do.

EDIT : about my frames, it is just my mistakes, saving them unproperly, sorry.

Emulgator
17th July 2012, 11:43
Keep in mind: This might (and most probably will) not work for your source !
#[*#%%%%%%%%%%%%%%%%%%%%%%%%%%%%Start of DotCrawl Removal%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[*#-------------------------------------------------------------Start of Defreq-FFT---------------------------------------------------------
Defreq(fx=64.0, dx=2.0, fy=16.0, dy=6.0, sharp=8.0, fx2=64.0, dx2=2.0, fy2=-48.0, dy2=6.0, sharp2=8.0, fx3=44.0, dx3=2.0, fy3=-0.0, dy3=6.0, sharp3=8.0, fx4=44.0, dx4=2.0, fy4=32.0, dy4=6.0, sharp4=8.0, show=0, info=true, plane=0)
Defreq(fx=44.0, dx=2.0, fy=-32.0, dy=6.0, sharp=8.0, fx2=44.0, dx2=2.0, fy2=-64.0, dy2=6.0, sharp2=8.0, fx3=44.0, dx3=2.0, fy3=64.0, dy3=6.0, sharp3=8.0, fx4=64.0, dx4=2.0, fy4=-16.0, dy4=6.0, sharp4=8.0, show=0, info=true, plane=0)
Defreq(fx=0.0, dx=3.0, fy=63.9, dy=4.0, sharp=8.0, fx2=0.0, dx2=8.0, fy2=0.0, dy2=3.0, sharp2=8.0, show=0, info=true, plane=1)
Defreq(fx=0.0, dx=3.0, fy=63.9, dy=4.0, sharp=8.0, fx2=0.0, dx2=8.0, fy2=0.0, dy2=3.0, sharp2=8.0, show=0, info=true, plane=2)
#Defreq nje rabotajet !
*]#-------------------------------------------------------------End of Defreq-FFT---------------------------------------------------------
#[*#---------------------------------------------------------------Start of Y-FFT-----------------------------------------------------------
#Das folgende Y-Muster ist ein PAL-Beispiel, durch Dotcrawl verursacht, somit inhaltsabhänging
#und gilt nur für Sektionen mit hoher Rot-Sättigung wie 113687, 119200-119300 bzw. Blausättigung wie Frame 92800-92900
SmoothCurve(interp=100, limiter=false, Ycurve="0-16;18-25;50-70;110-150;180-220;255-255", Ucurve="0-0;127-127;255-255", Vcurve="0-0;127-127;255-255", show=false)#Pre für 5x Y-F2Quiver)
F2Quiver(nef=2, f1x1=176, f1y1=+60, f1x2=176, f1y2=+85, mf1=1.01, sh1=1, f2x1=176, f2y1=-50, f2x2=176, f2y2=-87, mf2=1.01, sh2=1)
F2Quiver(nef=2, f1x1=176, f1y1=+165, f1x2=176, f1y2=+210, mf1=1.005, sh1=1, f2x1=176, f2y1=-165, f2x2=176, f2y2=-210, mf2=1.005, sh2=1)
F2Quiver(nef=2, f1x1=232, f1y1=120, f1x2=232, f1y2=135, mf1=1.02, sh1=1, f2x1=232, f2y1=-120, f2x2=232, f2y2=-135, mf2=1.01, sh2=1)
F2Quiver(nef=2, f1x1=232, f1y1=+8, f1x2=232, f1y2=-8, mf1=1.03, sh1=1, f2x1=232, f2y1=+245, f2x2=232, f2y2=+255, mf2=1.1, sh2=1)
F2Quiver(nef=2, f1x1=90, f1y1=192, f1x2=110, f1y2=192, mf1=1.1, sh1=1, f2x1=90, f2y1=-192, f2x2=110, f2y2=-192, mf2=1.1, sh2=1)
#SmoothCurve(interp=100, limiter=false, Ycurve="0-0;30-30;110-120;160-175;255-255", Ucurve="0-0;127-127;255-255", Vcurve="0-0;127-127;255-255", show=false)#für 4x Y-F2Quiver)
SmoothCurve(show=false, interp=100, limiter=false, Ycurve="0-0;16-22;60-80;90-128;150-200;255-255", Ucurve="0-0;127-127;255-255", Vcurve="0-0;127-127;255-255")#Post für 5x Y-F2Quiver)
#F2Quiver(test=true)
#*]#---------------------------------------------------------------End of Y-FFT-----------------------------------------------------------
#SmoothCurve(show=true, interp=100, limiter=false, Ycurve="0-0;63-63;127-127;150-150;191-191;255-255", Ucurve="0-0;255-255", Vcurve="0-0;255-255")#zur Kontrolle
#[*#-------------------------------------------------------------Start of UV-FFT---------------------------------------------------------
SmoothTweak(hue1=+6, hue2=+6, saturation=1.05, show=false).F2QuiverUV("gp4", 0,255, degree=2)#gp4, degree=2 kompensiert die Ortsfrequenzen noch besser
#SmoothTweak(hue1=+13, hue2=+13, saturation=1.1, show=false).F2QuiverUV("bp4", 0, 165, degree=1)#bp=4, degree=1 war fast genau so erfolgreich.
#F2QuiverUV(test=true)
#*]#---------------------------------------------------------------End of UV-FFT---------------------------------------------------------
#unbt()
#*]#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%End of DotCrawl Removal%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


The Defreq() and unbt() sections I left in for testing reasons and to switch them on/off.

Yes, and as Didée just said: No resizing beforehand !

Didée
17th July 2012, 12:06
Here's the sieved MDegrain:

(Setup is made very slow on purpose.) :p
(Also, without having the egg in my hand, I can't tell how hard you can press without breaking the egg.)

YourSourceFilter("source.ext")
ConvertToYV12()
o=last

pre = o.removegrain(4).merge(o,0.5).removegrain(4).removegrain(11)
sup1 = pre.msuper()
sup2 = o.msuper(levels=1)

bvec3 = sup1.manalyse(isb=true, delta=3,blksize=16,overlap=8,search=5,searchparam=6,DCT=5)
bvec2 = sup1.manalyse(isb=true, delta=2,blksize=16,overlap=8,search=5,searchparam=6,DCT=5)
bvec1 = sup1.manalyse(isb=true, delta=1,blksize=16,overlap=8,search=5,searchparam=6,DCT=5)
fvec1 = sup1.manalyse(isb=false,delta=1,blksize=16,overlap=8,search=5,searchparam=6,DCT=5)
fvec2 = sup1.manalyse(isb=false,delta=2,blksize=16,overlap=8,search=5,searchparam=6,DCT=5)
fvec3 = sup1.manalyse(isb=false,delta=3,blksize=16,overlap=8,search=5,searchparam=6,DCT=5)

mdg = o.mdegrain3(sup2,bvec1,fvec1,bvec2,fvec2,bvec3,fvec3,thSAD=800) # drop to 600 or 400 ifyoucan ... raise to 1200 ifyoumust ...

diff = mt_makediff(o,mdg,U=3,V=3)
diff2 = mt_lutxy(diff,diff.removegrain(4).merge(diff,0.5).removegrain(4).removegrain(11),
\ "x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")

mdg.mt_adddiff(diff2,U=2,V=2)

stackhorizontal(o,last)
return(last)

sirt
17th July 2012, 13:36
Thank you both for the time spent to write this. Unfortunately, you are not lucky with me because it is still hard for to get what you have exactly done.

Emulgator :

Let's say I want to use your script on a frame (with trim function for example). How can I ? Must I save it as an .avs file and try to apply it with :

a=Emulgator()
trim(0,1) + a+trim(2,3) + trim(3,0)

Didee :

My question is the same even though your script directly works on AVSP.

Emulgator
17th July 2012, 13:44
va=(Sourcefilter)
dedot=(EmuFFT....)
firstframetodedot=100
lastframetodedot=200
Trim(va,0,frametoDeDot-1)++Trim(dedot,firstframetodedot,lastframetodedot)++Trim(va,lastframetodedot+1,0)
#with the usual exception of the first and last frame...

Didée
17th July 2012, 14:46
BTW ... Is the source footage progressive, at least? All of a sudden, I got the fear that it might be hard telecined in fact, and you just manually selected some of the progressive frames for posting ...

sirt
17th July 2012, 15:32
Didée : indeed, the source is an interlaced NTSC one ! I firstly iVTCed it without cropping either resizing it (I do have to do encoding tests with my compression firms's own h264 encoder on PROGRESSIVE stuff at that time) ; I guess that has an importance...

sirt
20th July 2012, 20:39
Then Didée have you vanished ?

Bloax
20th July 2012, 20:51
He had a heart attack after your latest post. ;)

sirt
20th July 2012, 21:02
Well I would rather prefer him helping me to ajust an existing filter or write a new one from zero ! Nothing works there whatever I tried:

- Dedot : zero

- Tcomb : not enough for my taste

- Lutdecrawl : zero

- Checkmate : it deletes some dot crawl at least but blends unexpected areas

Of course I maybe don't manage to set them correctly. So I suggest you jsaving one of the frames below and trying to remove this awful dot crawl ! It is terribly hard in my opinion..

Reel.Deel
20th July 2012, 21:08
Is always best is you post a small sample.

sirt
20th July 2012, 21:22
Unfortunately it is NOT possible. Not only I would violate the rules but also the source is not my own property as I said ; I just have the right to test them, that's all. I think you can try to solve one of the frames below (check my second post), it would be the same.

Bloax
20th July 2012, 21:43
All the proposals here have been temporal ones, you can't do anything about dotcrawl on a still image. (Though you can shoot in the dark like they have.)

And I don't think anyone would mind if you posted a snippet (save for overly paranoid persons, but they get what they deserve from their actions if that's the case).
Even if it's not your own property, it's not like you're giving the entire thing away.

Though what do I know about srs bsnses.

SassBot
20th July 2012, 22:01
Unfortunately it is NOT possible. Not only I would violate the rules but also the source is not my own property as I said ; I just have the right to test them, that's all. I think you can try to solve one of the frames below (check my second post), it would be the same.

No one can help you with only screenshots. Dot crawl removal uses temporal filtering.

kypec
21st July 2012, 07:47
Post 50 successive screenshots then, clever people will know how to join them back into a clip if you're so paranoid ;)

Reel.Deel
21st July 2012, 15:46
Since you're unable to post a sample, here's a few suggestions that may or may not work.

DeCross (http://nullinfo.s21.xrea.com/) - Cross color reduction plugin.
DeCrawl (http://avisynth.org/warpenterprises/) - Another dot crawl removal plugin.
Dot Crawl Comb Filter (http://home.earthlink.net/~tacosalad/video/dotcrawl.html) - A VirtualDub plugin.

Lastly, you might want to look at this Japanese Avisynth wiki page (http://www.avisynth.info/?%A5%C9%A5%C3%A5%C8%CB%B8%B3%B2%C4%E3%B8%BA%A1%A6%A5%AF%A5%ED%A5%B9%A5%AB%A5%E9%A1%BC%BD%FC%B5%EE) regarding plugins for rainbow and dot crawl removal.

Good Luck!!

sirt
23rd July 2012, 09:03
Thanks I'm abou to give a try to some of them !

sirt
23rd July 2012, 10:03
Okay, I gave a try to the VDfilter. Then I import it like this :

LoadVirtualdubPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\dotcrawl.vdf","dotcrawl")
a=converttorgb32().dotcrawl().converttoyv12()
trim(0,2068) + a.trim(2069,2069) + trim(2070,0)

But the result is not great ; at least, it influences on the dot crawl but also elsewhere and it ends in blur. I would like to adjust it but I don't know if that is possible. Here are original and filtered frame :

http://img17.imageshack.us/img17/1594/testau.png

http://img39.imageshack.us/img39/6632/test2b.png

As you see it doesn't only apply where needed and it blurs too much.

Didée
23rd July 2012, 10:22
In post#11 I gave you a script to try.

In #18 you wondered if I had vanished, but you never wrote one single letter about the results of that script.

Did you even try it?


In any case: dot crawl has been issued a thousand times already, and plenty of measures have come to light.

Search on the topic, try what has been posted.

It is a pity if you cannot provide a source sample. But then, that is YOUR problem, not OURS.

jmac698
23rd July 2012, 10:29
Here's a list of dot crawl filters

DeDot
http://nullinfo.s21.xrea.com/cgi/counter/count.xcg?down=DeDot_YV12_0002.zip

DeCross
http://nullinfo.s21.xrea.com/cgi/counter/count.xcg?down=DeCross0002.zip

DeCrawl
http://avisynth.org/warpenterprises/files/decrawl_20060924.zip

GuavaComb
http://avisynth.org/warpenterprises/files/guavacomb_25_dll_20030801.zip

DotCrawl (vdf)
http://home.earthlink.net/~tacosalad/video/dotcrawl.html

AntiBlink
http://avisynth.org/warpenterprises/files/antiblink_20_dll_20020919.zip
Oops, this is a DeRainbow, and needs an old VC runtime.

BiFrost
http://ivtc.org/avisynth/bifrost-1.1.zip
DeRainbow

cc
http://www.chiyoclone.net/dl/cc_20040522.lzh

LUTDeCrawl
http://www.aquilinestudios.org/scripts/LUTDeCrawl-20081003.avsi

GuavaComb
http://avisynth.org/warpenterprises/files/guavacomb_25_dll_20030801.zip

TComb
http://bengal.missouri.edu/~kes25c/TCombv2B2.zip

sirt
23rd July 2012, 10:30
Didée, I didn't try it because you said that it should not work with such telecined material. But I will give it a try immediately then.

If I provided a sample of the source, then the thread would be probably closed because, as I said, we work with such content at my firm and it is not (directly) commercial stuff.

Didée
23rd July 2012, 10:38
Sure you can use it, but only after doing IVTC. My concern was if, maybe, you were throwing filters directly at an interlaced (or sort of) source.

See - we other people here have basically no clue what you have and what you do. We only see one screenshot. Over and over again.

sirt
23rd July 2012, 10:43
Thanks jmac698, than I will have to try those I haven't tried yet.

Didée, here are the results :

I applied your script like this :
...

a=mdg.mt_adddiff(diff2,U=2,V=2)

trim(0,2068) + a.trim(2069,2069) + trim(2070,0)

http://img17.imageshack.us/img17/1594/testau.png

http://img812.imageshack.us/img812/5791/test2didee.png
It looks fine but the hair and unexpected areas are blurred such as the neck. I tried with thSAD=400 and it even better even though same parts are still affected. It also derainbows but I don't want ti to do that.

Howhever, it is by far betten than any filter I've tried. On the other hand, I think those blurred areas are probably due the configuration of the script but I have not a precise idea of what you did right there so I think I won't be able to adjust it by myself. Moreover, I will have to do it again elsewhere according to the area (such as the dotcrawled sea above), won't I ?

EDIT : here ae the results somewhere else:

http://img37.imageshack.us/img37/3565/test3xo.png

http://img696.imageshack.us/img696/5215/test4y.png

But of course the script may be different in such scene.

jmac698
23rd July 2012, 11:56
I tried all the filters, I couldn't get any to have a noticable effect.

Composite Artefacts Package
http://forum.doom9.org/showthread.php?p=1584055#post1584055

Contains all the above filters.

jmac698
23rd July 2012, 12:40
@EmulGator
I don't see any peaks it seems to me
http://screenshotcomparison.com/comparison/137011
or
http://www.sendspace.com/file/jfyq71

sirt
23rd July 2012, 12:49
jmac698 thanks for having tried those filters too. I've download both zip packges you offer and them come two avs : dot crawl and dto crawl2. Are they test ?

I've decided to upload a short sample of the compressed source : http://www.sendspace.com/file/gkhehn

jmac698
23rd July 2012, 13:08
Yes those are the tests I used with your clip.

I can start an explanation of how the FQuiver works, but it would require some advanced knowledge to fully understand it.

Imagine a line, 1 pixel high, with one color. This would be a frequency of 0. If this line instead had two ripples on it, meaning it starts at grey, goes to white, then grey, black, and grey again, it would be a frequency of 1.
This would then show as a white dot in the mode="test", located just to the side of the center of the graph.
If the line were vertical, the dot would appear above the center.
What does a wavy line have to do with real pictures? Well it's possible to exactly break up a real picture into wavey lines. There's not much point in trying to imagine this, however, just know that the sharper edges mean higher frequencies.
The next thing to know is that dot crawl is a *perfect* wavy line.
Now you can see why we broke up the picture based on it's composite wavey lines - it's because the dot crawl should stand out as a bright dot. There should be a bright dot horizontally, somewhere close to the center of the graph.
The filtering command will erase only this kind of wavey line, so it takes out the dot crawl.

The basic procedure is to look at the graph and find the bright spots, then measure their coordinates, and put those coordinates into a filtering command. The bright spots should be consistent on frames which show dot crawl.

If we erased the one horizontal dot, it would be equivalent to a notch filter in electronic terms.

I don't have experience with this method, so EmulGator can correct me if I'm wrong.

Reel.Deel
23rd July 2012, 13:17
Here is another attemp at dot crawl removal by *.mp4guy (http://forum.doom9.org/showthread.php?p=1379930#post1379930)

@ jmac698

Maybe you can also add it to the composite's package.

jmac698
23rd July 2012, 13:25
I could, but writing instructions for it is a problem. To really do this I'd have to find a working example and spend a lot of time writing it up.
Maybe EmulGator could be drafted into submitting something?

sirt
23rd July 2012, 13:27
Thanks jmac698, it looks like it is not something I can do on m own at all, it is really hard.

Thanks Reel.Deel ; I've seen the filter you refer to but I couldn't make it work for some reason. Got the code at the top of the linked page and saved it as unbt.avs, the I called it like this :

Import("C:\Program Files (x86)\AviSynth 2.5\plugins\unbt.avs")
unbt()

(It is just to see if it works)

But I get this message :

Scripterror : there is no function named "medianblurt"

Bloax
23rd July 2012, 13:29
It looks fine but the hair and unexpected areas are blurred such as the neck.
I of course can't see it in motion, but by the looks of it with my useless eyes - it doesn't blur the neck.
It just merely removes the artifacts that look like details.

sirt
23rd July 2012, 13:32
Well sorry for having badly expressed myself. If you prefer, it removes details where I think it is not needed. What I would like is only the dot crawl circling the face to be processed and possibly the shoulder. But, even if we (or I) find a solution for this picture and to some extent for the entire scene (something like 100 frames), I guess I will have to configure it again for the rest of the video.

Reel.Deel
23rd July 2012, 13:34
If I'm not mistaken, you need the MedianBlur (http://avisynth.org/tsp/) plugin.

Edit: I have not tested this. Since you finally uploaded a sample, I'll stop throwing out blind suggestions. :)

Bloax
23rd July 2012, 13:41
Well sorry for having badly expressed myself. If you prefer, it removes details where I think it is not needed. What I would like is only the dot crawl circling the face to be processed and possibly the shoulder.
Sacrifices are to be made to achieve (pretty good, IMHO) results. :-)

sirt
23rd July 2012, 13:51
If I'm not mistaken, you need the MedianBlur (http://avisynth.org/tsp/) plugin.

Edit: I have not tested this. Since you finally uploaded a sample, I'll stop throwing out blind suggestions. :)

In fact I don't have a problem uploading a sample of the compressed video I have to solve and try to compare to the uncompressed one. But according to the rules (rule 6) I should not upload an example of source that is not commercial. That's why I though dealing with pictures would be more acceptable in such conditions.

Reel.Deel, I got medianblur and..I face another nasty error :

Scripterror : there is no function named "Average"

sirt
23rd July 2012, 13:52
Sacrifices are to be made to achieve (pretty good, IMHO) results. :-)

Bloax, well I don't like areas that have no reason to be processed to be damaged more.

jmac698
23rd July 2012, 13:56
Maybe it's this one?
http://forum.doom9.org/archive/index.php/t-100626.html

If something is missing, just write it's name and "avisynth plugin" to search for it.
There is a way to tell if you have the right one, see how it's used in the script, then see how the replacement you found is used, and they should look similar.
For example

Average(alpha, 0.5, beta, 0.5)

Is the one I linked. How does it look in your script?
alpha, beta are names of video clips. 0.5 is a multiplier amount.

This is a big problem people have over and over. I know a solution, but I have to write it, my idea is a generator for plugins and a hosting site for them, so they are always documented, and also an extension to editors to document the checksum of all plugins added to the script.

sirt
23rd July 2012, 14:03
Thanks jmac698. Unfortunately it looks like the average.dll is not avaible from this page, all I can get is the .h and the source code.

jmac698
23rd July 2012, 14:06
Search!
http://avisynth.org/mediawiki/External_filters#As_Yet_Unclassified

sirt
23rd July 2012, 14:10
Search!
http://avisynth.org/mediawiki/External_filters#As_Yet_Unclassified

I did ! I read trough the whole thread and your link. It looks like the dll is missing and some people reuploaded it but all links are dead. It woul be fine is somebody that has it reupload it.

Reel.Deel
23rd July 2012, 14:13
You can download Average here (http://forum.doom9.org/showthread.php?t=118430).

Edit: The dll is located under "Release"

jmac698
23rd July 2012, 14:14
My apologies. I've updated the wiki itself so it has correct links :)

sirt
23rd July 2012, 14:15
You can download Average here (http://forum.doom9.org/showthread.php?t=118430).

Thanks but all I found there is the source code again...

Guest
23rd July 2012, 14:17
But according to the rules (rule 6) I should not upload an example of source that is not commercial. What do you mean by "not commercial"? Where did you get the source?

Reel.Deel
23rd July 2012, 14:18
Download the zip and look under src - release.

sirt
23rd July 2012, 14:26
neuron2 : we, at my firm, work with sources destined to TV or another type of broadcast. Then, I mostly work with uncompressed YUV videos and compressed videos such as the one here (in MPEG2). As I said, it not my property but it is the property of the video firm I work in. I am only allowed to process the source at my work (it is avaible on one of their servers in MPG format), test the efficiency of avisynth filters with their new encoder (in this case EAVC4). My purpose is to try to correct the source then encode a few portion in different ways and compare the result.

sirt
23rd July 2012, 14:28
Download the zip and look under src - release.

Yes, there is no dll avaible, only source code (ccp ect).

jmac698
23rd July 2012, 14:34
It is there, for some reason you can't find it.
I put it also here:
http://www.sendspace.com/file/bjd6k0

sirt
23rd July 2012, 14:47
Thanks, I ma be blind. Well I've tried differetn parameters with unbt but it difforms boundaries, so it is not great. As from I testes, the script by Didée looks great but it deletes some wanted details (around the neck, hair, shoulder). I will have tot try FQever then.

sirt
23rd July 2012, 14:53
So here is the code by Emulgator :

#[*#%%%%%%%%%%%%%%%%%%%%%%%%%%%%Start of DotCrawl Removal%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[*#-------------------------------------------------------------Start of Defreq-FFT---------------------------------------------------------
Defreq(fx=64.0, dx=2.0, fy=16.0, dy=6.0, sharp=8.0, fx2=64.0, dx2=2.0, fy2=-48.0, dy2=6.0, sharp2=8.0, fx3=44.0, dx3=2.0, fy3=-0.0, dy3=6.0, sharp3=8.0, fx4=44.0, dx4=2.0, fy4=32.0, dy4=6.0, sharp4=8.0, show=0, info=true, plane=0)
Defreq(fx=44.0, dx=2.0, fy=-32.0, dy=6.0, sharp=8.0, fx2=44.0, dx2=2.0, fy2=-64.0, dy2=6.0, sharp2=8.0, fx3=44.0, dx3=2.0, fy3=64.0, dy3=6.0, sharp3=8.0, fx4=64.0, dx4=2.0, fy4=-16.0, dy4=6.0, sharp4=8.0, show=0, info=true, plane=0)
Defreq(fx=0.0, dx=3.0, fy=63.9, dy=4.0, sharp=8.0, fx2=0.0, dx2=8.0, fy2=0.0, dy2=3.0, sharp2=8.0, show=0, info=true, plane=1)
Defreq(fx=0.0, dx=3.0, fy=63.9, dy=4.0, sharp=8.0, fx2=0.0, dx2=8.0, fy2=0.0, dy2=3.0, sharp2=8.0, show=0, info=true, plane=2)
#Defreq nje rabotajet !
*]#-------------------------------------------------------------End of Defreq-FFT---------------------------------------------------------
#[*#---------------------------------------------------------------Start of Y-FFT-----------------------------------------------------------
#Das folgende Y-Muster ist ein PAL-Beispiel, durch Dotcrawl verursacht, somit inhaltsabhänging
#und gilt nur für Sektionen mit hoher Rot-Sättigung wie 113687, 119200-119300 bzw. Blausättigung wie Frame 92800-92900
SmoothCurve(interp=100, limiter=false, Ycurve="0-16;18-25;50-70;110-150;180-220;255-255", Ucurve="0-0;127-127;255-255", Vcurve="0-0;127-127;255-255", show=false)#Pre für 5x Y-F2Quiver)
F2Quiver(nef=2, f1x1=176, f1y1=+60, f1x2=176, f1y2=+85, mf1=1.01, sh1=1, f2x1=176, f2y1=-50, f2x2=176, f2y2=-87, mf2=1.01, sh2=1)
F2Quiver(nef=2, f1x1=176, f1y1=+165, f1x2=176, f1y2=+210, mf1=1.005, sh1=1, f2x1=176, f2y1=-165, f2x2=176, f2y2=-210, mf2=1.005, sh2=1)
F2Quiver(nef=2, f1x1=232, f1y1=120, f1x2=232, f1y2=135, mf1=1.02, sh1=1, f2x1=232, f2y1=-120, f2x2=232, f2y2=-135, mf2=1.01, sh2=1)
F2Quiver(nef=2, f1x1=232, f1y1=+8, f1x2=232, f1y2=-8, mf1=1.03, sh1=1, f2x1=232, f2y1=+245, f2x2=232, f2y2=+255, mf2=1.1, sh2=1)
F2Quiver(nef=2, f1x1=90, f1y1=192, f1x2=110, f1y2=192, mf1=1.1, sh1=1, f2x1=90, f2y1=-192, f2x2=110, f2y2=-192, mf2=1.1, sh2=1)
#SmoothCurve(interp=100, limiter=false, Ycurve="0-0;30-30;110-120;160-175;255-255", Ucurve="0-0;127-127;255-255", Vcurve="0-0;127-127;255-255", show=false)#für 4x Y-F2Quiver)
SmoothCurve(show=false, interp=100, limiter=false, Ycurve="0-0;16-22;60-80;90-128;150-200;255-255", Ucurve="0-0;127-127;255-255", Vcurve="0-0;127-127;255-255")#Post für 5x Y-F2Quiver)
#F2Quiver(test=true)
#*]#---------------------------------------------------------------End of Y-FFT-----------------------------------------------------------
#SmoothCurve(show=true, interp=100, limiter=false, Ycurve="0-0;63-63;127-127;150-150;191-191;255-255", Ucurve="0-0;255-255", Vcurve="0-0;255-255")#zur Kontrolle
#[*#-------------------------------------------------------------Start of UV-FFT---------------------------------------------------------
SmoothTweak(hue1=+6, hue2=+6, saturation=1.05, show=false).F2QuiverUV("gp4", 0,255, degree=2)#gp4, degree=2 kompensiert die Ortsfrequenzen noch besser
#SmoothTweak(hue1=+13, hue2=+13, saturation=1.1, show=false).F2QuiverUV("bp4", 0, 165, degree=1)#bp=4, degree=1 war fast genau so erfolgreich.
#F2QuiverUV(test=true)
#*]#---------------------------------------------------------------End of UV-FFT---------------------------------------------------------
#unbt()
#*]#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%End of DotCrawl Removal%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

He gave me some explanation to use it :

va=(Sourcefilter)
dedot=(EmuFFT....)
firstframetodedot=100
lastframetodedot=200
Trim(va,0,frametoDeDot-1)++Trim(dedot,firstframetodedot,lastframetodedot)++Trim(va,lastframetodedot+1,0)

I may be dumb again but I don't understand how to use it ! Let's say I want to apply this script, like it is written with F2Quiver and/or Dfreq, SmoothCurve.

jmac698
23rd July 2012, 15:18
You can get it to run, but the settings he used to erase the dot crawl were particular to his sample source. You must find your own settings. To do this, you need to run the script I gave which puts quiver in test mode. Then you must visually find some areas which represent your dot crawl.
I tried this but couldn't find the areas. I cannot help any more. I tried to explain it, but it's too complicated.

sirt
23rd July 2012, 15:23
Of course, I have aken in account what you asked me for. My problem is almost simple : I don't get how to use the script !

What am I supposed to write there :

va=(Sourcefilter)
dedot=(EmuFFT....)
firstframetodedot=100
lastframetodedot=200
Trim(va,0,frametoDeDot-1)++Trim(dedot,firstframetodedot,lastframetodedot)++Trim(va,lastframetodedot+1,0)

as SouceFilter, EmuFFT ?

jmac698
23rd July 2012, 16:16
Source Filter means, a way to open your video file.
For example, va=DirectShowSource("music video.mpg")
You don't actually need all of his script. For example, I believe the purpose of the SmoothFilter line was just to make the video look better.
The main line to remove dot crawl could just be a quiver command.
I don't know what he meant by EmuFFT.

Perhaps you can work on another project until you get a reply in some days.

Didée
23rd July 2012, 20:35
How do you make a fishing net? -- Take ninety-thousand holes, and knot them together. ;)

# Required plugins:
# -----------------
# dgdecode.dll
# TIVTC.dll
# mt_masktools.dll
# removegrain.dll
# repair.dll
# frfun7.dll

mpeg2source("G:\Video\_Work\_dotcrawl\dot_crawled.d2v")

borders = bicubicresize(width()/2,height()/2).bicubicresize(width()+8,height())
stackhorizontal(borders.crop(0,0,4,0),last,borders.crop(width()+4,0,0,0))

o=last ox=o.width() oy=o.height()

drr = o.separatefields().vinverse2().weave()
both = stackhorizontal(drr,o)
IVTC = both.tfm(pp=0,clip2=stackhorizontal(drr,drr)).tdecimate()
raw = IVTC.crop(ox,0,ox,oy)
clean1 = IVTC.crop(0,0,ox,oy)

D1 = mt_makediff(raw,clean1)
D8 = D1.bicubicresize(ox/2-72,oy).blur(1,0).bicubicresize(ox,oy,1,0)
D9 = mt_lutxy(D1,D8,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
clean1a = clean1.mt_adddiff(D9,U=2,V=2)
clean1b = clean1a.frfun7(1.01,8,1)

allD = mt_makediff(raw,clean1b).greyscale()
shrpD = mt_makediff(clean1b,clean1b.removegrain(20))
DD = shrpD.repair(allD,13,0).mt_lutxy(shrpD,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
clean1c = clean1b.mt_lutxy(clean1a,"x 3 + y < x 2 + x y < x 1 + x 3 - y > x 2 - x y > x 1 - x ? ? ? ?",U=2,V=2)
\.mt_adddiff(DD.sbr(),U=2,V=2)

raw = raw.crop(4,0,-4,0,true)
clean1c = clean1c.crop(4,0,-4,0,true)

interleave(raw,clean1c) # interleave "only-IVTC" with result of full filterchain, for frame comparison
# clean1c # just result
return(last)

#--- end of script ---#

#######################################################

#--- Helper functions below ---#

function Vinverse2(clip clp, float "sstr", int "amnt", int "uv")
{
uv = default(uv,3)
sstr = default(sstr,2.7)
amnt = default(amnt,255)
uv2 = (uv==2) ? 1 : uv
STR = string(sstr)
AMN = string(amnt)
vblur = clp.sbrV()
vblurD = mt_MakeDiff(clp,vblur,U=uv2,V=uv2)
Vshrp = mt_LutXY(vblur,vblur.mt_convolution("1","1 2 1"),expr="x x y - "+STR+" * +",U=uv2,V=uv2)
VshrpD = mt_MakeDiff(Vshrp,vblur,U=uv2,V=uv2)
VlimD = mt_LutXY(VshrpD,VblurD,expr="x 128 - y 128 - * 0 < x 128 - abs y 128 - abs < x y ? 128 - 0.25 * 128 + x 128 - abs y 128 - abs < x y ? ?",U=uv2,V=uv2)
mt_AddDiff(Vblur,VlimD,U=uv,V=uv)
(amnt>254) ? last : (amnt==0) ? clp : mt_LutXY(clp,last,expr="x "+AMN+" + y < x "+AMN+" + x "+AMN+" - y > x "+AMN+" - y ? ?",U=uv,V=uv)
return(last)
}

function sbr(clip o) {
rg11=o.removegrain(11)
rg11D=mt_makediff(o,rg11)
rg11DD=mt_makediff(rg11D,rg11D.removegrain(11)).mt_lutxy(rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
o.mt_makediff(rg11DD,U=2,V=2)
}

function sbrV(clip o) {
rg11=o.mt_convolution("1","1 2 1")
rg11D=mt_makediff(o,rg11)
rg11DD=mt_makediff(rg11D,rg11D.mt_convolution("1","1 2 1")).mt_lutxy(rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
o.mt_makediff(rg11DD,U=2,V=2)
}

Apart from IVTC, all filtering in fact is purely spatial. Not any temporal filter is involved.

http://thumbnails80.imagebam.com/20285/09b25e202846587.jpg (http://www.imagebam.com/image/09b25e202846587) <--> http://thumbnails77.imagebam.com/20285/6c9444202846596.jpg (http://www.imagebam.com/image/6c9444202846596)

http://thumbnails85.imagebam.com/20285/441478202846605.jpg (http://www.imagebam.com/image/441478202846605) <--> http://thumbnails44.imagebam.com/20285/5614e2202846616.jpg (http://www.imagebam.com/image/5614e2202846616)

http://thumbnails85.imagebam.com/20285/e57a83202846624.jpg (http://www.imagebam.com/image/e57a83202846624) <--> http://thumbnails86.imagebam.com/20285/303a44202846639.jpg (http://www.imagebam.com/image/303a44202846639)

Sorry, for the screenshots I forgot to crop the 4 pixels left/right that are added in the script.

sirt
23rd July 2012, 20:46
Oops Didée I pmed you beofre seing this. I thank you, I can't wait to test this tomorrow !

jmac698
24th July 2012, 01:37
Good job Didée! Can I add it to the composite artefacts package?

Reel.Deel
24th July 2012, 04:24
sirt:
Now all you need is some derainbowing and you'll be good to go!;)

Didée:
The results look great. I tried it with a few different samples (anime and film) and this script seems to do a excellent job on all of them.
I'm truly amazed at what Avisynth can accomplish under the hands of a skilled operator. Thanks Didée!

I have a few questions, if you don't mind?
What are some of the key parameters that dictate the strength of the dot crawl detection and or removal?
Also, what does one have to do in order to be able to process progressive/interlaced NTSC and PAL? Removing TFM and TDecimate seems too easy. :)

sirt
24th July 2012, 08:54
Reel.Deel

Yes, In fact I've filtered that separetly in an adaptative way according to the scenes of the video.

Didée

Fantastic ! It's quite good. Thanks for your time and efforts spent on this.

I would like to thank everybody that helped me on this subject.

One question more remains pending...here Didée iVTCed my source and based his work on raw and clean1. But let's say I would like to apply the code on an AVI source as Input that has been ivtced, which means I would also use the script after iVTC like there, how could you do ? I've reflected about this but I'm lost, it looks like I will have to modify too many things. Do you have a suggestion ?

Ghitulescu
24th July 2012, 09:05
http://thumbnails86.imagebam.com/20285/303a44202846639.jpg (http://www.imagebam.com/image/303a44202846639)

Is it only me the one that doesn't see the full image?

jmac698
24th July 2012, 09:57
It was a link a image host
http://www.imagebam.com/image/303a44202846639

Didée
24th July 2012, 10:30
@Ghitulescu
Don't know how it looks on your side, but for me at least, ImageBam surely shows the full images.
Just in case - those pics zipped (http://www.mediafire.com/?q0rbo4ksz65k55z).

@sirt
If a video already has been IVTC'ed, then everything is different. Remember
[from PM]
dotcrawl is not always the same, and very small differences in the characteristics can make the difference between "filter works" and "filter fails".

The posted script relies on a very certain symmetry being present in the dotcrawl's pixel-pattern. If IVTC already has been done beforehand, that symmetry has been destroyed. Those things that "naturally cancel-out each other" prior to IVTC, will not cancel-out anymore after IVTC.

sirt
24th July 2012, 10:51
@sirt
If a video already has been IVTC'ed, then everything is different. Remember


The posted script relies on a very certain symmetry being present in the dotcrawl's pixel-pattern. If IVTC already has been done beforehand, that symmetry has been destroyed. Those things that "naturally cancel-out each other" prior to IVTC, will not cancel-out anymore after IVTC.

Didée then you won't like what I will ask for...obviously I will use your script if I plan on using tfm. But, in the case I have an AVI source which is progressive (that has been ivtced upstream) or whatever the source, consider it had previously been iVTCEd. In this situation, do you think you can write a spatial script similar to the last one where you used my sample MPG source or is it totally irrelevant and requires too much time ? I know it is different, but yesterday you made some temporal script that applies on the iVTCed video, that's why I'm asking for a spatial script now.

I know it is somewhat twisted but I am also corecting patterns manually and I don't want to use an automatic tfm as you did.

Didée
24th July 2012, 12:18
Whatever. If IVTC has been done already, then you left the field of certainty, and are in the swamp of vague possibilities.

Try FRFun7 on its own, this alone often snaps surprisingly nice onto dotcrawl. But, it always will also soften the picture ... propably it is indicated to shoot back with "shift-values-two-notches-back", or contrasharpen, or both together.

You can teach how to swing the racket, but not how to get the feeling for the ball.

sirt
24th July 2012, 13:27
Thanks Didée, I'm giving it a try. It is really not bad when taking your time to adjust it !

jmac698
24th July 2012, 13:32
In your case, maybe you don't need automated IVTC at all. There could be one constant pattern throughout the whole video, so you can use that pattern and there will never be a mistake.
If the pattern changes, it's likely at scene changes when it was edited. A check could be made at those points.

sirt
24th July 2012, 13:39
In your case, maybe you don't need automated IVTC at all. There could be one constant pattern throughout the whole video, so you can use that pattern and there will never be a mistake.
If the pattern changes, it's likely at scene changes when it was edited. A check could be made at those points.

jmac698, thanks for your advise. As part of my daily task, I am not neccessarly required to "manually ivtc" the input. The idea is to iVTC the video then test such and such filters. In this case, it turns out the pattern is indeed constant but even if it would not be I would not be compelled to solve it perfectly. I was just asking in case in fact, but using tfm is ample !

Ghitulescu
24th July 2012, 14:06
It was a link a image host
http://www.imagebam.com/image/303a44202846639
I am talking about this
http://oi47.tinypic.com/eun054.jpg

It happens to all images posted on imagebam.com.

@Ghitulescu
Don't know how it looks on your side, but for me at least, ImageBam surely shows the full images.
Just in case - those pics zipped (http://www.mediafire.com/?q0rbo4ksz65k55z).
Thanks.

Groucho2004
24th July 2012, 14:37
It happens to all images posted on imagebam.com.The problem must be on your side. It seems everyone else can view the images.

Reel.Deel
24th July 2012, 16:29
Hello, I have some examples (http://www.mediafire.com/?dyfu97i4v60o3aa) of dot crawl in NTSC interlaced footage. QTGMC does a good job at removing most of it, but it still leaves subtle hints of the existing dot crawl. Using Didée's solution before QTGMC helps almost completely eliminate the remaining dot crawl. Here is the change I made to dot crawl script to make it work (at least I think) with the interlaced footage.

........
drr = o.separatefields().vinverse2().weave()
both = stackhorizontal(drr,o)
IVTC = both # Removed TFM and TDecimate.
raw = IVTC.crop(ox,0,ox,oy)
clean1 = IVTC.crop(0,0,ox,oy)
........
The rest of the script is the same and its followed by

QTGMC(preset="slower",EdiMode="NNEDI3", EdiThreads=2)

The results look fine to me but I was wondering if there's a better way to go about this?

sirt
24th July 2012, 17:14
Great. Would you like showing some frames comparison then ?

Reel.Deel
25th July 2012, 06:48
So doing a little bit more testing I found out that simply just removing TFM and TDecimate does not work.
It seems as Vinverse2() does a partial vertical pixel shift. Processing the interlaced content as individual frames produced better results. Here's the comparison (http://www.mediafire.com/?x5arvuy4dht8aoz).
........
o=last.separatefields() ox=o.width() oy=o.height()

drr = o.vinverse2() # Removed separatefields and weave
both = stackhorizontal(drr,o)
IVTC = both # Removed TFM and TDecimate.
........
The rest of the script is the same and it's followed by

QTGMC(preset="slower",EdiMode="NNEDI3", EdiThreads=2)

sirt
25th July 2012, 08:03
Even though Dot crawl + QTGMC solve much more things such as the baloons, I don't think using QTGMC is a good idea given that it is a deinterlacer. It echoes badly on man's shirt for example and on the bricks of the wall behind.

Reel.Deel
25th July 2012, 15:57
Yeah i noticed that too. By separating fields, the frames are not completely aligned as well. I'm guessing that's causing the artifacts. I give up, I'll just use it on telecined material :(.

sirt
25th July 2012, 18:02
Yes, its difficult. It's possible Emulgator has another suggestions. We'll see.

mastrboy
21st August 2012, 23:19
How do you make a fishing net? -- Take ninety-thousand holes, and knot them together. ;)

--Script stripped away to avoid over-quoting--

Apart from IVTC, all filtering in fact is purely spatial. Not any temporal filter is involved.

You did it again, of all the dot-crawl battles i have had, this script seems to solve the in-motion/panning dot-crawl i never seem to get rid of with any other scripts or filters :)

But, I'm trying to convert your script into a easier to use function in combination with ApplyRange/ReplaceFramesSimple, and was hoping you could give some insight into the following questions:

If i wanted to add a strength parameter, which values should be changeable from the function?
What is the purpose of adding borders and then removing them, and why not just use AddBorders? (I'm sure there's a reason I'm not getting my head around)
ApplyRange does not seem to work with: ApplyRange(511,528,decrawler,pre_ivtc,post_ivtc), only gives "Invalid arguments to function width". Can't ApplyRange pass clip arguments?
Do you see any screw ups in the following function:


# Example usage and function definition
MPEG2Source("D:\crawl-test\VTS_01_1.d2v")
pre_ivtc_clip = last
post_ivtc = TFM(slow=2,clip2=nnedi3())
post_ivtc
test = decrawler(pre_tfm=pre_ivtc_clip,post_tfm=post_ivtc).Subtitle("decrawled")
ReplaceFramesSimple(post_ivtc, test,mappings="[511 528]")
TDecimate(mode=1,denoise=true)

function decrawler(clip "pre_tfm", clip "post_tfm") {
post_tfm
borders = bicubicresize(width()/2,height()/2).bicubicresize(width()+8,height())
raw = stackhorizontal(borders.crop(0,0,4,0),last,borders.crop(width()+4,0,0,0))

pre_tfm
borders = bicubicresize(width()/2,height()/2).bicubicresize(width()+8,height())
stackhorizontal(borders.crop(0,0,4,0),last,borders.crop(width()+4,0,0,0))

o=last
ox=o.width()
oy=o.height()

drr = o.separatefields().vinverse2().weave()
clean1 = drr.MergeHints(hintClip=post_tfm).tfm(PP=0)

D1 = mt_makediff(raw,clean1)
D8 = D1.bicubicresize(ox/2-72,oy).blur(1,0).bicubicresize(ox,oy,1,0)
D9 = mt_lutxy(D1,D8,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
clean1a = clean1.mt_adddiff(D9,U=2,V=2)
clean1b = clean1a.frfun7(1.01,8,1)

allD = mt_makediff(raw,clean1b).greyscale()
shrpD = mt_makediff(clean1b,clean1b.removegrain(20))
DD = shrpD.repair(allD,13,0).mt_lutxy(shrpD,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
clean1c = clean1b.mt_lutxy(clean1a,"x 3 + y < x 2 + x y < x 1 + x 3 - y > x 2 - x y > x 1 - x ? ? ? ?",U=2,V=2).mt_adddiff(DD.sbr(),U=2,V=2)
output = clean1c.crop(4,0,-4,0,true)
return(output)
}