28.05.2024, 19:58 (This post was last modified: 28.05.2024, 20:01 by Selur.)
Quote:I will introduce the parameter frame width/height because the speed will decrease with the frame size and review the mask(s) management.
What should that parameter do?
Maybe, optionally to speed things up, something like Hybrids 'Only on Region'-filter option could be used (which uses animate) to only apply the filter to a specific region.
# adjusting color using Levels on YUV420P8 (8 bit)
def vsLevelsRegion1(clip,*args):
return core.std.Levels(clip=clip, min_in=16, max_in=235, min_out=16, max_out=235, gamma=2.00, planes=[0])
end = clip.num_frames-1
mapping = [
(0, end), [vsLevelsRegion1],
]
clip = animate.run(clip, mapping, selection=(50,60,96,58))
The selection parameter of animate, basically crops out a region and later puts it back in, so the region the filter gets applied to gets smaller.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
I think that the filter to be able to remove the logo need a large context.
In the selected sample the logo is at the center of image, that is an optimal position for the filter.
Not sure if the filter will be able to remove the logo in the case is located for example at the bottom right of the frame.
I will test it.
Might be that there is a restriction between the resolution of the video and the amount of pixels that are marked for replacement.
i.e. replacement region (white part of the mask) needs to be less than 50% of the image or something like that.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
28.05.2024, 22:06 (This post was last modified: 28.05.2024, 22:35 by Selur.)
Don't really see a difference with the mask dilation https://imgsli.com/MjY3ODgy, but the result looks fine in my book, given the (bad) quality of the source.
(The mask dilation should potentially increase the edge of the mask.)
Speed-wise with mask_dilation=16, I get: