View Single Post
Old 4th April 2021, 16:23   #16  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
The script works better than autocrop as in it doesn't butcher the left side, but it's not designed for these kind of sources with dirty mattes nor even fixed mattes (just manually insert crop()? ) but varying border mattes or border sizes, that's why the code is in runtime. In any case I crafted some kind of prefilter and got very stable results with some occasional 1 pixel matte resize, which in my book isn't allowed neither. Ideally one would want to create equally weighted temporal averages of shots, I had a look yesterday, I'm sure it can be done using DBSC or some of your tools.

One main problem with your sample is that there's a bright column right in the middle of the border, which triggers the detection and forces you to raise the thr therefore having that jumping matte as result (I tried to remove it with median in prefilter).



As for Robocrop it detects the furthermost border, so for my source it will leave lots of innermost borders. Yesterday I gave a thorought look to DBSC following your guide for dynamic cropping and I managed to get it somewhere, but there were some borders left untouched, some overcropping, some anamorphic scaling, and no work done on moving mattes.

This is what I get out of Robocrop with the following settings:

Code:
######## Temp OUTER RoboCrop args (to remove outermost/common border)
RC_SAMPLES   = Max(Round(FrameCount/(FrameRate*1.0)),12)         # Sample 1 Frame every 1 seconds,
RC_IGNORE    = 0.04
RC_WMOD      = 2     # Width multiple of this
RC_HMOD      = 2     # Height multiple of this
RC_LEFTSKIP  = 0     # Crop at least these
RC_TOPSKIP   = 12
RC_RIGHTSKIP = 0
RC_BOTSKIP   = 12

CropLimit_Left=85 CropLimit_Top=12 CropLimit_Right=0 CropLimit_Bot=12 # EDIT: The dynamic border cropping max's (also see RLBT)


And this is the result after removing autocontrast (vertical stretched):



The function name might sound misleading, I wanted to call it DynaCrop but the seat was not vacant : P
Dogway is offline   Reply With Quote