RemoveBorders filter for Avisynth [Readme]
RemoveBorders - An Avisynth filter for removing black borders
By Ross Thomas <ross@grinfinity.com> There is no copyright on this code, and there are no conditions on its distribution or use. Do with it what you will. We all know (and, possibly, love) the AddBorders filter. Here's its conceptual opposite: instead of adding black borders to the clip, this filter removes existing black borders. It's as simple as that. In order to more accurately determine what is a border and what isn't, RemoveBorders looks at a number of sample frames spread throughout the clip. It then uses the most common values it saw for each edge (i.e. the modal average) and crops the frame correspondingly. Usage Code:
RemoveBorders(clip clip, int luma_threshold, int samples, int round_width, int round_height)
Known Issues - No Avisynth 2.5/YV12 version yet. That's coming next release. - No MMX optimization. The YUY2 version doesn't really need it, but the YV12 version will. To-Do - A "show" mode to display pre- and post-processing frame size, detected borders, etc. - Perhaps add FitCD-esque functionality. History - 0.1 - First release. Alpha code. Danger, Will Robinson! Download here: http://www.digitalfaq.com/archives/a...h-filters.html |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.