View Full Version : depan-like full motion compensation idea
Terka
4th January 2010, 11:23
is possible to use (or add the possibility to the filter):
lets have 2 frames A, B
1. do the global motion compensation (depan, mvtools) B ->(moco)-> Bmocomp1,
so we have A,Bmocomp1
2. areas where A,Bmocomp1 "match" FILTER (denoise) and "cut out" from B, so the B will have an mask on itselve.
do the 1,2 process again for A, Bmask1
repeat the process until B has been fully masked.
Terka
8th January 2010, 10:05
Fizick, Didee - no response?
is it useful-or garbage?
maybee a mask could be implemented to depan/mvtools?
(btw. does depanInterleave correct the rotation/zoom?)
:thanks:
Didée
8th January 2010, 10:27
Well, I can't say if it's useful or not, because I don't quite understand the process. What is "cut out from B"? B is (supposely) very different from A and Bmocomp1, therefore you can't just cut out from B the areas where A & Bmocomp1 match - they are at different spatial locations. As far as I understand, this would require to do an inverse compensation, i.e. apply a motion vector in reverse direction. Which to my knowledge is not possible to do with the current toolbox.
Not understanding this point, I don't have enough information to imagine the upfollowing repetition process. Hence I don't quite understand the repetition process, either.
Terka
8th January 2010, 11:30
i think you understand it. the inverse compensation is needed.
2nd try to explain the repetition process:
A and B compared with global moco. not once, but more times (yes same result, but we will consider only some part of the image)
when global moco is used, some parts of picure are same. A and B have same and different parts.
same parts will be filtered. until now it was the old behaviour. from now its new:
we want to match the different parts also.
so the already matched and filtered parts has to be not considered in 2nd global moco.
so they need to be masked out or cutted out (or how to say it) from the original-so the second global moco will not be using them.
Didée
8th January 2010, 11:58
Okay, now I see. But, bad news: for the repetition process, you want Depan to completely ignore certain parts of the image. That's not possible to do. Masking-out with some kind of dummy-data (like: filling the "matched" areas with plain grey in both the reference and the destination frame) won't work either, because then Depan still will match on the *shapes* of those areas, so the repetition will again end up with the same result as the previous run did. Sorry to say, but I see no way to accomplish this with Depan.
The workaround is to just use MVTools as usual. It does all of this in one go: instead of repeating and repeating and repeating, each block gets its appropriate vector immediately. Simple as that. If you're after "stability", I'd suggest to use large blocksize (blksize=32 is fully available in actual MVTools2), and/or to use the plentitude of MAnalyse's parameter battery to tweak homogenity of the vector field. No need trying to push the squarish Depan through a triangular hole.
Terka
8th January 2010, 13:39
1.yes i know that depan is not able to do this now.
2.yes, i also know this. MVTools use same principle as i described,
but an different technique-squares. my idea is to use some areas (=similar areas).
----------------------------------------------
Avisynth has a lot of filters, many of them are getting old and succeded by lets say few 'leaders' like: Fizicks, Triticals, Kassandros, eg. filters.
But also the mvtools limit is coming.
Once you were speaking about new engine vs more octan fuel.
Phase correlation, Image fusion...some new concepts are available, but not for Avisynth yet. (hopefully)
Yes, the newer methods OVER the actual will improve the quality by smaller amount than what the older brought.
v
original->median improve by 50%
original->dust improve by 70%
original->fft3d improve by 80%...
i want to say 70-50>80-70
but.. until then we normal users have to try the higer octane.
----------------------------------------------
so back to the theme
i know also about the parametes to change the 'homogenity of vecors'.
the one i proposed is another image registration process (mvtools uses square grid)
--------------------------
a)if mvtools matches an pair by a vector, only translation is done.
maybee translation and rotation will have better results (for the whole field)
b) what i see problematic in my idea, or if too homogenous vector field in mvtools. On borders of the field, there is a ramp "_,-" (sharp edge)
which can is weird to watch. Is a possibility to soft it?
Terka
8th January 2010, 13:48
*shape*: if we will fill the shape with pure noise, instead of grey,
will be the result same?
Didée
8th January 2010, 14:08
Here, I didn't consider any things that possibly could be implemented at the deeper plugin level. I only spoke about the script-level possibilities via MaskTools, MVTools et al. If, of all Avisynth dreams, there was just the one single possibility of using vectors in their reverse direction (maybe even for the MFlowXX-filters *cough*), alone then I'd have so many ideas to toy around with ...
In any case, block based methods are not the problem. The problem, if any, is the optimal usage of the block based method. Look at where mpeg-1 started, and look at where H.264 has come by now! Have non-blockbased methods - e.g. wavelets - proven to be better? No they haven't. They have different pros and cons, but in the end, they are not better. If they were, they would be used more widely. Blockbased methods are efficient and sufficient, when handled with enough virtuoity.
Edit: Yes, filling with noise is a possibility one could try ... it's hard to predict whether that works out, or only partially, or not at all. That's one of those cases where I'd prefer practice over theory ...
(I had thought of noise-filling, too. But I didn't mention, because the previous post was a naysayer one, so I didn't want to mention things that might work.) ;)
Terka
8th January 2010, 14:20
yayay. the language.
ok, to understand properly:
you say: "I want to have the reverse direction possibility in mvtools" correct?
Fizick cant implement something like this for you? You are an legend in Avisynth world. ;)
If not, do you think motion search on the reverse(clip) is not a way?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.