View Single Post
Old 25th August 2016, 18:23   #71  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
v1.10, new version. See 1st post or docs here:- http://forum.doom9.org/showthread.ph...03#post1696703

Code:
    Show: Default false. If true, then does no cropping, just shows a little info on frame. Overrides both Blank and Align.
      Final image edge positions shown as dotted lines every fifth pixel set white, always shown. Final image edge markers show edge
        after any User adjustment via Add args (LeftAdd, TopAdd, RightAdd, BotAdd), and also after Modn rounding applied (CropMore/CropLess).
      Exact image edges are shown if not exactly coinciding with Final Image Edge markers, Exact image edge markers shown as every 3rd pixel
      plotted in white.
      Where the Skip args (LeftSkip, TopSkip, RighSkip, BotSkip) are non zero, will show skip positions as dotted lines with dots
        every other pixel, not plotted if exact same position at final Modn (CropMore/CropLess) position or detected exact edge position.
        The Skip args preset the 'already cropped area', ie auto cropping starts with edges already considered border.
      Added cross hair reticule when show=True. Larger markings are 10 pixels apart, dots are 5 pixels apart.
        Perhaps of use where borders not of fixed position.


script used.
Code:
AviSource("D:\V\CabaretUnCropped.avi")
RoboCrop(laced=False,Show=True,Debug=true,LeftSkip=5,TopSkip=5,RightSkip=5,BotSkip=5,LeftAdd=4,TopAdd=4,RightAdd=4,BotAdd=4)
Return last
Added Skip args just to show skip markers (not shown if 0), and Add args for no particular reason other than to show separated from exact image markers.
Exact top edge y1, at 89, User adjustment to 93, and then rounded YMod=2 to 94 (CropMore).

EDIT: Debug output
Code:
00000004    18:25:58.937    RoboCrop: RoboCrop: v1.10 - 25 Aug2016 - By StainlessS
00000005    18:25:58.937    RoboCrop: Input: Width=720 Height=576 FrameCount=15285
00000006    18:25:58.937    RoboCrop:
00000007    18:25:58.937    RoboCrop: Thresh defaulting to DEFAULT AUTOTHRESH -40.00
00000008    18:25:58.937    RoboCrop: Thresh -40.00 recognised as DEFAULT AUTOTHRESH
00000009    18:25:58.937    RoboCrop: Potential Auto Credits Skip Start@5%=764 End @90%=13756 : Range=12993
00000010    18:25:58.937    RoboCrop: Skip Start(764) and End(13756) : Range=12993
00000011    18:25:58.937    RoboCrop:
00000012    18:25:58.937    RoboCrop: Samples=40 Thresh=-40.000 Laced=False Matrix=2
00000013    18:25:58.937    RoboCrop: WMod=4 HMod=2 {Colorspace/Laced Restricted XMod=2 YMod=2}
00000014    18:25:58.937    RoboCrop: RLBT=15 Ignore=0.400 Baffle=4
00000015    18:25:58.937    RoboCrop: ScaleAutoThreshRGB=Yes ScaleAutoThreshYUV=No
00000016    18:25:58.937    RoboCrop: CropMode=2(CropMore) Blank=No Align=No Show=Yes Log=No
00000017    18:25:58.937    RoboCrop: Atm=4.000 SampStart=764 SampEnd=13756 SampRange=12993
00000018    18:25:58.937    RoboCrop: LeftAdd=4 TopAdd=4 RightAdd=4 BotAdd=4
00000019    18:25:58.937    RoboCrop: LeftSkip=5 TopSkip=5 RightSkip=5 BotSkip=5
00000020    18:25:58.937    RoboCrop:
00000021    18:25:58.953    RoboCrop: AutoThresh   1) [   764] YPlaneMin = 14 (14)
00000022    18:25:58.968    RoboCrop: AutoThresh   2) [  1097] YPlaneMin = 14 (14)
00000023    18:25:58.984    RoboCrop: AutoThresh   3) [  1430] YPlaneMin = 14 (14)
00000024    18:25:59.000    RoboCrop: AutoThresh   4) [  1763] YPlaneMin = 14 (14)
00000025    18:25:59.015    RoboCrop: AutoThresh   5) [  2097] YPlaneMin = 14 (14)
00000026    18:25:59.031    RoboCrop: AutoThresh   6) [  2430] YPlaneMin = 15 (14)
00000027    18:25:59.062    RoboCrop: AutoThresh   7) [  2763] YPlaneMin = 14 (14)
00000028    18:25:59.093    RoboCrop: AutoThresh   8) [  3096] YPlaneMin = 14 (14)
00000029    18:25:59.125    RoboCrop: AutoThresh   9) [  3429] YPlaneMin = 14 (14)
00000030    18:25:59.140    RoboCrop: AutoThresh  10) [  3762] YPlaneMin = 14 (14)
00000031    18:25:59.156    RoboCrop: AutoThresh  11) [  4095] YPlaneMin = 14 (14)
00000032    18:25:59.187    RoboCrop: AutoThresh  12) [  4428] YPlaneMin = 14 (14)
00000033    18:25:59.203    RoboCrop: AutoThresh  13) [  4762] YPlaneMin = 14 (14)
00000034    18:25:59.234    RoboCrop: AutoThresh  14) [  5095] YPlaneMin = 14 (14)
00000035    18:25:59.250    RoboCrop: AutoThresh  15) [  5428] YPlaneMin = 14 (14)
00000036    18:25:59.265    RoboCrop: AutoThresh  16) [  5761] YPlaneMin = 14 (14)
00000037    18:25:59.281    RoboCrop: AutoThresh  17) [  6094] YPlaneMin = 14 (14)
00000038    18:25:59.296    RoboCrop: AutoThresh  18) [  6427] YPlaneMin = 14 (14)
00000039    18:25:59.328    RoboCrop: AutoThresh  19) [  6760] YPlaneMin = 14 (14)
00000040    18:25:59.343    RoboCrop: AutoThresh  20) [  7093] YPlaneMin = 14 (14)
00000041    18:25:59.359    RoboCrop: AutoThresh  21) [  7427] YPlaneMin = 15 (14)
00000042    18:25:59.375    RoboCrop: AutoThresh  22) [  7760] YPlaneMin = 14 (14)
00000043    18:25:59.390    RoboCrop: AutoThresh  23) [  8093] YPlaneMin = 14 (14)
00000044    18:25:59.406    RoboCrop: AutoThresh  24) [  8426] YPlaneMin = 14 (14)
00000045    18:25:59.421    RoboCrop: AutoThresh  25) [  8759] YPlaneMin = 14 (14)
00000046    18:25:59.437    RoboCrop: AutoThresh  26) [  9092] YPlaneMin = 14 (14)
00000047    18:25:59.453    RoboCrop: AutoThresh  27) [  9425] YPlaneMin = 14 (14)
00000048    18:25:59.468    RoboCrop: AutoThresh  28) [  9758] YPlaneMin = 14 (14)
00000049    18:25:59.484    RoboCrop: AutoThresh  29) [ 10092] YPlaneMin = 14 (14)
00000050    18:25:59.500    RoboCrop: AutoThresh  30) [ 10425] YPlaneMin = 14 (14)
00000051    18:25:59.515    RoboCrop: AutoThresh  31) [ 10758] YPlaneMin = 14 (14)
00000052    18:25:59.531    RoboCrop: AutoThresh  32) [ 11091] YPlaneMin = 14 (14)
00000053    18:25:59.546    RoboCrop: AutoThresh  33) [ 11424] YPlaneMin = 14 (14)
00000054    18:25:59.562    RoboCrop: AutoThresh  34) [ 11757] YPlaneMin = 14 (14)
00000055    18:25:59.578    RoboCrop: AutoThresh  35) [ 12090] YPlaneMin = 14 (14)
00000056    18:25:59.593    RoboCrop: AutoThresh  36) [ 12423] YPlaneMin = 14 (14)
00000057    18:25:59.609    RoboCrop: AutoThresh  37) [ 12757] YPlaneMin = 14 (14)
00000058    18:25:59.625    RoboCrop: AutoThresh  38) [ 13090] YPlaneMin = 14 (14)
00000059    18:25:59.640    RoboCrop: AutoThresh  39) [ 13423] YPlaneMin = 14 (14)
00000060    18:25:59.656    RoboCrop: AutoThresh  40) [ 13756] YPlaneMin = 14 (14)
00000061    18:25:59.656    RoboCrop:
00000062    18:25:59.656    RoboCrop: YPlaneMin=14 : Automatic set Thresh=54.000
00000063    18:25:59.656    RoboCrop:
00000064    18:25:59.656    RoboCrop: Top   1) [   764]  AveY= 54.30  Y1=178
00000065    18:25:59.656    RoboCrop: Bot   1) [   764]  AveY= 58.04  Y2=484
00000066    18:25:59.656    RoboCrop: Lft   1) [   764]  AveY= 54.79  X1=154
00000067    18:25:59.656    RoboCrop: Rgt   1) [   764]  AveY= 54.75  X2=695
00000068    18:25:59.656    RoboCrop: Lft   3) [  1430]  AveY= 54.43  X1= 28
00000069    18:25:59.671    RoboCrop: Top   9) [  3429]  AveY= 54.11  Y1=177
00000070    18:25:59.671    RoboCrop: Rgt  10) [  3762]  AveY= 69.26  X2=696
00000071    18:25:59.671    RoboCrop: Top  14) [  5095]  AveY= 54.04  Y1= 89
00000072    18:25:59.734    RoboCrop:
00000073    18:25:59.734    RoboCrop: Active Frames (where image coords first found) = 5
00000074    18:25:59.734    RoboCrop: Sampled ImageEdge:  X1=28  Y1=89  X2=696(W=669,-23)  Y2=484(H=396,-91)
00000075    18:25:59.734    RoboCrop:
00000076    18:25:59.734    RoboCrop: User Adjust:   X1=32  Y1=93  X2=692(W=661,-27)  Y2=480(H=388,-95)
00000077    18:25:59.734    RoboCrop:
00000078    18:25:59.734    RoboCrop: Crop(ModW/H):  X = 32   Y = 94   W =660(-28)   H =386(-96)
00000079    18:25:59.734    RoboCrop: Constructor Scan Total Time=0.812 secs
EDIT:Below, Y1 top exact image edge = 89, rounded mod 2 to 90, so where rounding (default CROPMORE), will show wiggly edge as on top,
right and bottom (adjacent dotted lines). Left edge did not need rounding.
Code:
RoboCrop(laced=False,Show=True)
__________________
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; 7th January 2019 at 07:17.
StainlessS is offline   Reply With Quote