GoodOldTom
26th April 2021, 20:01
Edit: Since approval for the attached pictures does not seem to be forthcoming and my second post to include them also does not appear I'm trying another way:
https://imgur.com/a/omFR3Gb
Hi!
I wanted to use Depan to improve some footage. Basically this works well, but I'm having trouble with parts generated by prev/next. They are either gray or have color artifacts.
Keep in mind: I picked/cropped/blurred the footage for demonstration purposes and exaggerated some settings to that end as well.
src_org = core.ffms2.Source(r'0_stab_test_input.mkv')
#VideoNode:
# Format: YUV420P8
# Width: 504
# Height: 576
# Num Frames: 89
# FPS: 25
# Flags: NoCache IsCache
src_org = src_org.resize.Lanczos(format=vs.YUV444P10, range=1)
#also tried: YUV422P8, YUV444P10. RGB and GRAY8 aren't supported/error out
test0 = True
if test0:
super = core.mv.Super(clip=src_org, chroma=True, rfilter=3) #,hpad=24, vpad=24)
vectors = core.mv.Analyse(super=super, isb=False, chroma=True, truemotion=True)
globalmotion = core.mv.DepanAnalyse(clip=src_org, info=False, vectors=vectors, pixaspect=1.0, thscd1=800)
invariant_opts = dict(data=globalmotion, info=False, pixaspect=1.0, method=1)
# ------------------
frame_radius = 0
opts = dict(dxmax=1, dymax=1, rotmax=0.0, zoommax=1.0, cutoff=0.23, mirror=0, prev=frame_radius, next=frame_radius, initzoom = 1.0 )
src1 = src_org.mv.DepanStabilise(**invariant_opts, **opts)
# ------------------
frame_radius= 2
opts = dict(dxmax=500, dymax=500, rotmax=50, zoommax=200, cutoff=0.23, mirror=0, prev=frame_radius, next=frame_radius, subpixel=2, damping=2.9, addzoom=2.0 )
src2 = src_org.mv.DepanStabilise(**invariant_opts, **opts)
# ------------------
frame_radius= 1
opts = dict(dxmax=500, dymax=500, rotmax=900.0, zoommax=2, cutoff=1.13, mirror=0, prev=frame_radius, next=frame_radius )
src3 = src_org.mv.DepanStabilise(**invariant_opts, **opts)
# ------------------
opts = dict(dxmax=500, dymax=500, rotmax=0.0, zoommax=2, cutoff=1.13, mirror=15, prev=0, next=1 )
src4 = src_org.mv.DepanStabilise(**invariant_opts, **opts)
diff_planes = [0] #[0,1,2]
diff1 = core.std.MakeDiff(src_org, src1, planes=diff_planes)
diff2 = core.std.MakeDiff(src_org, src2, planes=diff_planes)
diff3 = core.std.MakeDiff(src_org, src3, planes=diff_planes)
diff4 = core.std.MakeDiff(src_org, src4, planes=diff_planes)
diff12 = core.std.MakeDiff(src1, src2, planes=diff_planes)
diff13 = core.std.MakeDiff(src1, src3, planes=diff_planes)
diff24 = core.std.MakeDiff(src2, src4, planes=diff_planes)
out_a = core.std.StackVertical([
core.std.StackHorizontal([src1, src2, src_org, src4])
, core.std.StackHorizontal([diff12, diff13, src3, diff24]) ])
out_b = core.std.StackVertical([
core.std.StackHorizontal([src1, src2, src_org, src4])
, core.std.StackHorizontal([diff2, diff3, src3, diff4]) ])
out_b.set_output()
Here are my questions:
https://forum.doom9.org/attachment.php?attachmentid=17744&stc=1&d=1619522534
1. Frame 14-15:
shows src1 to be rotated and moved quite a bit. Parameters dxmax=1, dymax=1, rotmax=0.0, zoommax=1.0 suggest this should not happen - what am I doing wrong? (Some color artifacts can be seen in src2 too)
https://forum.doom9.org/attachment.php?attachmentid=17745&stc=1&d=1619522534
https://forum.doom9.org/attachment.php?attachmentid=17743&stc=1&d=1619522534
2. Frame 39-41 and 59:
show src2 to have color artifacts in the sections prev and next generated on top and top-right. What can I do about that?
https://forum.doom9.org/attachment.php?attachmentid=17746&stc=1&d=1619522534
3. Frame 23-31:
show the sections prev and next generated in src2 on the bottom to be gray. There are plenty more examples in the clip for this. What is the issue?
Input/Output files can be downloaded here. (https://filebin.net/g7b78frb4cgy24du) If there is a better way of sharing < 2MB let me know.
Thank you for reading!
Edit: Add some pictures to illustrate my issue.
https://imgur.com/a/omFR3Gb
Hi!
I wanted to use Depan to improve some footage. Basically this works well, but I'm having trouble with parts generated by prev/next. They are either gray or have color artifacts.
Keep in mind: I picked/cropped/blurred the footage for demonstration purposes and exaggerated some settings to that end as well.
src_org = core.ffms2.Source(r'0_stab_test_input.mkv')
#VideoNode:
# Format: YUV420P8
# Width: 504
# Height: 576
# Num Frames: 89
# FPS: 25
# Flags: NoCache IsCache
src_org = src_org.resize.Lanczos(format=vs.YUV444P10, range=1)
#also tried: YUV422P8, YUV444P10. RGB and GRAY8 aren't supported/error out
test0 = True
if test0:
super = core.mv.Super(clip=src_org, chroma=True, rfilter=3) #,hpad=24, vpad=24)
vectors = core.mv.Analyse(super=super, isb=False, chroma=True, truemotion=True)
globalmotion = core.mv.DepanAnalyse(clip=src_org, info=False, vectors=vectors, pixaspect=1.0, thscd1=800)
invariant_opts = dict(data=globalmotion, info=False, pixaspect=1.0, method=1)
# ------------------
frame_radius = 0
opts = dict(dxmax=1, dymax=1, rotmax=0.0, zoommax=1.0, cutoff=0.23, mirror=0, prev=frame_radius, next=frame_radius, initzoom = 1.0 )
src1 = src_org.mv.DepanStabilise(**invariant_opts, **opts)
# ------------------
frame_radius= 2
opts = dict(dxmax=500, dymax=500, rotmax=50, zoommax=200, cutoff=0.23, mirror=0, prev=frame_radius, next=frame_radius, subpixel=2, damping=2.9, addzoom=2.0 )
src2 = src_org.mv.DepanStabilise(**invariant_opts, **opts)
# ------------------
frame_radius= 1
opts = dict(dxmax=500, dymax=500, rotmax=900.0, zoommax=2, cutoff=1.13, mirror=0, prev=frame_radius, next=frame_radius )
src3 = src_org.mv.DepanStabilise(**invariant_opts, **opts)
# ------------------
opts = dict(dxmax=500, dymax=500, rotmax=0.0, zoommax=2, cutoff=1.13, mirror=15, prev=0, next=1 )
src4 = src_org.mv.DepanStabilise(**invariant_opts, **opts)
diff_planes = [0] #[0,1,2]
diff1 = core.std.MakeDiff(src_org, src1, planes=diff_planes)
diff2 = core.std.MakeDiff(src_org, src2, planes=diff_planes)
diff3 = core.std.MakeDiff(src_org, src3, planes=diff_planes)
diff4 = core.std.MakeDiff(src_org, src4, planes=diff_planes)
diff12 = core.std.MakeDiff(src1, src2, planes=diff_planes)
diff13 = core.std.MakeDiff(src1, src3, planes=diff_planes)
diff24 = core.std.MakeDiff(src2, src4, planes=diff_planes)
out_a = core.std.StackVertical([
core.std.StackHorizontal([src1, src2, src_org, src4])
, core.std.StackHorizontal([diff12, diff13, src3, diff24]) ])
out_b = core.std.StackVertical([
core.std.StackHorizontal([src1, src2, src_org, src4])
, core.std.StackHorizontal([diff2, diff3, src3, diff4]) ])
out_b.set_output()
Here are my questions:
https://forum.doom9.org/attachment.php?attachmentid=17744&stc=1&d=1619522534
1. Frame 14-15:
shows src1 to be rotated and moved quite a bit. Parameters dxmax=1, dymax=1, rotmax=0.0, zoommax=1.0 suggest this should not happen - what am I doing wrong? (Some color artifacts can be seen in src2 too)
https://forum.doom9.org/attachment.php?attachmentid=17745&stc=1&d=1619522534
https://forum.doom9.org/attachment.php?attachmentid=17743&stc=1&d=1619522534
2. Frame 39-41 and 59:
show src2 to have color artifacts in the sections prev and next generated on top and top-right. What can I do about that?
https://forum.doom9.org/attachment.php?attachmentid=17746&stc=1&d=1619522534
3. Frame 23-31:
show the sections prev and next generated in src2 on the bottom to be gray. There are plenty more examples in the clip for this. What is the issue?
Input/Output files can be downloaded here. (https://filebin.net/g7b78frb4cgy24du) If there is a better way of sharing < 2MB let me know.
Thank you for reading!
Edit: Add some pictures to illustrate my issue.