Log in

View Full Version : MVTools and DeGrainMedian for interlaced source need advice


yup
20th February 2007, 11:46
Hi folk!
I write small script for interlaced source:
AviSource("sel.avi",pixel_type="YUY2")
AssumeTFF()
source=SeparateFields() #
bv1 = source.MVAnalyse(isb = true, truemotion=true, delta = 1, idx = 1, overlap=4, dct=1)
bv2 = source.MVAnalyse(isb = true, truemotion=true, delta = 2, idx = 1, overlap=4, dct=1)
fv1 = source.MVAnalyse(isb = false, truemotion=true, delta = 1, idx = 1, overlap=4, dct=1)
fv2 = source.MVAnalyse(isb = false, truemotion=true, delta = 2, idx = 1, overlap=4, dct=1)
bc1 =source.MVFlow(bv1, idx=1, thSCD1=1000)
bc2 =source.MVFlow(bv2, idx=1, thSCD1=1000)
fc1 = source.MVFlow(fv1, idx=1, thSCD1=1000)
fc2 = source.MVFlow(fv2, idx=1, thSCD1=1000)
interleave(fc2,fc1, source, bc1,bc2)
DeGrainMedian(limitY=9,limitUV=13,mode=1, norow=true)
SelectEvery(5,2)
Weave()

Please advise this script valid? Many script use separately even and odd fields, but if use all fields for same time I can use more data (3 frame equal 5 fields), predicted fields will be close to central fields by time and motion. Only one problem MVTools could estimate motion between fields up and down, but I think MVTools can this things.
yup.

Boulder
20th February 2007, 13:18
The resulting fields are spatially unaligned which means there'll be motion detected everywhere - why make the motion estimation any more difficult than it already is? :)

Bobbing would be a better choice IMHO.

yup
20th February 2007, 14:30
Hi Boulder!
If I right understand I need bobed before my script and after script use
SeparateFields().SelectEvery(4,0,3).Weave()
Yes?
But I spent my memmory and processor time for bobbed frame. I try my script and get normal results for VHS capture to DVD conversion. I can not find artefacts. I think MVTools without problem search vrertical shift from fields to fields.
yup.

Boulder
20th February 2007, 14:39
For the first question, yes.

Check the vectors with MVShow. Post screenshots from the MVShow output and we'll see what it looks like.

Didée
20th February 2007, 14:46
The vertical bobbing basically *is* a problem, but it also depends on a lot of different aspects. One of them is the "sharpness" of the source - with a very sharp & detailed source, the problems might get bigger. With a VHS capture, OTOH, it might be less important.

Anyway: yup, your script in fact is overcomplicated. DegrainMedian considers only prev/current/next frames to denoise the current frame. You're also doing MV-search and -compensation of the prev2 and next2 frames ... that is superfluid, since DegrainMedian won't consider them. So you can just leave out the acc. parts, and just interleave(fc1,source,bc1)

yup
20th February 2007, 14:57
Boulder!
I need append to my script two row
vectors = MVAnalyse(isb = true)
source.MVShow(vectors)
before Weave(), and disable Weave?
I try look without up down jerk.
yup.

yup
20th February 2007, 15:01
Hi Didée!
May be for big time lag use MedianBlurT or advice other temporal median softener.
yup.

Boulder
20th February 2007, 15:03
You could use bv1, bv2, fv1 or fv2 instead of defining "source".

yup
20th February 2007, 19:21
Didée!
I use DeGrainMedian(limitY=9,limitUV=13,mode=1, norow=true) repeately two times for 5 frames, I also try MedianBlurT with time radius 2 and not very satisfy by comparing to DeGrainMedian especialy during scene changes.
yup.