Hello guest, if you like this forum, why don't you register? https://fanrestore.com/member.php?action=register (December 14, 2021) x


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AutoOverlay (PKA AutoAlign) discussion
(2021-08-31, 03:55 PM)random.next Wrote: Pls upload screenshots of that frame from two sources.

Here's an 11 frame sample sequence from both sources.
I suspect the script actually thinks the alignment is correct.

https://mega.nz/file/NoJjCQQT#Ai1CVAYZkc...Z0KALKNaZ4
Reply
Thanks given by:
You need to match luma level of your clips. Easiest way is a static ColorAdjust but it may produce invalid result if sources have very different framing. In this case it is possible to use another engine to adjust luma level of one from the sources (commented lines in the sample). 

Code:
DVD=ImageSource("DVD\F%06d.png", end=10).ConvertToYV12(matrix="Rec709")
OM=ImageSource("OM\F%06d.png", end=10).ConvertToYV12(matrix="Rec709")

OMtest=OM.ExtractY()
OMtest=OMtest.ColorAdjust(OMtest, DVD.ExtractY())

#tempConfig=OverlayConfig(subpixel=-1, branches=1, minSourceArea=80, minOverlayArea=80, minSampleArea=1000, requiredSampleArea=2000, aspectratio1=1.38, aspectratio2=1.42)
#tempEngine=OverlayEngine(OMtest, DVD, editor=false, maxDiff=8, maxDiffIncrease=1.5, maxDeviation=0.4, backwardFrames=2, forwardFrames=3, panScanDistance=1, presize="BilinearResizeMT", resize="BilinearResizeMT", configs = tempConfig)
#OMtest=tempEngine.OverlayRender(OM.ExtractY(), DVD.ExtractY(), debug=false, colorAdjust=1, opacity=0, upsize="BilinearResizeMT", downsize="BilinearResizeMT")

config=OverlayConfig(subpixel=2, branches=3, minSourceArea=70, minOverlayArea=70, minSampleArea=2000, requiredSampleArea=4000, aspectratio1=1.38, aspectratio2=1.42)
engine=OverlayEngine(OMtest, DVD, editor=false, maxDiff=8, maxDiffIncrease=1.5, maxDeviation=0.4, backwardFrames=2, forwardFrames=5, panScanDistance=2, presize="BilinearResizeMT", resize="Spline16ResizeMT", configs = config)
engine.OverlayRender(OM, DVD, debug=true, noise=80, gradient=80, colorAdjust=0, opacity=0, mode=4, upsize="Spline64ResizeMT", downsize="Spline64ResizeMT")
Reply
Thanks given by:
(2021-08-31, 11:28 PM)random.next Wrote: You need to match luma level of your clips. Easiest way is a static ColorAdjust but it may produce invalid result if sources have very different framing. In this case it is possible to use another engine to adjust luma level of one from the sources (commented lines in the sample). 

Code:
DVD=ImageSource("DVD\F%06d.png", end=10).ConvertToYV12(matrix="Rec709")
OM=ImageSource("OM\F%06d.png", end=10).ConvertToYV12(matrix="Rec709")

OMtest=OM.ExtractY()
OMtest=OMtest.ColorAdjust(OMtest, DVD.ExtractY())

#tempConfig=OverlayConfig(subpixel=-1, branches=1, minSourceArea=80, minOverlayArea=80, minSampleArea=1000, requiredSampleArea=2000, aspectratio1=1.38, aspectratio2=1.42)
#tempEngine=OverlayEngine(OMtest, DVD, editor=false, maxDiff=8, maxDiffIncrease=1.5, maxDeviation=0.4, backwardFrames=2, forwardFrames=3, panScanDistance=1, presize="BilinearResizeMT", resize="BilinearResizeMT", configs = tempConfig)
#OMtest=tempEngine.OverlayRender(OM.ExtractY(), DVD.ExtractY(), debug=false, colorAdjust=1, opacity=0, upsize="BilinearResizeMT", downsize="BilinearResizeMT")

config=OverlayConfig(subpixel=2, branches=3, minSourceArea=70, minOverlayArea=70, minSampleArea=2000, requiredSampleArea=4000, aspectratio1=1.38, aspectratio2=1.42)
engine=OverlayEngine(OMtest, DVD, editor=false, maxDiff=8, maxDiffIncrease=1.5, maxDeviation=0.4, backwardFrames=2, forwardFrames=5, panScanDistance=2, presize="BilinearResizeMT", resize="Spline16ResizeMT", configs = config)
engine.OverlayRender(OM, DVD, debug=true, noise=80, gradient=80, colorAdjust=0, opacity=0, mode=4, upsize="Spline64ResizeMT", downsize="Spline64ResizeMT")

I tried the code but no matter what it keeps getting me an error that says "failed to request frame 0"
Even just running it like this without the commented part. I feel like I'm messing up something basic.
Edit: After many tests I am not sure why but it appears removing 
Code:
upsize="BilinearResizeMT", downsize="BilinearResizeMT"
everywhere made it work.
Thank you so much, you're a life saver!
Reply
Thanks given by:
I recommend to use resampleMT - fast multithreading resize filters to speed up auto align https://github.com/jpsdr/ResampleMT
It contains resize functions with MT at the end.
Reply
Thanks given by: Klexos
I got another perhaps silly question. But how do I actually fix the few bunch of frames that still misalign, considering I have the right values from a further frame
Is there a way to apply the values automatically from one frame to the rest?
https://i.imgur.com/fQE7FsW.jpg
For example I want frames 1-21 to have the same alignment as #22. Do I have to change them all one by one manually inputting the values?
I tried selecting the faulty frames and attempted to input the values while they were selected hoping it would change all the frames within the selection but didn't work.
Reply
Thanks given by:
1. Select frame 22
2. Join button
3. Input 1
4. OK/Enter
5. If sources unstablizied to each other then press Adjust Scene or Scan scene.
Reply
Thanks given by: Klexos
v0.5 released: https://github.com/introspected/AutoOver.../tag/0.5.0
Many user functions added. Most interesting one is for color level fixing at frame borders:
Code:
aoBorders(6, 1, segments = 10, blur = 0.5)

[Image: before.png] [Image: after.png]
Reply
Thanks given by: Hitcher , spoRv , PDB , interaser , Klexos
Hello again.
I've been reading through the thread but I can't seem to figure out/handle a whole bunch of issues.
Edit: Actually I wanna change my question.
I am overlaying 3 sources. 4:3 DVD, 16:9 Open Matte and Widescreen.

I generated the mask upon overlaying 4:3 and 16:9
Code:
SOMconfig=OverlayConfig(subpixel=3, branches=2, minSourceArea=50, minOverlayArea=50, minSampleArea=2000, requiredSampleArea=4000,scaleBase=3)
SOMengine=OverlayEngine(OMluma.ConvertToY8(), DVD.ConvertToY8(), editor=false, maxDiff=8, maxDiffIncrease=1.5, maxDeviation=1, backwardFrames=8, forwardFrames=8, panScanDistance=2,  configs = SOMconfig, statFile="C:\Users\Jarvis\Desktop\OverlaySOM.stat", presize="BilinearResizeMT", resize="Spline16ResizeMT")
SOM=SOMengine.OverlayRender(OM.ConvertToYV24(), DVD.ConvertToYV24(), debug=false, noise=80, width=2560, height=1440, gradient=25, colorAdjust=0, opacity=0, mode=4, upsize="Spline64ResizeMT", downsize="Spline64ResizeMT")
SOMLEV=SOM.Levels(0, 1.3, 255, 0, 255).Levels(0, 1.3, 255, 0, 255)
SOMMask=SOMengine.OverlayRender(OM.ConvertToYV24(), DVD.ConvertToYV24(), debug=false, noise=0, width=2560, height=1440, gradient=0, colorAdjust=0, opacity=0, mode=6, upsize="Spline64ResizeMT", downsize="Spline64ResizeMT")

However upon calling it in the final render ambilight won't cover the last bit of corners created by the WS version:
https://imgsli.com/NzIzNjU
The mask appears correctly when isolated/viewed at the first overlay and then when viewed at the last one too, so I'm really confused. Whatever I set the last mode to it does absolutely nothing besides 6 which gives me the mask itself:
https://i.imgur.com/Eps8uDZ.jpg
https://i.imgur.com/2JGmQz7.jpg
Code:
Finalconfig=OverlayConfig(subpixel=3, branches=2, minSourceArea=40, minOverlayArea=40, minSampleArea=3000, requiredSampleArea=5000,scaleBase=3)
FinalEngine=OverlayEngine(SOM.ConvertToY8(), WS.ConvertToY8(), editor=false, sourceMask=SOMMask, maxDiff=3, maxDiffIncrease=1.5, maxDeviation=1, backwardFrames=8, forwardFrames=8, panScanDistance=0,  configs = Finalconfig, statFile="C:\Users\Jarvis\Desktop\OverlayFinal.stat", presize="BilinearResizeMT", resize="Spline16ResizeMT")
FinalEngine.OverlayRender(SOM.ConvertToYV24(), WS.ConvertToYV24(), debug=false, noise=0, width=2560, height=1440, gradient=20, sourceMask=SOMMask, colorAdjust=1, opacity=1, mode=4, upsize="Spline64ResizeMT", downsize="Spline64ResizeMT")

Also side question:
Is there a way to make the two sources blend/match better in terms of colors? The WS and OMs sadly are graded quite differently It does mostly a good job but on some hues it creates artefacts/banding I noticed. Example:
https://imgur.com/iwBXzD8

Edit: Nevermind, I managed to get around these issues after all.
Reply
Thanks given by:
Just a question.

I'm a complete newbie to AVISynth and Autooverlay. I would like to use AutoUverlay to overlay two sources. A 4:3 DVD and a 16:9 HDTV rip.

The HDTV source has a few logos and burnt in subtitles that I'd like to remove. Should I take care of this before overlaying? And regardless of the order I do these in, would it be likely that AutoOverlay would register them as being from the same master. To my eyes they definitely are from the same master.

Thanks.
Reply
Thanks given by:
While the subtitles may "fall" inside the 1.33:1 frame, the logos would most likely not...

Hint: try to find a second HDTV from another source, to get rid of all logos and subs; then use the clean result as input.
Reply
Thanks given by: Serums


Possibly Related Threads…
Thread Author Replies Views Last Post
  home 7.1 releases - general discussion spoRv 7 2,335 2021-10-11, 05:51 PM
Last Post: spoRv
  Recordable blu-ray disc general discussion spoRv 6 7,244 2017-05-20, 11:37 AM
Last Post: spoRv

Forum Jump:


Users browsing this thread: 1 Guest(s)