View Single Post
Old 16th December 2020, 00:23   #10  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
AVS AutoCrop, IIRC, then for TOP edge only.
Code:
Starts with Top Limit Cursor about mid frame, 

For Sample Frame of SAMPLES frames
   Scanning inwards from Top edge towards Top Limit Cursor, 
       if at least Z number of consecutive raster lines luma average above some theshold then
           Move Top Limit Cursor outwards to that outer raster line and move on to next frame in SAMPLES.

At end of SAMPLES frames, Top Limit Cursor is the result for top image edge. [above it is border]
Detected image grows over SAMPLES frames, whatever is left outside of detection is border.
Z number of consecutive raster lines, avoids noise.

EDIT:
Avs AutoCrop uses default SAMPLES=5, RoboCrop uses default SAMPLES=40,
Not sure, think autocrop uses Z=3, RoboCrop Z=4.
AutoCrop fixed threshold. RoboCrop is auto thresholded via Min Luma over SAMPLES frames [+ threshold], [Or fixed threshold].
Autocrop defaults can make major [overcrop] mistakes.
EDIT: AutoCrop/RoboCrop both clip global scanners, ie do not detect dynamic changing borders, outermost border detectors.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 16th December 2020 at 12:28.
StainlessS is offline   Reply With Quote