Log in

View Full Version : Masks detect area around lines but not lines


Reclusive Eagle
4th April 2022, 16:22
I am trying to create a mask for my current project (an anime), however the masks are not detecting the lines but the area around the lines.

The problem
https://imgur.com/a/dj3Hg8Q

No matter which method I use, sobel, kirsch, retinex etc its the same result. The edges around the lines are masked in white but not the lines.

I've tried multiple different bits(8,16,32 etc), different matrix formats. Nothing has worked. Masks refuse to select the lines.

Julek
4th April 2022, 17:56
If you need the lines, there' s this mask that is used in YAHRmask

def line_mask(src):
clp = src.resize.Point(format=vs.GRAY8)
clp = core.std.Expr([clp, clp.std.Maximum().std.Maximum()], 'y x - 8 - 128 *')
return core.tcanny.TCanny(clp, sigma=0.05, mode=-1).std.Expr(['x 16 *'])

Mystery Keeper
5th April 2022, 16:15
Edge masks detect hard edges, not lines. You can try by inflating until close edge masks connect, then deflating.