Log in

View Full Version : Ideas on minimizing scene change noise in old anime


lansing
26th October 2008, 07:04
I've noticed that in many old anime, there's a noise (I don't know what it call) in between scene change like this :

http://img513.imageshack.us/img513/1177/s1qz0.th.jpg (http://img513.imageshack.us/my.php?image=s1qz0.jpg)http://img513.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)

and this:

http://img101.imageshack.us/img101/949/s2ym3.th.jpg (http://img101.imageshack.us/my.php?image=s2ym3.jpg)http://img101.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)

my idea is to minimize these noisy frames by replacing the frame before scene change with its previous frame, and the frame after scene change with its next frame. And frames with moving objects will be leaving as it is.


sorry I'm nowhere near a programmer, so I don't know if my concepts are possible, I'll try my best to explain.


Use a function to detect keyframes/scene change and output the result frame number to text keyframe.txt (maybe pass 1?)
load in keyframe.txt, MVAnalyse (or some filter that can analyze motion) 4 frame sequence around each keyframe, ie. PPIP, set limitation for what is consider motion for PP and IP
If the analyzed number is less than the limitation, then replace that frame with whichever frame according to its position

thetoof
26th October 2008, 07:22
This is the result of putting together several parts of the episode with the good old techniques :p What you are seeing is glued film and it can be corrected by using scselect. It has been discussed and solved by Didée a few months ago.
I don't know the script by heart, but I'll upload it when I get home (in 12 hours or so).

However, it doesn't take in account if the frame has motion or not, but imo it doesn't matter if you lose 1 frame of motion at a scene change (hardly noticeable compared to the "glue artifact").

Didée
26th October 2008, 17:56
Thanks, but that's too much praising. The problem has been solved by kassandro, years ago. /me only took the freedom to dig it out (http://forum.doom9.org/showthread.php?p=1140719#post1140719) again.


A basic script to use for scenechange cleaning would be

LoadPlugin("RemoveDirt.dll") # v0.9 of RemoveDirt

source = last # whatever you have
prev = source.selectevery(1,-1)
next = source.selectevery(1,1)
source.SCSelect(next,prev,source,dfactor=2.0)

It doesn't care for motion at scenechanges, it just does a hard replace of the scenechange frames with their respective -1/+1 neighbors.


A basic script to use motion-compensated replacements would be

LoadPlugin("RemoveDirt.dll") # v0.9 of RemoveDirt
LoadPlugin("MVTools.dll") # There're plenty of incompatible-to-each-other versions currently.
# v1.10.2.1 would be good for this little script here

source = last # whatever you have
prev = source.MVCompensate(source.MVanalyse(isb=false,blksize=16,overlap=8,idx=8),idx=8)
next = source.MVCompensate(source.MVanalyse(isb=true, blksize=16,overlap=8,idx=8),idx=8)
source.SCSelect(next,prev,source,dfactor=2.0)


Trying to make an adaptive decision whether there is motion or not, then adaptively use either compensated or hard replacements, is way more difficult than you would think. The idea is clear, but there are thousands of pitfalls that automated solutions will fall into. I'd stick with one of the simple solutions, and let it be.

lansing
27th October 2008, 01:54
the hard replacement method might not be suitable for this image sequence:

http://img48.imageshack.us/img48/1892/originalaf6.th.jpg (http://img48.imageshack.us/my.php?image=originalaf6.jpg)http://img48.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)


this is the output:

http://img517.imageshack.us/img517/8745/basicst7.th.jpg (http://img517.imageshack.us/my.php?image=basicst7.jpg)http://img517.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)



this is with motion compensation:

http://img529.imageshack.us/img529/8978/mcsequencegi6.th.jpg (http://img529.imageshack.us/my.php?image=mcsequencegi6.jpg)http://img529.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)


this (http://www.mediafire.com/download.php?myzrz4odqmi) is the clip for it.