15.01.2023, 12:24
Hello Selur,
I noted that in the frame regarding the resize.
there is the check box: "Stepped Resize" with the option to perform a second step resize.
Given the problem that some AI resizers are introducing artifacts, it could be possible to reduce the impact by introducing a second step or an option where the image produced by the resizer is merged with another image produced with a simpler resizer. The merge could be implemented with a function like this one
where the kernel used for the resize could be selected in input and the weight allow to reduce the effects of AI resizers.
The difference respect to using a DeHalo filter is that this filter is applied to the upscaled image. If the upscaler "invented" something wrong, the filter will be applied to the "invented" imaged, so the possibility to reduced the wrong effect is very limited. By merging the upscaled image with an upscaler not subject to "invent" could be possible to obtain a better result respect to a DeHalo filter.
Dan
Quote:btw. this will happen with others ai resizers too
I noted that in the frame regarding the resize.
there is the check box: "Stepped Resize" with the option to perform a second step resize.
Given the problem that some AI resizers are introducing artifacts, it could be possible to reduce the impact by introducing a second step or an option where the image produced by the resizer is merged with another image produced with a simpler resizer. The merge could be implemented with a function like this one
PHP Code:
def resize_smooth(clip: vs.VideoNode, oversharpened: vs.VideoNode, kernel='bicubic', weight=0.5) -> vs.VideoNode:
"""
Fix oversharpened upscales by merging the video with a blurry bicubic kernel downscale.
"""
down = clip.fmtc.resample(oversharpened.width, oversharpened.height, kernel=kernel)
return core.std.Merge(down, oversharpened, weight)
)
where the kernel used for the resize could be selected in input and the weight allow to reduce the effects of AI resizers.
The difference respect to using a DeHalo filter is that this filter is applied to the upscaled image. If the upscaler "invented" something wrong, the filter will be applied to the "invented" imaged, so the possibility to reduced the wrong effect is very limited. By merging the upscaled image with an upscaler not subject to "invent" could be possible to obtain a better result respect to a DeHalo filter.
Dan