Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AutoOverlay (PKA AutoAlign) discussion
(2018-02-05, 07:46 AM)random.next Wrote: >then change the resolution (vertical and/or horizontal) until they align perfectly (for example, 1924x1080, or 1916x1072 etc) - try also 1pixel variation, using YV24
Use aspectRatio params instead. And angle params for rotation (range -1 to 1 for beginning) . Aspect ratio is width divided to height.
If your over!ay resolution is 1920x800 then both aspectRatio params are equal to 2.4 by default. Set range instead of fixed default value: aspectRatio1=2.3 and aspectRatio2=2.5. Extend range if necessary. After testing leave minimal appropriate range.
Hi random, I have studied and tested your magic script for a several days, you did a great job, thank you.
I'm going to merge 2 clips with your autooverlay tools, here is my working environment: 
win7, avs+ r2728, autooverlay 2.5
video1:1920x1080, with logo
video2:1920x1080, no logo
now I plan to get video2 overlay on video1
but question is, although both clips have the same resolution, but infact, video2 (look like 1924x1084 content resized to 1920x1080) has little more larger picture than video1, it has screwed me for a long days for modifing and testing the avs script round and round, until saw your this post, the aspectratio params was very helpful, finally, I got them align perfectly, thanks for your guidance.
for now, I would like to ask 2 questions for my curiousness happen on trying this fantasy script:
1, how to set the minOverlayArea and minSourceArea properly in my situation(reference for info above)?  what's the design purpose of these params?
2, to remove the logo, it seem to overlayrender function can't finish the job alone, still need overlay function assist, right? if so what's the best choice for overlay and mt_merge? overlay need to convert the 2 clips to yv24 internally, but mt_merge no need to do it.
Reply
Thanks given by:
First you need to make mask image for video1. It is black and white image where logo is poor black. It is good practice to add some gradient around the logo. You should use it as sourceMask in the OverlayEngine. Note that by default all YUV clips are in limited color range in Avisynth. So it must be converted to PC range. Example:
mask=ImageSource("M:\...\mask.png", pixel_type="Y8").ColorYUV(levels="TV->PC").Trim(999,999)
OverlayEngine(... sourceMask=mask...)
Mask clip tells OverlayEngine to exclude logo area from image comparison to provide better alignment.

After that if sources are stabilized to each other (have the same align settings for all frames) you should use StaticOverlayRender without OverlayEngine with align settings that you could take from your previous script with engine and OverlayRender(...debug=true). Or if they are not stablized then use OverlayRender.

As for your questions.
1. For your explanation overlayArea is about (1920x1080)/(1924x1084). I don't exatly know what videos are you use so try to set both params to 95.
2. To hide logo you should use your mask clip with internal Overlay filter after OverlayRender.
Reply
Thanks given by: iwil
(2018-09-19, 07:10 PM)random.next Wrote: First you need to make mask image for video1. It is black and white image where logo is poor black. It is good practice to add some gradient around the logo. You should use it as sourceMask in the OverlayEngine. Note that by default all YUV clips are in limited color range in Avisynth. So it must be converted to PC range. Example:
mask=ImageSource("M:\...\mask.png", pixel_type="Y8").ColorYUV(levels="TV->PC").Trim(999,999)
OverlayEngine(... sourceMask=mask...)
Mask clip tells OverlayEngine to exclude logo area from image comparison to provide better alignment.

After that if sources are stabilized to each other (have the same align settings for all frames) you should use StaticOverlayRender without OverlayEngine with align settings that you could take from your previous script with engine and OverlayRender(...debug=true). Or if they are not stablized then use OverlayRender.

As for your questions.
1. For your explanation overlayArea is about (1920x1080)/(1924x1084). I don't exatly know what videos are you use so try to set both params to 95.
2. To hide logo you should use your mask clip with internal Overlay filter after OverlayRender.



thanks for your kindly reply, 
I had tried to adjust the "minoverlayarea" param to 50, according your this post:

(2018-02-02, 03:08 PM)random.next Wrote: Try OverlayConfig.minOverlayArea about 50 and properly crop source clip.

after do that, I found the debug info for diff value has been droped to 3.x from 4.x, it show that it works?

but if the "minoverlayarea" param was adjusted to higher than 50,  80 etc. then the diff value will be raised to 4.x, it seem it was a worse setting?

I assumed that lower diff value mean to better align result, is that right?
Reply
Thanks given by:


Possibly Related Threads...
Thread Author Replies Views Last Post
  Recordable blu-ray disc general discussion spoRv 6 1,789 2017-05-20, 11:37 AM
Last Post: spoRv

Forum Jump:


Users browsing this thread: 2 Guest(s)