View Single Post
Old 21st December 2021, 10:56   #17  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
I finished the refactor of FlatMask() with a proper ridge descriptor. I didn't follow the equations to the letter but got the grasp of it and it works.
I focused on the double line topic of the original post. To make the faint edge of the bus visible, in the edge mask you have to really pump up the values and hence will catch a lot of false positives because actually it isn't a line anymore but a slight shade.


The source is dirty (dot crawl, halos...) so I added some prefiltering before flatmask.
Code:
a=last

# Prefilter (Custom for this source)
ex_boxblur(0,1,mode="mean")
turnright()
ex_median("verticalS")
turnleft()
ex_median("IQM")

# Valley Mask
FlatMask(1)

# Add regular edge mask
a=a.ex_edge("qprewitt")
ex_lutxy(a,"x dup * 0.1 * y + 0.5 *")

# Clean up
ex_smooth(2,sharp=true)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 21st December 2021 at 11:14.
Dogway is offline   Reply With Quote