mask-scan-detail2
Bar placement / movement:
Mask-scan-direction: top
Mask-scan-direction: bottom
Mask-scan-direction: left
Mask-scan-direction: right
Mask-scan-threshold determines when to stop moving the vitual bar,
thus when a mask's edge is considered to be found:
mask-scanning is stopped when the relative 'blackness' below the virtual bar
(the current number of black pixels below the bar divided by the original
number of black pixels under the bar when scanning was started) gets below
mask-scan-threshold.
Small example with mask-scan-size = 2:
Mask-scan-threshold = 0.3
original blackness on scan start: 24,
stop when below 24*0.3 = 8
(too early)
Mask-scan-threshold = 0.1
original blackness on scan start: 24,
stop when below 24*0.1 = 2