Log in

View Full Version : RGB Registration function in Avisynth


bizz & buzz
29th October 2010, 17:22
I was browsing the DaVinchi Revival manual (HERE (http://www.blackmagic-design.com/downloads/davinci/pdf/revival_manual_intel.pdf)) and found this great function on page 98:
RGB Registration - Automatic alignment of the RGB image layers.
Do we have something like that in Avisynth?

bizz & buzz
31st October 2010, 21:47
anyone?

Mug Funky
1st November 2010, 06:40
i investigated that in a past life. it is indeed possible - split RGB into separate Y channels, then run motion compensation and/or de-shaking. you'll probably want to use edgemasks too, so the channels match better.

however, avisynth is only 8 bit, so it wont be as clean a solution as a DaVinci.

the cleanest solution (and the one we went with last time this problem came up) is to get your scanning gate fixed so the film doesn't move while it's being scanned.

Mounir
2nd November 2010, 21:46
Can we have more info on this software, on their website they have very little. What kind of filtering can we achieve with it ?

bizz & buzz
2nd November 2010, 23:49
You can get many filtering options with that software. Just take a look at the table of contents in the PDF I posted above.

@ Mug Funky
Very interesting. There shouldn't be a problem doing this in YV12, right? I'm trying to fix a DVD.

poisondeathray
3rd November 2010, 00:10
That looks like some nice restoration software

Can you post a sample of what you're trying to fix ?

Dogway
3rd November 2010, 11:38
Looks like people here never reads the General Discussion threads (http://forum.doom9.org/showthread.php?t=157073), :P

bizz & buzz
3rd November 2010, 21:47
@ Poisondeathray
Here is a sample http://www.mediafire.com/?c0o2z5dyhx0izis
This happens only on some scenes not the whole video.

@ Dogway
On the contrary, your thread is where I got the link for the manual in the first place... :D

poisondeathray
3rd November 2010, 22:15
@ Poisondeathray
Here is a sample http://www.mediafire.com/?c0o2z5dyhx0izis
This happens only on some scenes not the whole video.


Is this the correct clip? What channel do you think is misaligned?

Or did you upload one of the scenes where it doesn't occur :D

bizz & buzz
3rd November 2010, 22:38
Look closely on the border between the black shirt and his skin. Perhaps manually it's possible to align each scene individually, but it's very tedious and as Mug Funky suggested, there is an intelligent way of doing this.

poisondeathray
3rd November 2010, 23:58
ok i see what you mean

here is a non intelligent way , but it overshoots a tiny bit, because you can only move by 2 in YUV space

mpeg2source("1.demuxed.d2v")
tempgaussmc_beta2()
chromashift(c=-2)

bizz & buzz
4th November 2010, 05:16
Thanks Poison
Chromashift does solve the problem, but then I have to set it manually for each scene. How would I go about doing this automatically?

poisondeathray
4th November 2010, 22:19
Sorry not sure how to do it automatically

I doubt anything will work "automatically" for your problem, I think the shift might be too small to detect with autodetect methods. But maybe one of the gurus can work something out for you...

Yours is not like the example in the pdf , or typical channel misalignment from scanning, where the shift is much larger and easier to detect

Didée
4th November 2010, 22:47
MergeChroma( aWarpSharp() )

Tweak to liking.

bizz & buzz
4th November 2010, 23:52
WOW :eek:
So simple and yet so effective...
Thank you Didée

Mounir
12th November 2010, 07:51
@ Poisondeathray
Here is a sample http://www.mediafire.com/?c0o2z5dyhx0izis
This happens only on some scenes not the whole video.

@ Dogway
On the contrary, your thread is where I got the link for the manual in the first place... :D

Where exactly do you see a RGB registration problem in this video ? (number of frame(s))
http://img44.imageshack.us/img44/8636/rgbreg1.jpg

http://img821.imageshack.us/img821/4811/rgbreg2.jpg

bizz & buzz
12th November 2010, 10:17
It's not really RGB in my case, but YV12 (DVD colorspace).
The idea was that this method for registering the RGB layers could be applied for registering the luma and the U and V channels in the YV12 colorspace (taking into account that the U and V channels are one forth the res of the luma channel).

In case you meant that you just can't see it, look closely on the border between the black shirt and his skin.
number of frames: all of them :)