Posts: 195
Threads: 2
Joined: 2017 Dec
Thanks: 12
Given 250 thank(s) in 89 post(s)
Country:
Posts: 7,151
Threads: 601
Joined: 2015 Jan
Thanks: 1081
Given 1497 thank(s) in 969 post(s)
Country:
The problem here is not the logo - at least, not in this shot; what I would like to obtain is a clear mask for the border, to get rid of the "indents"; but using the black of the borders for mask, also some black inside the image would be used as mask... that's why a custom color for the border would be useful - let's say, a full red $FF0000 would never occour in the image, and so the mask will only be applied in the borders.
deleted user
Unregistered
Thanks:
Given thank(s) in post(s)
Correct me if I misunderstood this, but didn't random.next recently show us some option for OverlayRender (was it mode=6?) where you can output a mask that basically consists of only black and white? Then there would be no problem regarding black colors in the image getting recognized as transparent.
So you basically do two passes. One normal OverlayRender and one with mode=6. The first becomes the image, the second is the mask for that image. That's how I understood it anyway.
Posts: 7,151
Threads: 601
Joined: 2015 Jan
Thanks: 1081
Given 1497 thank(s) in 969 post(s)
Country:
deleted user
Unregistered
Thanks:
Given thank(s) in post(s)
random.next would have to implement some form of pre-multiply for that (I hope that's the right term), where basically the image is always pushed to 100% alpha internally where it is above 0% alpha. The mask then recreates the original border, eliminating the imperfection. That's what TIFF images with alpha masks do.
OR, make use of RGBA mode with an actual alpha channel. That way there would be no black background in the first place. But the implementation would have to likely use some form of premultiply anyway, so it probably doesn't matter.
Posts: 7,151
Threads: 601
Joined: 2015 Jan
Thanks: 1081
Given 1497 thank(s) in 969 post(s)
Country:
Posts: 195
Threads: 2
Joined: 2017 Dec
Thanks: 12
Given 250 thank(s) in 89 post(s)
Country:
>You need to use sourceMask and overlayMask in engine and render to exclude logo from diff analyzing and angles from overlay.
The first question. Why you always use bd as source clip and other clips as overlay? Overlay always at the top of source. I think bd has higher quality for this.
So use "OverlayEngine(WEB, BD..." or "OverlayEngine(SDTV, OM...". It is logically correct. Now opacity may be default to 1.
Next. Why you don't use resampleMT as recommended? Using Spline64Resize is bad descision for engine (not render) because it is slow. BilinearResize usually provide the same result. BilinearResizeMT is much faster than Spline64Resize. If your source clip have lower resolution than overlay (as sdtv), upsize it first. Subpixel in this case can be set to default 0.
So use sourceMask or overlayMask to exclude some areas from frames. Excluded area in mask must be pure black: PC levels for YUV. To load mask from file (black logo on white background): ImageSource("mask.png", pixel_type="Y8").ColorYUV(levels="TV->PC"). Then you are able to use the same mask in OverlayRender to break the transperency of excluded areas if you use opacity<1 or gradient and noise.
To exclude black angles on borders use mask from OverlayRender with mode=6.
Posts: 195
Threads: 2
Joined: 2017 Dec
Thanks: 12
Given 250 thank(s) in 89 post(s)
Country:
Posts: 195
Threads: 2
Joined: 2017 Dec
Thanks: 12
Given 250 thank(s) in 89 post(s)
Country:
2018-01-14, 10:23 AM
(This post was last modified: 2018-01-14, 10:24 AM by random.next.)
deleted user
Unregistered
Thanks:
Given thank(s) in post(s)
|