Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd July 2016, 14:47   #41  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,630
Ok... Thanks! Will try in the next days!
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 25th July 2016, 09:50   #42  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
First impression GamMac() v1.04Beta4 : very very good

A few remarks: on complete black frames, GamMac() has the same behaviour as Autolevels(). To much correction. But I use the same trick as I did with Autolevels: adding a small 4 pixels white border on the left side of the frame, then apply GamMac(), then remove the border. Examples will follow, but I have to time right now.

Sometimes on old 8mm film there is emulsion damage. This damage can have any color. Often red or green. A green spot for example (even a small one) can mess up the GamMac() results. I assume because these spots are very bright and they are changing average lume from the green channel. This can be solved by using RemoveDirt() before GamMac(). RemoveDirt() can deal very well with these spots because they are always changing from frame to frame.

Resumed: a very good (imho the best) filter for those who are working with digitized film files (8mm, 16mm or whatever format)

It might be useful for other sources too, to fix color cast etc.. but I leave this for others to test.

A happy Fred() .
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest

Last edited by videoFred; 25th July 2016 at 09:58.
videoFred is offline   Reply With Quote
Old 25th July 2016, 13:40   #43  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,981
GamMac() v1.05Beta1:- LINK REMOVED

Code:
GamMac(), [Gamma Machine] An extraordinary Idea by VideoFred (the gent from Gent). Coded by StainlessS.

    Home Thread:- http://forum.doom9.org/showthread.php?p=1774281#post1774281
    Idea:-        http://forum.doom9.org/showthread.php?t=173683

RGB Only.

    Useful to correct color cast on old 8mm films.
    Alters channel pixel average to match LockChan using Gamma correction. (By default alters Red and Blue channels to match Green).
    Additional tweaking via RedMul, GrnMul and BluMul multipliers.

    What it does(roughly):-
        Gets Channel averages, minimums, and maximums (using loTh for minumums and hiTh for maximums).
        if(Scale > 0 and loTh>=0.0 and hiTh>=0.0) then  rescale averages using dynamic range of r,g,b [0.0 -> DynamicRange(R,G,B)]
        For each channel, estimate gamma function that will remap (scaled channel average * channel multiplier) to match a particular
        LockVal (chosen via LockChan). Render frame using the output averages from estimated gamma.

GamMac(clip c,int "LockChan"=1,Float "LockVal"=128,
      \ Float "RedMul"=1.0,Float "GrnMul"=1.0, Float "BluMul"=1.0,
      \ Float "MinLim"=10.0,Float "MaxLim"=245.0,float "GamLo"=0.1,Float "GamHi"=10.0,
      \ Bool "Show"=false,int "Verbosity"=1
      \ Float "Th"= -1.0,Float "loTh"=Th,Float "hiTh"=Th,
      \ int "Scale"=0,
      \ int "x"=0,int "y"=0,int "w"=0,int "h"=0
      \ )

    LockChan Default 1(Grn).    Channel for lock to Average. [range -3 -> 2]
                                0 ] LockVal = Scaled(RedAve)
                                1 ] LockVal = Scaled(GreenAve)
                                2 ] LockVal = Scaled(BlueAve)
                                -1] LockVal = Use explicit LockVal arg (see below).
                                -2] LockVal = (Scaled(RedAve)+Scaled(GrnAve)+Scaled(BluAve))/3.0.
                                -3] LockVal = Median(Scaled(RedAve),Scaled(GrnAve),Scaled(BluAve))
                                Where Scaled(Channel Average) depends upon Scale, and loTh, and hiTh.

    LockVal, default 128.0      Only used if LockChan = -1.0. [0.0 < LockVal < 255.0] (set via LockChan if LockChan != -1)

    RedMul, default 1.0         Red channel multiplier adjustment.   [0.1 <= RedMul <= 10.0]
    GrnMul, default 1.0         Green channel multiplier adjustment. [0.1 <= GrnMul <= 10.0]
    BluMul, default 1.0         Blue channel multiplier adjustment.  [0.1 <= BluMul <= 10.0]
                                Scaled averages are multiplied by their multiplier then given as args to the gamma estimator.
                                Allow tweaking of R,G,B channels.
                                   Above Multipliers only shown in metrics when at least one is != 1.0 (Always shown when Verbosity=3=FULL).

    MinLim, default 10.0        If any input channel average smaller than this, then no effect on that channel. [0.0 <= MinLim <= 64.0]
    MaxLim, default 245.0       If any input channel average greater than this, then no effect on that channel. [191.0 <= MaxLim <= 255.0]
                                   Allows to skip remapping of a channel where input channel average (un-scaled) is above or below these limits.

    GamLo, default 0.1          Lower value for guess gamma [0.1 <= GamLo < GamHi]
    GamHi, default 10.0         Upper value for guess gamma [GamLo < GamHi <= 10.0]
                                     Starting guess range and limits for gamma estimator (probably best left alone).

    Show, default false         True, show metrics info on frame.
    Verbosity, default 1        0 = Only upper frame metrics
                                1 = Upper + important ones. (default)
                                2 = Nearly Full metrics.
                                3 = Full Metrics
                                Upper frame metrics shown as eg:- (when Verbosity=3=FULL)

                                   nnnnn] Flags:- 1SL
                                              R         G         B
                                   IN:      10,253    10,253    10,253
                                   IN_AVE:  78.466    88.552    78.767
                                   SCALED:  71.847    82.431    72.162
                                   GAMMA:    1.135     1.000     1.123
                                   OUTAVE:  82.431    82.422    82.451

                               where,
                                   nnnnn, is the frame number.
                                   Flags:- (Specific to current frame, can change frame to frame)
                                       '1' = LockChan, as above, channel '1'[ScaleAveG].
                                             Can be, '0', '1', '2' [ScaleAve Channel number LockChan=-3(median) assigns '0', '1' or '2' as appropriate]
                                                     'A'[LockChan=-2, (ScaleAveR+ScaleAveG+ScaleAveB)/3.0]
                                                     'V'[LockChan=-1, Explicit LockVal]
                                       'S' = Scale, mode signfied by color.
                                             Greyed out. Scale = 0(No Effect). May be Greyed out if all channels Min/Max are 0,255.
                                             White.  Scale = 1[Scales input channel average maximum dynamic range of R,G,B]
                                             Orange. Scale = 2[Scales input channel average dynamic range of R and G and B, Individually]
                                       'L' = Limited by MinLim or MaxLim, mode signfied by color.
                                             Greyed out. Not Limited
                                             Red, at least 1 channel has remapping disabled.
                                   IN:     Shows comma separated channel minimum and maximum (dependent upon loTh, hiTh).
                                   IN_AVE: Input channel averages.
                                   SCALED: Scaled input averages, (dependent upon Scale, loTh, hiTh, channel minumums and maximums).
                                   GAMMA:  Estimated gamma to achieve lockval for channel. (dependent upon pretty much everything).
                                   OUTAVE: Output channel average ie rendered result.

    Th, Default -1.0(off)      Sets Default for loTh and hiTh. Suggest about 0.0(percent).  [-1.0, or 0.0 -> 2.0]
    loTh, Default Th           As for Ignore_low in AutoLevels, or Threshold in YPlaneMin.  [-1.0, or 0.0 -> 2.0]
                               Percent, amount of extreme pixels (eg noise) to ignore when finding minimum R, G or B channel values.
                               -1.0 is OFF, input channel minimum is set to 0 as for levels(0,gamma,input_max, ... ).
                               If loTh >=0.0, then will scan frame looking for lowest pixel value whose cumlative sum
                               [including all pixels counts of lower value pixels] is greater than loTh%.
                               loTh, only shown in metrics if greater or equal to 0.0 ie switched ON (Always shown when Verbosity=3=FULL).
    hiTh, Default Th           As for Ignore_high in AutoLevels, or Threshold in YPlaneMax. [-1.0, or 0.0 -> 2.0]
                               Percent, amount of extreme pixels (eg noise) to ignore when finding maximum R, G or B channel values.
                               -1.0 is OFF, input channel maximum set to 255, as in levels(input_min,gamma,255, ... ).
                               If hiTh >=0.0, then will scan frame looking for highest pixel value whose cumlative sum
                               [including all pixels counts of higher value pixels] is greater than hiTh%.
                               hiTh, only shown in metrics if greater or equal to 0.0 ie switched ON (Always shown when Verbosity=3=FULL).

    Scale, default 0           Range 0 -> 2. No Effect unless Scale > 0 and loTh and/or hiTh >= 0.0.
                                    where described for Red Channel only:-
                                     RedMin = Red_Channel_Minimum(ignorePerc=loTh)    # Pixel minimum for red channel, ignoring up to loTh%, ie noise.
                                     RedMax = Red_Channel_Maximum(ignorePerc=hiTh)    # Pixel maximum for red channel, ignoring up to hiTh%, ie noise.
                                     RedAve = Red_Channel_Average()                   # Pixel average for red Channel.
                                 0 (Scale==0 || (loTh==-1.0 && hiTh==-1.0)) No Effect.
                                     in_min = RedMin = GrnMin = BluMin = 0
                                     in_max = RedMax = GrnMax = BluMax = 255
                                     scaledAveR = RedAve
                                     scaledAveG = GrnAve
                                     scaledAveB = BluAve
                                 1) Scales input channel average maximum dynamic range of R,G,B, to 0.0->(ChanAve-in_min)*255.0/(in_max-in_min+(in_max==in_min))
                                     in_min = min(RedMin,GrnMin,BluMin)
                                     in_max = max(RedMax,GrnMax,BluMax)
                                     in_Rng = in_max - in_min
                                     scaler = (in_Rng==0) ? 255.0 : 255.0 / (in_max - in_min+(in_max==in_min))
                                     scaledAveR = min(max((RedAve - in_min) * scaler,0.0),255.0)
                                     scaledAveG = min(max((GrnAve - in_min) * scaler,0.0),255.0)
                                     scaledAveB = min(max((BluAve - in_min) * scaler,0.0),255.0)
                                 2) Scales input channel average dynamic range of R & G & B, Individually, to 0.0->(ChanAve-Chan_min)*255.0/(ChanMax-ChanMin)
                                     in_RngR = RedMax - RedMin
                                     in_RngG = GrnMax - GrnMin
                                     in_RngB = BluMax - BluMin
                                     scalerR = (In_RngR==0) ? 255.0 : 255.0 / (RedMax-RedMin+(RedMax==RedMin))
                                     scalerG = (In_RngG==0) ? 255.0 : 255.0 / (GrnMax-GrnMin+(GrnMax==GrnMin))
                                     scalerB = (In_RngB==0) ? 255.0 : 255.0 / (BluMax-BluMin+(BluMax==BluMin))
                                     scaledAveR = min(max((RedAve - RedMin) * scalerR,0.0),255.0)
                                     scaledAveG = min(max((GrnAve - GrnMin) * scalerG,0.0),255.0)
                                     scaledAveB = min(max((BluAve - BluMid) * scalerB,0.0),255.0)

    x,y,w,h. All Default 0.    Area of frame to sample when getting averages and estimating Gamma function, allows to ignore rubbish at frame edges.
                               Specified as for crop ie x=10,y=20,w=-30,h=-40, as in crop(10,20,-30,-40).
Fred, I am aware of and working on Black Frame/single color frame, problem, especially tricky if single value channel that is also lock channel.
Anyway, above most recent working version without diagnostic stuff.



EDIT: Above image (Verbosity=3 Full metrics), LockChan= -3 (Median), and in above instance red channel is the median channel and so shown in Flags as '0' red channel
for the current frame, 'S' and 'L' flags are both 'Greyed Out').

EDIT: I have to admit to a little puzzlement as to why above 'S' flag is Greyed Out when we are using Scale=1.
Well, as all channel minimums are 0, and all channel maximums are 255, there is no Scaling for this frame.
(I forgot how it works , guess I'll havta put that in the doc. )
__________________
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; 15th June 2018 at 14:37.
StainlessS is offline   Reply With Quote
Old 28th July 2016, 22:38   #44  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,981
Yo Fred, here v1.06Beta1,:- LINK REMOVED

Have rearranged args to more sensible order, renamed or changed args (was necessary) and changed defaults in some cases.

If you have any problems with changes then say (although functionality may suffer if having to put back as was).

here update doc.
Code:
GamMac(), [Gamma Machine] An extraordinary Idea by VideoFred (the gent from Gent). Coded by StainlessS.

    Home Thread:- http://forum.doom9.org/showthread.php?p=1774281#post1774281
    Idea:-        http://forum.doom9.org/showthread.php?t=173683

RGB Only.

    Useful to correct color cast on old 8mm films.
    Alters channel pixel average to match LockChan using Gamma correction. (By default alters Red and Blue channels to match Green).
    Additional tweaking via RedMul, GrnMul and BluMul multipliers.

    What it does(roughly):-
        Gets Channel averages, minimums, and maximums (using loTh for minumums and hiTh for maximums).
        if(Scale > 0 and loTh>=0.0 and hiTh>=0.0) then  rescale averages using dynamic range of r,g,b [0.0 -> DynamicRange(R,G,B)]
        For each channel, estimate gamma function that will remap (scaled channel average * channel multiplier) to match a particular
        LockVal (chosen via LockChan). Render frame using the output averages from estimated gamma.

GamMac(clip c,int "LockChan"=1,int "Scale"=0,
      \ Float "RedMul"=1.0,Float "GrnMul"=1.0, Float "BluMul"=1.0,
      \ Float "Th"= 0.0,Float "loTh"=Th,Float "hiTh"=Th,
      \ Float "LockVal"=128.0,Float "RngLim"=10.0,Float "GamMax"=10.0,
      \ int "x"=0,int "y"=0,int "w"=0,int "h"=0,
      \ Bool "Show"=false,int "Verbosity"=1
      \ )

    LockChan Default 1(Grn).    Channel for lock to Average. [range -3 -> 2]
                                0 ] LockVal = Scaled(RedAve)
                                1 ] LockVal = Scaled(GreenAve)
                                2 ] LockVal = Scaled(BlueAve)
                                -1] LockVal = Use explicit LockVal arg (see below).
                                -2] LockVal = (Scaled(RedAve)+Scaled(GrnAve)+Scaled(BluAve))/3.0.
                                -3] LockVal = Median(Scaled(RedAve),Scaled(GrnAve),Scaled(BluAve))
                                Where Scaled(Channel Average) depends upon Scale, and loTh, and hiTh.

    Scale, default 0           Range 0 -> 2. No Effect unless Scale > 0 and loTh and/or hiTh >= 0.0.
                                    where described for Red Channel only:-
                                     RedMin = Red_Channel_Minimum(ignorePerc=loTh)    # Pixel minimum for red channel, ignoring up to loTh%, ie noise.
                                     RedMax = Red_Channel_Maximum(ignorePerc=hiTh)    # Pixel maximum for red channel, ignoring up to hiTh%, ie noise.
                                     RedAve = Red_Channel_Average()                   # Pixel average for red Channel.
                                 0 (Scale==0 || (loTh==-1.0 && hiTh==-1.0)) No Effect.
                                     in_min = RedMin = GrnMin = BluMin = 0
                                     in_max = RedMax = GrnMax = BluMax = 255
                                     scaledAveR = RedAve
                                     scaledAveG = GrnAve
                                     scaledAveB = BluAve
                                 1) Scales input channel average maximum dynamic range of R,G,B, to 0.0->(ChanAve-in_min)*255.0/(in_max-in_min+(in_max==in_min))
                                     in_min = min(RedMin,GrnMin,BluMin)
                                     in_max = max(RedMax,GrnMax,BluMax)
                                     in_Rng = in_max - in_min
                                     scaler = (in_Rng==0) ? 255.0 : 255.0 / (in_max - in_min)
                                     scaledAveR = min(max((RedAve - in_min) * scaler,0.0),255.0)
                                     scaledAveG = min(max((GrnAve - in_min) * scaler,0.0),255.0)
                                     scaledAveB = min(max((BluAve - in_min) * scaler,0.0),255.0)
                                 2) Scales input channel average dynamic range of R & G & B, Individually, to 0.0->(ChanAve-Chan_min)*255.0/(ChanMax-ChanMin)
                                     in_RngR = RedMax - RedMin
                                     in_RngG = GrnMax - GrnMin
                                     in_RngB = BluMax - BluMin
                                     scalerR = (In_RngR==0) ? 255.0 : 255.0 / (RedMax-RedMin)
                                     scalerG = (In_RngG==0) ? 255.0 : 255.0 / (GrnMax-GrnMin)
                                     scalerB = (In_RngB==0) ? 255.0 : 255.0 / (BluMax-BluMin)
                                     scaledAveR = min(max((RedAve - RedMin) * scalerR,0.0),255.0)
                                     scaledAveG = min(max((GrnAve - GrnMin) * scalerG,0.0),255.0)
                                     scaledAveB = min(max((BluAve - BluMid) * scalerB,0.0),255.0)

    RedMul, default 1.0         Red channel multiplier adjustment.   [0.1 <= RedMul <= 10.0]
    GrnMul, default 1.0         Green channel multiplier adjustment. [0.1 <= GrnMul <= 10.0]
    BluMul, default 1.0         Blue channel multiplier adjustment.  [0.1 <= BluMul <= 10.0]
                                Scaled averages are multiplied by their multiplier then given as args to the gamma estimator.
                                Allow tweaking of R,G,B channels.
                                   Above Multipliers only shown in metrics when at least one is != 1.0 (Always shown when Verbosity=3=FULL).

    Th, Default 0.0            Sets Default for loTh and hiTh. Suggest Default, 0.0(percent).  [-1.0(OFF) , or 0.0 -> 2.0]
    loTh, Default Th           As for Ignore_low in AutoLevels, or Threshold in YPlaneMin.  [-1.0, or 0.0 -> 2.0]
                               Percent, amount of extreme pixels (eg noise) to ignore when finding minimum R, G or B channel values.
                               -1.0 is OFF, input channel minimum is set to 0 as for levels(0,gamma,input_max, ... ).
                               If loTh >=0.0, then will scan frame looking for lowest pixel value whose cumlative sum
                               [including all pixels counts of lower value pixels] is greater than loTh%.
                               loTh, only shown in metrics if greater or equal to 0.0 ie switched ON (Always shown when Verbosity=3=FULL).
    hiTh, Default Th           As for Ignore_high in AutoLevels, or Threshold in YPlaneMax. [-1.0, or 0.0 -> 2.0]
                               Percent, amount of extreme pixels (eg noise) to ignore when finding maximum R, G or B channel values.
                               -1.0 is OFF, input channel maximum set to 255, as in levels(input_min,gamma,255, ... ).
                               If hiTh >=0.0, then will scan frame looking for highest pixel value whose cumlative sum
                               [including all pixels counts of higher value pixels] is greater than hiTh%.
                               hiTh, only shown in metrics if greater or equal to 0.0 ie switched ON (Always shown when Verbosity=3=FULL).

    LockVal, default 128.0     Only used if LockChan = -1.0. [0.0 < LockVal < 255.0] (set via LockChan if LockChan != -1)
                               There is no restricted range on this (other than 0.0 < LockVal < 255.0), so if you set a stupid value,
                               you will likely get stupid results.

    RngLim, default 10.0       If any input channel average is nearer than this to either channel minimum or channel maximum, then no effect on that channel.
                               [4.0 <= RngLim <= 32.0]
                               Allows to skip remapping of a channel where input channel average (un-scaled) is too close to either channel
                               minimum or maximum, ie avoid remapping of Black, White frames, or single color frames.

    GamMax, default 10.0       Upper value for guess gamma [2.0 <= GamMax <= 10.0]
                                   Starting guess upper range and limit for gamma estimator (probably best left alone).
                                   The lower guess range and limit will be set to 1.0 / GamMax, by default 0.1.

    x,y,w,h. All Default 0.    Area of frame to sample when getting averages and estimating Gamma function, allows to ignore rubbish at frame edges.
                               Specified as for crop ie x=10,y=20,w=-30,h=-40, as in crop(10,20,-30,-40).

    Show, default false        True, show metrics info on frame.
    Verbosity, default 1       0 = Only upper frame metrics
                               1 = Upper + important ones. (default)
                               2 = Nearly Full metrics.
                               3 = Full Metrics
                               Upper frame metrics shown as eg:- (when Verbosity=3=FULL)

                                  nnnnn] Flags:- 1SR
                                             R         G         B
                                  IN:      10,253    10,253    10,253
                                  IN_AVE:  78.466    88.552    78.767
                                  SCALED:  71.847    82.431    72.162
                                  GAMMA:    1.135     1.000     1.123
                                  OUTAVE:  82.431    82.422    82.451

                               where,
                                  nnnnn, is the frame number.
                                  Flags:- (Specific to current frame, can change frame to frame)
                                      '1' = LockChan, as above, channel '1'[ScaleAveG].
                                            Can be, '0', '1', '2' [ScaleAve Channel number LockChan=-3(median) assigns '0', '1' or '2' as appropriate]
                                                    'A'[LockChan=-2, (ScaleAveR+ScaleAveG+ScaleAveB)/3.0]
                                                    'V'[LockChan=-1, Explicit LockVal]
                                      'S' = Scale, mode signfied by color.
                                            Greyed out. Scale = 0(No Effect).May be Greyed out if all channels Min/Max are 0,255.
                                            White.  Scale = 1[Scales input channel average maximum dynamic range of R,G,B]
                                            Orange. Scale = 2[Scales input channel average dynamic range of R and G and B, Individually]
                                      'R' = Limited by RngLim, mode signfied by color.
                                            Greyed out. Not Range Limited.
                                            Red, at least 1 channel has remapping disabled.
                                  IN:     Shows comma separated channel minimum and maximum (dependent upon Scale, loTh, hiTh).
                                  IN_AVE: Input channel averages.
                                  SCALED: Scaled input averages, (dependent upon Scale, loTh, hiTh, channel minumums and maximums).
                                  GAMMA:  Estimated gamma to achieve lockval for channel. (dependent upon pretty much everything).
                                  OUTAVE: Output channel average ie rendered result.
Check it out with black / white / and single color frames (should leave without alteration).

Report any problems you may encounter. Thanx.

EDIT: Fred, here frame given random color ($204080),


Scale = 1, alters the frame but only non RngLim-ited channel, I could make it disable all channel alterations where a
single channel is RngLim-ited.
EDIT: Maybe I should disable all channel mods when RngLim triggered for Scale==0 and Scale==1, and only disable for
channels that trigger RngLim when Scale==2.

EDIT: Supposed Beluga Whale, with not much info in red channel.


Scale=1 is same as Scale=0, due to combined R,G,B dynamic range being 0->255 (R min=0, G max=255),
whereas Scale=2 scales channels individually.

EDIT: Fred, I feel like the last Dalek in Dr Who, S01E06 (Eccelston), "where shall I get my orders now",
give me some orders now, what do you want ?
__________________
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; 15th June 2018 at 14:38.
StainlessS is offline   Reply With Quote
Old 28th July 2016, 23:15   #45  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 776
Quote:
Originally Posted by StainlessS View Post
Supposed Beluga Whale
Joke? gfy gives random stupid names to uploads, it is just a coincidence to get whale or whatever
__________________
VirtualDub2
shekh is offline   Reply With Quote
Old 29th July 2016, 09:23   #46  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Quote:
Originally Posted by StainlessS View Post
Fred, I feel like the last Dalek in Dr Who, S01E06 (Eccelston), "where shall I get my orders now",
give me some orders now, what do you want ?
Haha Doktorrrrr it already does much more than I ever wanted.

Going to test v1.06Beta1 and report back here. Please give me a few days for this because I'm testing it on all kinds of scenes: over exposed, under exposed, blue cast, green cast etc... etc...

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest
videoFred is offline   Reply With Quote
Old 29th July 2016, 13:59   #47  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,981
Fred, I've had an idea to check for single color frame at beginning of CPP GetFrame(), and if single color then do no further scaling etc,
just show on upper metrics, maybe the input min and max and also averages, and flag to show single color 'No action', this would
make things much easier (this plugin is doin' my head in, too many alternative ways to do things, and each of the -ve LockChans
complicate and make it necessary to backtrack and undo metrics, would have been a lot simpler without the belated add-ons).

I'll knock up a quick function to demo single color frame detection for anybody to play with.
Probably will not update GamMac today.
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 29th July 2016, 16:15   #48  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,981
Here first version using channel min, max and Average, not so successful as I had hoped.

Code:
Function IsSingleColorFrame(clip c,Int n,Float "Tol",Float "Th",String "Matrix",Int "X",Int "Y",Int"W",Int"H",Bool "Debug") {
    # n = Frame Number, eg call with current_frame from ScriptClip (Best if RGB already)
    c
    myName="IsSingleColorFrame: "
    Tol=Default(Tol,2.5)                                                    # Suggest about 4.0 to 8.0
    Th=Default(Th,0.4)                                                      # Ingnore up to about 1 pixel in every 250 (noise), suggest 0.4.
    Matrix=Default(Matrix,(Width>=1100||Height>=600)?"Rec709":"Rec601")     # ConvertToRGB24
    (!IsRGB)?ConvertToRGB24(Matrix=Matrix):NOP
    Chan=-1                                                                 # R, and G, and B.
    Flgs=$13                                                                # RT_RgbChanMin, RT_RgbChanMax, RT_RgbChanAve.
    Prefix="ISCF_"                                                          # Returned local vars name prefix.
    RT_RgbChanStats(n,x=X,y=Y,W=W,h=H,threshold=Th,chan=Chan,flgs=Flgs,prefix=Prefix)  # Simultaneous stats.
    Result= (
        \ (ISCF_Ave_0-ISCF_Min_0<=Tol || ISCF_Max_0-ISCF_Ave_0<=Tol) &&
        \ (ISCF_Ave_1-ISCF_Min_1<=Tol || ISCF_Max_1-ISCF_Ave_1<=Tol) &&
        \ (ISCF_Ave_2-ISCF_Min_2<=Tol || ISCF_Max_2-ISCF_Ave_2<=Tol)
        \ )
    (Debug)
        \ ? RT_DebugF("RMin=%d RMax=%d RAve=%.3f : GMin=%d GMax=%d GAve=%.3f : BMin=%d BMax=%d BAve=%.3f : Result=%s",
        \ ISCF_Min_0,ISCF_Max_0,ISCF_Ave_0,
        \ ISCF_Min_1,ISCF_Max_1,ISCF_Ave_1,
        \ ISCF_Min_2,ISCF_Max_2,ISCF_Ave_2,
        \ Result,name=myName)
        \ : NOP
   Return Result
}

AviSource("D:\V\StarWars.avi") ConvertToRGB24
DEBUG=TRUE
INDICATOR=32

SSS="""
    n=current_frame
    T=IsSingleColorFrame(n,h=-INDICATOR,Debug=DEBUG)
    (T)?crop(0,0,0,-INDICATOR):NOP
    (T)?AddBorders(0,0,0,INDICATOR,$FF0055):NOP
    return Last
"""

AddBorders(0,0,0,INDICATOR,$000000)

ScriptClip(SSS)
And one just using channel MinMaxDifference
Code:
Function IsSingleColorFrame(clip c,Int n,Float "Tol",Float "Th",String "Matrix",Int "X",Int "Y",Int"W",Int"H",Bool "Debug") {
    # n = Frame Number, eg call with current_frame from ScriptClip (Best if RGB already)
    c
    myName="IsSingleColorFrame: "
    Tol=Default(Tol,2.0)                                                    # Suggest about 4.0 to 8.0
    Th=Default(Th,0.4)                                                      # Ingnore up to about 1 pixel in every 250 (noise), suggest 0.4.
    Matrix=Default(Matrix,(Width>=1100||Height>=600)?"Rec709":"Rec601")     # ConvertToRGB24
    (!IsRGB)?ConvertToRGB24(Matrix=Matrix):NOP
    Chan=-1                                                                 # R, and G, and B.
    Flgs=$04                                                                # RT_RgbChanMinMaxDifference
    Prefix="ISCF_"                                                          # Returned local vars name prefix.
    RT_RgbChanStats(n,x=X,y=Y,W=W,h=H,threshold=Th,chan=Chan,flgs=Flgs,prefix=Prefix)  # Simultaneous stats.
    Result= (
        \ (ISCF_MinMaxDiff_0<=Tol) &&
        \ (ISCF_MinMaxDiff_1<=Tol) &&
        \ (ISCF_MinMaxDiff_2<=Tol)
        \ )
    (Debug)
        \ ? RT_DebugF("%d %d %d : Result=%s",
        \ ISCF_MinMaxDiff_0,
        \ ISCF_MinMaxDiff_1,
        \ ISCF_MinMaxDiff_2,
        \ Result,name=myName)
        \ : NOP
    return Result
}

AviSource("D:\V\StarWars.avi") ConvertToRGB24

DEBUG=TRUE
INDICATOR=32

SSS="""
    n=current_frame
    T=IsSingleColorFrame(n,h=-INDICATOR,Debug=DEBUG)
    (T)?crop(0,0,0,-INDICATOR):NOP
    (T)?AddBorders(0,0,0,INDICATOR,$FF0055):NOP
    return Last
"""

AddBorders(0,0,0,INDICATOR,$000000)

ScriptClip(SSS)
Will not be so noise tolerant.

Scripts show Red border at bottom of clip when single color frame detected.

We need more experimentation

Gotta catch my bus now.
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 30th July 2016, 18:30   #49  |  Link
dani75
Registered User
 
Join Date: Jul 2016
Location: Paris, France
Posts: 12
Attached Images
 

Last edited by dani75; 1st August 2016 at 22:01.
dani75 is offline   Reply With Quote
Old 21st August 2016, 13:24   #50  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
New GamMac test results

I have tested GamMac on all kinds of old 8mm footage by now.

My favorite fixed settings are:
----------------------------------
LockChan = 1
Verbosity = 1
Scale = 2
x=20, y=20, w=-20, h=-20 (to avoid border artefacts messing up the filter results)

These settings are variable, depending on the source:
----------------------------------------------------
LoTh: 0.04 is a good start point
HiTh : same as loTh

RedMul, GrnMul, Blumul: startvalue 1.00, then adjusting depending on the source.

I have here a Regular-8 reel from 1965. It was made in Greece and for some reason most of the colors are gone.
I assume this film was not well developed in the lab.
At the end result, the only colors left over are red and cyan.

With special thanks to Dr. Matthias Weisser and his family from Munich to make this film available for testing and publishing here.


GamMac is correcting the green cast very well, restoring true white:


A few frames further, the color cast changes suddenly to blue but the GamMac result stays the same


A few more GamMac examples:



This is my workflow: as you can see here I have changed the red and cyan hue after GamMac


Another example, only GamMac:


GamMac + color corrected:


And this last example is only GamMac:



And of cource special thanks to our friend StainlessS for making this wonderful rust proof filter.

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest

Last edited by videoFred; 4th September 2016 at 13:12.
videoFred is offline   Reply With Quote
Old 21st August 2016, 18:12   #51  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,699
Oh wow, I've got to try this filter!

I have been asked to re-transfer some early color film that may be used for broadcast, and this looks like the results are far better than I can do by hand. The ability to track color changes and make sensible adjustments is particularly intriguing. For me, color grading is the most time-consuming part of film transfer and restoration.

P.S. VideoFred, which version of the filter did you use for the tests you just posted?

Last edited by johnmeyer; 21st August 2016 at 18:14. Reason: added P.S.
johnmeyer is offline   Reply With Quote
Old 21st August 2016, 18:58   #52  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Quote:
Originally Posted by johnmeyer View Post
Oh wow, I've got to try this filter!
Yes, actualy I was waiting for a response from you because we are working with the same kind of films

Quote:
For me, color grading is the most time-consuming part of film transfer and restoration.
GamMac will take a lot of work out of your hands, believe me! Not only it corrects color cast, but also levels. But you will have to fine tune it sometimes as I explained above here.

Quote:
P.S. VideoFred, which version of the filter did you use for the tests you just posted?
Version V1.06B1, it can be found here:
StainlessS@SendSpace (working link in StanlessS signature)

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest
videoFred is offline   Reply With Quote
Old 21st August 2016, 19:48   #53  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,699
Thanks!!
johnmeyer is offline   Reply With Quote
Old 3rd October 2016, 18:54   #54  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,981
GamMac v1.06 Beta02, See MediaFire in sig below.

Code:
GamMac(), [Gamma Machine] An extraordinary Idea by VideoFred (the gent from Gent). Coded by StainlessS.

    Home Thread:- http://forum.doom9.org/showthread.php?p=1774281#post1774281
    Idea:-        http://forum.doom9.org/showthread.php?t=173683

RGB Only.

    Useful to correct color cast on old 8mm films.
    Alters channel pixel average to match LockChan using Gamma correction. (By default alters Red and Blue channels to match Green).
    Additional tweaking via RedMul, GrnMul and BluMul multipliers.

    What it does(roughly):-
        Gets Channel averages, minimums, and maximums (using loTh for minumums and hiTh for maximums).
        if(Scale > 0 and loTh>=0.0 and hiTh>=0.0) then  rescale averages using dynamic range of r,g,b [0.0 -> DynamicRange(R,G,B)]
        For each channel, estimate gamma function that will remap (scaled channel average * channel multiplier) to match a particular
        LockVal (chosen via LockChan). Render frame using the output averages from estimated gamma.

GamMac(Clip c,int "LockChan"=1,int "Scale"=2,
      \ Float "RedMul"=1.0,Float "GrnMul"=1.0, Float "BluMul"=1.0,
      \ Float "Th"= 0.04,Float "loTh"=Th,Float "hiTh"=Th,
      \ Float "LockVal"=128.0,Float "RngLim"=10.0,Float "GamMax"=10.0,
      \ Clip "dc",
      \ int "x"=20,int "y"=20,int "w"=-20,int "h"=-20,
      \ Bool "Show"=True,int "Verbosity"=1
      \ )

    LockChan Default 1(Grn).    Channel for lock to Average. [range -3 -> 2]
                                0 ] LockVal = Scaled(RedAve)
                                1 ] LockVal = Scaled(GreenAve)
                                2 ] LockVal = Scaled(BlueAve)
                                -1] LockVal = Use explicit LockVal arg (see below).
                                -2] LockVal = (Scaled(RedAve)+Scaled(GrnAve)+Scaled(BluAve))/3.0.
                                -3] LockVal = Median(Scaled(RedAve),Scaled(GrnAve),Scaled(BluAve))
                                Where Scaled(Channel Average) depends upon Scale, and loTh, and hiTh.

    Scale, default 2           Range 0 -> 2. No Effect unless Scale > 0 and loTh and/or hiTh >= 0.0.
                                    where described for Red Channel only:-
                                     RedMin = Red_Channel_Minimum(ignorePerc=loTh)    # Pixel minimum for red channel, ignoring up to loTh%, ie noise.
                                     RedMax = Red_Channel_Maximum(ignorePerc=hiTh)    # Pixel maximum for red channel, ignoring up to hiTh%, ie noise.
                                     RedAve = Red_Channel_Average()                   # Pixel average for red Channel.
                                 0 (Scale==0 || (loTh==-1.0 && hiTh==-1.0)) No Effect.
                                     in_min = RedMin = GrnMin = BluMin = 0
                                     in_max = RedMax = GrnMax = BluMax = 255
                                     scaledAveR = RedAve
                                     scaledAveG = GrnAve
                                     scaledAveB = BluAve
                                 1) Scales input channel average maximum dynamic range of R,G,B, to 0.0->(ChanAve-in_min)*255.0/(in_max-in_min+(in_max==in_min))
                                     in_min = min(RedMin,GrnMin,BluMin)
                                     in_max = max(RedMax,GrnMax,BluMax)
                                     in_Rng = in_max - in_min
                                     scaler = (in_Rng==0) ? 255.0 : 255.0 / (in_max - in_min)
                                     scaledAveR = min(max((RedAve - in_min) * scaler,0.0),255.0)
                                     scaledAveG = min(max((GrnAve - in_min) * scaler,0.0),255.0)
                                     scaledAveB = min(max((BluAve - in_min) * scaler,0.0),255.0)
                                 2) Scales input channel average dynamic range of R & G & B, Individually, to 0.0->(ChanAve-Chan_min)*255.0/(ChanMax-ChanMin)
                                     in_RngR = RedMax - RedMin
                                     in_RngG = GrnMax - GrnMin
                                     in_RngB = BluMax - BluMin
                                     scalerR = (In_RngR==0) ? 255.0 : 255.0 / (RedMax-RedMin)
                                     scalerG = (In_RngG==0) ? 255.0 : 255.0 / (GrnMax-GrnMin)
                                     scalerB = (In_RngB==0) ? 255.0 : 255.0 / (BluMax-BluMin)
                                     scaledAveR = min(max((RedAve - RedMin) * scalerR,0.0),255.0)
                                     scaledAveG = min(max((GrnAve - GrnMin) * scalerG,0.0),255.0)
                                     scaledAveB = min(max((BluAve - BluMid) * scalerB,0.0),255.0)

    RedMul, default 1.0         Red channel multiplier adjustment.   [0.1 <= RedMul <= 10.0]
    GrnMul, default 1.0         Green channel multiplier adjustment. [0.1 <= GrnMul <= 10.0]
    BluMul, default 1.0         Blue channel multiplier adjustment.  [0.1 <= BluMul <= 10.0]
                                Scaled averages are multiplied by their multiplier then given as args to the gamma estimator.
                                Allow tweaking of R,G,B channels.
                                   Above Multipliers only shown in metrics when at least one is != 1.0 (Always shown when Verbosity=3=FULL).

    Th, Default 0.04           Sets Default for loTh and hiTh. Suggest Default, 0.04(percent).  [-1.0(OFF) , or 0.0 -> 1.0]
    loTh, Default Th           As for Ignore_low in AutoLevels, or Threshold in YPlaneMin.  [-1.0, or 0.0 -> 1.0]
                               Percent, amount of extreme pixels (eg noise) to ignore when finding minimum R, G or B channel values.
                               -1.0 is OFF, input channel minimum is set to 0 as for levels(0,gamma,input_max, ... ).
                               If loTh >=0.0, then will scan frame looking for lowest pixel value whose cumlative sum
                               [including all pixels counts of lower value pixels] is greater than loTh%.
                               loTh, only shown in metrics if greater or equal to 0.0 ie switched ON (Always shown when Verbosity=3=FULL).
    hiTh, Default Th           As for Ignore_high in AutoLevels, or Threshold in YPlaneMax. [-1.0, or 0.0 -> 1.0]
                               Percent, amount of extreme pixels (eg noise) to ignore when finding maximum R, G or B channel values.
                               -1.0 is OFF, input channel maximum set to 255, as in levels(input_min,gamma,255, ... ).
                               If hiTh >=0.0, then will scan frame looking for highest pixel value whose cumlative sum
                               [including all pixels counts of higher value pixels] is greater than hiTh%.
                               hiTh, only shown in metrics if greater or equal to 0.0 ie switched ON (Always shown when Verbosity=3=FULL).

    LockVal, default 128.0     Only used if LockChan = -1.0. [0.0 < LockVal < 255.0] (set via LockChan if LockChan != -1)
                               There is no restricted range on this (other than 0.0 < LockVal < 255.0), so if you set a stupid value,
                               you will likely get stupid results.

    RngLim, default 10.0       If any input channel average is nearer than this to either channel minimum or channel maximum, then no effect on that channel.
                               [4.0 <= RngLim <= 32.0]
                               Allows to skip remapping of a channel where input channel average (un-scaled) is too close to either channel
                               minimum or maximum, ie avoid remapping of Black, White frames, or single color frames.

    GamMax, default 10.0       Upper value for guess gamma [2.0 <= GamMax <= 10.0]
                                   Starting guess upper range and limit for gamma estimator (probably best left alone).
                                   The lower guess range and limit will be set to 1.0 / GamMax, by default 0.1.

    dc, default clip c.        Detection clip, Must be same ColorSpace and FrameCount as source clip, no other similarities enforced.
                               (can be different size, denoised etc).

    x,y,w,h. All Default 20.    Area of dc Detect clip frame to sample when getting averages and estimating Gamma function, allows to ignore rubbish at frame edges.
                               Specified as for crop ie x=10,y=20,w=-30,h=-40, as in crop(10,20,-30,-40).

    Show, default true        True, show metrics info on frame.
    Verbosity, default 1       0 = Only upper frame metrics
                               1 = Upper + important ones. (default)
                               2 = Nearly Full metrics.
                               3 = Full Metrics
                               Upper frame metrics shown as eg:- (when Verbosity=3=FULL)

                                  nnnnn] Flags:- 1SR
                                             R         G         B
                                  IN:      10,253    10,253    10,253
                                  IN_AVE:  78.466    88.552    78.767
                                  SCALED:  71.847    82.431    72.162
                                  GAMMA:    1.135     1.000     1.123
                                  OUTAVE:  82.431    82.422    82.451

                               where,
                                  nnnnn, is the frame number.
                                  Flags:- (Specific to current frame, can change frame to frame)
                                      '1' = LockChan, as above, channel '1'[ScaleAveG].
                                            Can be, '0', '1', '2' [ScaleAve Channel number LockChan=-3(median) assigns '0', '1' or '2' as appropriate]
                                                    'A'[LockChan=-2, (ScaleAveR+ScaleAveG+ScaleAveB)/3.0]
                                                    'V'[LockChan=-1, Explicit LockVal]
                                      'S' = Scale, mode signfied by color.
                                            Greyed out. Scale = 0(No Effect).May be Greyed out if all channels Min/Max are 0,255.
                                            White.  Scale = 1[Scales input channel average maximum dynamic range of R,G,B]
                                            Orange. Scale = 2[Scales input channel average dynamic range of R and G and B, Individually]
                                      'R' = Limited by RngLim, mode signfied by color.
                                            Greyed out. Not Range Limited.
                                            Red, at least 1 channel has remapping disabled.
                                  IN:     Shows comma separated channel minimum and maximum (dependent upon Scale, loTh, hiTh).
                                  IN_AVE: Input channel averages.
                                  SCALED: Scaled input averages, (dependent upon Scale, loTh, hiTh, channel minumums and maximums).
                                  GAMMA:  Estimated gamma to achieve lockval for channel. (dependent upon pretty much everything).
                                  OUTAVE: Output channel average ie rendered result.

                               ALL metrics derived from the detection clip dc.
Fred, Added dc (detection clip) and modified args as per orders.
The RngLim thing still dont work at all well, I'll havta fix that.
__________________
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; 3rd October 2016 at 18:59.
StainlessS is offline   Reply With Quote
Old 4th October 2016, 10:27   #55  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Quote:
Originally Posted by StainlessS View Post
Fred, Added dc (detection clip) and modified args as per orders.
Thank you! It is good to set x,y,w,h to 20 by default.

As you know, I already use RemoveDirt() before Gammac. So the detection clip has no use for me.. But I could try extreme settings and see what I get.

Quote:
The RngLim thing still dont work at all well, I'll havta fix that.
For now, I add a small 2 to 6 pixels pure white border before Gammac to avoid over-adjusting and this works very well.


PS: Gammac works great on my old 1970's photos too!




Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest

Last edited by videoFred; 4th October 2016 at 11:18. Reason: added picture
videoFred is offline   Reply With Quote
Old 4th October 2016, 14:24   #56  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,981
In the words of Harry Potter, "I love magic".

Perhaps that's the Hogwart's Express. (at least platform 9.75)

Quote:
For now, I add a small 2 to 6 pixels pure white border before Gammac to avoid over-adjusting
I'll add output r,g,b max and min targets, as currently set at 0, and 255 (should avoid above, probably
one for each min and max, not for each channel, unless that is required).
__________________
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; 4th October 2016 at 14:49.
StainlessS is offline   Reply With Quote
Old 4th October 2016, 14:51   #57  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Quote:
Originally Posted by StainlessS View Post
In the words of Harry Potter, "I love magic".
Me too
Quote:
Perhaps that's the Hogwart's Express. (at least platform 9.75)
Haha, no it's the last steam engine from the Belgian Railroad. His last official ride was way back in 1966. The photo is from a 1970's steam festival.

I had to do some additional color corrections on the steam engine picture, but the landscape picture is Gammac only, I only had to do some very minor RedMul and Blumul corrections.

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest
videoFred is offline   Reply With Quote
Old 6th October 2016, 22:47   #58  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,981
GamMac v1.06Beta3:- LINK DELETED

Added omin, omax args. Mod to RngLim.

Code:
GamMac(), [Gamma Machine] An extraordinary Idea by VideoFred (the gent from Gent). Coded by StainlessS.

    Home Thread:- http://forum.doom9.org/showthread.php?p=1774281#post1774281
    Idea:-        http://forum.doom9.org/showthread.php?t=173683

RGB Only.

    Useful to correct color cast on old 8mm films.
    Alters channel pixel average to match LockChan using Gamma correction. (By default alters Red and Blue channels to match Green).
    Additional tweaking via RedMul, GrnMul and BluMul multipliers.

    What it does(roughly):-
        Firstly, RAW input channel Ranges are measured for all three channels (see RngLim).
        If ALL THREE raw input ranges are less than RngLim (single color frame), then for current frame,
          there is no scaling nor gamma estimation, and only linear rendering is done to output range omin -> omax.
        OtherWise,
            If ANY ONE channel input range is less than RngLim and Scale==2, then Scale is (for current frame) knocked down to Scale=1.
            Get Channel averages, minimums, and maximums (using loTh for minimums and hiTh for maximums).
            if(Scale==0 || loTh<0.0 a|| hiTh<0.0) then
                No rescaling.
            if(Scale == 1 and loTh>=0.0 and hiTh>=0.0) then
                rescales averages using combined dynamic range of r,g,b ie 0.0 -> (max(redMax,grnMax,bluMax) - min(redMin,grnMin,bluMin)).
            else if(Scale == 2 and loTh>=0.0 and hiTh>=0.0) then
                rescales averages using separate dynamic ranges ie 0.0->(redMax-redMin), 0.0->(grnMax-grnMin), 0.0->(bluMax-bluMin).
            For each channel, estimate gamma function that will remap (scaled channel average * channel multiplier) to match a particular
            LockVal (chosen via LockChan) when rendered to the chosen output range specified by omin and omax.
            Then renders frame using the output averages from estimated gamma with output channel minimums at omin, and maximums at omax.

GamMac(Clip c,int "LockChan"=1,int "Scale"=2,
      \ Float "RedMul"=1.0,Float "GrnMul"=1.0, Float "BluMul"=1.0,
      \ Float "Th"= 0.04,Float "loTh"=Th,Float "hiTh"=Th,
      \ Float "LockVal"=128.0,int "RngLim"=11,Float "GamMax"=10.0,
      \ Clip "dc",
      \ int "x"=20,int "y"=20,int "w"=-20,int "h"=-20,
      \ int "omin"=0, int "omax"=255,
      \ Bool "Show"=True,int "Verbosity"=1
      \ )

    LockChan Default 1(Grn).    Channel for lock to Average. [range -3 -> 2]
                                 0 ] LockVal = Scaled(RedAve)
                                 1 ] LockVal = Scaled(GreenAve)
                                 2 ] LockVal = Scaled(BlueAve)
                                 -1] LockVal = Use explicit LockVal arg (see below).
                                 -2] LockVal = (Scaled(RedAve)+Scaled(GrnAve)+Scaled(BluAve))/3.0. [Mean]
                                 -3] LockVal = Median(Scaled(RedAve),Scaled(GrnAve),Scaled(BluAve))
                                Where Scaled(Channel Average) depends upon RngLim, Scale, and loTh, and hiTh.

    Scale, default 2           Range 0 -> 2.
                                There is NO SCALING DONE if ALL THREE channels range is less than RngLim, see RngLim, linear render only.
                                If ANY ONE channel input range is less than RngLim and Scale==2, then Scale is (for current frame) knocked down to Scale=1.

                                    where some described for Red Channel only:-
                                         redMin = RedChanMin(ignorePerc=loTh)        # Pixel minimum for red channel, ignoring up to loTh%, ie noise.
                                         redMax = RedChanMax(ignorePerc=hiTh)        # Pixel maximum for red channel, ignoring up to hiTh%, ie noise.
                                         redAve = RedChanAve()                       # Pixel average for red Channel.
                                         redRng = redMax - redMin
                                         inMin  = min(redMin,grnMin,bluMin)          # Min of minimums
                                         inMax  = max(redMax,grnMax,bluMax)          # Max of maximums

                                     0 (Scale==0 || (loTh==-1.0 && hiTh==-1.0))      # No Effect on scale.
                                         scaledAveR = redAve
                                         scaledAveG = grnAve
                                         scaledAveB = bluAve
                                     1) Scales input channel average maximum dynamic range of R,G,B, to 0.0->(ChanAve-inMin)*255.0/(inMax-inMin)
                                         scaler = 255.0 / (inMax - inMin)
                                         scaledAveR = min(max((RedAve - inMin) * scaler,0.0),255.0)
                                         scaledAveG = min(max((GrnAve - inMin) * scaler,0.0),255.0)
                                         scaledAveB = min(max((BluAve - inMin) * scaler,0.0),255.0)
                                     2) Scales input channel average dynamic range of R & G & B, Individually, to 0.0->(ChanAve-Chan_min)*255.0/(ChanMax-ChanMin)
                                         scalerR = 255.0 / (redMax-redMin)
                                         scalerG = 255.0 / (grnMax-grnMin)
                                         scalerB = 255.0 / (bluMax-bluMin)
                                         scaledAveR = min(max((redAve - redMin) * scalerR,0.0),255.0)
                                         scaledAveG = min(max((grnAve - grnMin) * scalerG,0.0),255.0)
                                         scaledAveB = min(max((bluAve - bluMid) * scalerB,0.0),255.0)

    RedMul, default 1.0         Red channel multiplier adjustment.   [0.1 <= RedMul <= 10.0]
    GrnMul, default 1.0         Green channel multiplier adjustment. [0.1 <= GrnMul <= 10.0]
    BluMul, default 1.0         Blue channel multiplier adjustment.  [0.1 <= BluMul <= 10.0]
                                Scaled averages are multiplied by their multiplier then given as args to the gamma estimator.
                                Allow tweaking of R,G,B channels.
                                   Above Multipliers only shown in metrics when at least one is != 1.0 (Always shown when Verbosity=3=FULL).

    Th, Default 0.04           Sets Default for loTh and hiTh. Suggest Default, 0.04(percent).  [-1.0(OFF) , or 0.0 -> 1.0]
    loTh, Default Th           As for Ignore_low in AutoLevels, or Threshold in YPlaneMin.  [-1.0, or 0.0 -> 1.0]
                               Percent, amount of extreme pixels (eg noise) to ignore when finding minimum R, G or B channel values.
                               -1.0 is OFF, input channel minimum is set to 0 as for levels(0,gamma,input_max, ... ).
                               If loTh >=0.0, then will scan frame looking for lowest pixel value whose cumlative sum
                               [including all pixels counts of lower value pixels] is greater than loTh%.
                               loTh, only shown in metrics if greater or equal to 0.0 ie switched ON (Always shown when Verbosity=3=FULL).
    hiTh, Default Th           As for Ignore_high in AutoLevels, or Threshold in YPlaneMax. [-1.0, or 0.0 -> 1.0]
                               Percent, amount of extreme pixels (eg noise) to ignore when finding maximum R, G or B channel values.
                               -1.0 is OFF, input channel maximum set to 255, as in levels(input_min,gamma,255, ... ).
                               If hiTh >=0.0, then will scan frame looking for highest pixel value whose cumlative sum
                               [including all pixels counts of higher value pixels] is greater than hiTh%.
                               hiTh, only shown in metrics if greater or equal to 0.0 ie switched ON (Always shown when Verbosity=3=FULL).

    LockVal, default 128.0     Only used if LockChan = -1. [0.0 < LockVal < 255.0] (set via LockChan if LockChan != -1)
                               There is no restricted range on this (other than 0.0 < LockVal < 255.0), so if you set a stupid value,
                               you will likely get stupid results.

    RngLim, default 11         [1 <= RngLim <= 32]
                               If ALL THREE RAW input channel ranges ie (ChannelMax(max(hiTh,0.0))-ChannelMin(max(loTh,0.0))) are less than RngLim then
                               all scaling is disabled, and remapping is linear without gamma estimation, to range omin -> omax,
                               ie avoid remapping of Black, White frames, or single color frames.

    GamMax, default 10.0       Upper value for guess gamma [2.0 <= GamMax <= 10.0]
                                   Starting guess upper range and limit for gamma estimator (probably best left alone).
                                   The lower guess range and limit will be set to 1.0 / GamMax, by default 0.1.

    dc, default clip c.        Detection clip, Must be same ColorSpace and FrameCount as source clip, no other similarities enforced.
                               (can be different size, denoised etc).

    x,y, Both default 20.      Area of dc Detect clip frame to sample when getting averages and estimating Gamma function, allows to ignore rubbish at frame edges.
    w,h, Both default -20.     Specified as for crop eg x=10,y=20,w=-30,h=-40, as in crop(10,20,-30,-40).

    omin, default 0.           Output limits for all three R, and G, and B channels. [Range 0 -> 16]
    omax, default 255.         [Range 239 -> 255] (extremes 16->239 allow for Studio RGB output).
                               May want to give yourself a little head/foot room by setting eg omin=5, omax=250, so that you leave a little room for
                               further manual color tweaking.

    Show, default true        True, show metrics info on frame.
    Verbosity, default 1       0 = Only upper frame metrics
                               1 = Upper + important ones. (default)
                               2 = Nearly Full metrics.
                               3 = Full Metrics
                               Upper frame metrics shown as eg:- (when Verbosity=3=FULL)

                                  nnnnn] Flags:- 1SR
                                             R         G         B
                                  RAW:     10,253    10,253    10,253
                                  IN:      10,253    10,253    10,253
                                  IN_AVE:  78.466    88.552    78.767
                                  SCALED:  71.847    82.431    72.162
                                  GAMMA:    1.135     1.000     1.123
                                  OUTAVE:  82.431    82.422    82.451

                               where,
                                  nnnnn, is the frame number.
                                  Flags:- (Specific to current frame, can change frame to frame)
                                      '1' = LockChan, as above, channel '1'[ScaleAveG].
                                            Can be, '0', '1', '2' [ScaleAve Channel number LockChan=-3(median) assigns '0', '1' or '2' as appropriate]
                                                    'A'[LockChan=-2, (ScaleAveR+ScaleAveG+ScaleAveB)/3.0]
                                                    'V'[LockChan=-1, Explicit LockVal]
                                      'S' = Scale, mode signfied by color.
                                            Greyed out. Scale = 0(No Effect). May be Greyed out if all channels Min/Max are 0,255.
                                            White.  Scale = 1[Scales input channel average maximum dynamic range of R,G,B]
                                            Orange. Scale = 2[Scales input channel average dynamic range of R and G and B, Individually]
                                      'R' = Limited by RngLim, mode signfied by color.
                                            Greyed out. Not Range Limited.
                                            Red, at least 1 channel has remapping disabled.
                                  RAW:    Shows RAW comma separated channel minimum and maximum, eg ChannelMin(max(loTh,0.0)) and (ChannelMax(max(hiTh,0.0)),
                                          only shown if Verbosity>=3 or, if any RAW input range is less than RngLim AND any of the RAW inputs are different
                                          to the equivalent standard input.
                                  IN:     Shows comma separated channel minimum and maximum (dependent upon Scale, loTh, hiTh).
                                  IN_AVE: Input channel averages.
                                  SCALED: Scaled input averages, (dependent upon Scale, loTh, hiTh, channel minumums and maximums).
                                  GAMMA:  Estimated gamma to achieve lockval for channel. (dependent upon pretty much everything).
                                  OUTAVE: Output channel average ie rendered result.

                               ALL metrics derived from the detection clip dc.
Not really sure how I should process low range frames (as by RngLim), could well be discontinuities in fades.

EDIT: Fred, omin, omax obviates need for a "few pixels of black,white border" (I hope).
__________________
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 October 2016 at 02:09.
StainlessS is offline   Reply With Quote
Old 7th October 2016, 02:10   #59  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,981
GamMac v1.06 Beta 4, new version:- LINK REMOVED

Added Coords arg.
Code:
    Coords, default False.  If True, then shows DC clip with dotted lines showing the x,y,w,h coords plotted on frame. (All other functionality disabled).
Code:
GamMac(), [Gamma Machine] An extraordinary Idea by VideoFred (the gent from Gent). Coded by StainlessS.

    Home Thread:- http://forum.doom9.org/showthread.php?p=1774281#post1774281
    Idea:-        http://forum.doom9.org/showthread.php?t=173683

RGB Only.

    Useful to correct color cast on old 8mm films.
    Alters channel pixel average to match LockChan using Gamma correction. (By default alters Red and Blue channels to match Green).
    Additional tweaking via RedMul, GrnMul and BluMul multipliers.

    What it does(roughly):-
        Firstly, RAW input channel Ranges are measured for all three channels (see RngLim).
        If ALL THREE raw input ranges are less than RngLim (single color frame), then for current frame,
          there is no scaling nor gamma estimation, and only linear rendering is done to output range omin -> omax.
          [EDIT: Channel multipliers are still applied though].
        OtherWise,
            If ANY ONE channel input range is less than RngLim and Scale==2, then Scale is (for current frame) knocked down to Scale=1.
            Get Channel averages, minimums, and maximums (using loTh for minimums and hiTh for maximums).
            if(Scale==0 || loTh<0.0 || hiTh<0.0) then
     EDIT:  if(Scale==0 || (loTh<0.0 AND hiTh<0.0)) then
                No rescaling.
            if(Scale == 1 and loTh>=0.0 and hiTh>=0.0) then
            if(Scale == 1 and (loTh>=0.0 OR hiTh>=0.0)) then
                rescales averages using combined dynamic range of r,g,b ie 0.0 -> (max(redMax,grnMax,bluMax) - min(redMin,grnMin,bluMin)).
            else if(Scale == 2 and loTh>=0.0 and hiTh>=0.0) then
            else if(Scale == 2 AND (loTh>=0.0 OR hiTh>=0.0)) then
                rescales averages using separate dynamic ranges ie 0.0->(redMax-redMin), 0.0->(grnMax-grnMin), 0.0->(bluMax-bluMin).
            For each channel, estimate gamma function that will remap (scaled channel average * channel multiplier) to match a particular
            LockVal (chosen via LockChan) when rendered to the chosen output range specified by omin and omax.
            Then renders frame using the output averages from estimated gamma with output channel minimums at omin, and maximums at omax.

GamMac(Clip c,int "LockChan"=1,int "Scale"=2,
      \ Float "RedMul"=1.0,Float "GrnMul"=1.0, Float "BluMul"=1.0,
      \ Float "Th"= 0.04,Float "loTh"=Th,Float "hiTh"=Th,
      \ Float "LockVal"=128.0,int "RngLim"=11,Float "GamMax"=10.0,
      \ Clip "dc",
      \ int "x"=20,int "y"=20,int "w"=-20,int "h"=-20,
      \ int "omin"=0, int "omax"=255,
      \ Bool "Show"=True,int "Verbosity"=1,Bool "Coords"=false
      \ )

    LockChan Default 1(Grn).    Channel for lock to Average. [range -3 -> 2]
                                 0 ] LockVal = Scaled(RedAve)
                                 1 ] LockVal = Scaled(GrnAve)
                                 2 ] LockVal = Scaled(BluAve)
                                 -1] LockVal = Use explicit LockVal arg (see below).
                                 -2] LockVal = (Scaled(RedAve)+Scaled(GrnAve)+Scaled(BluAve))/3.0. [Mean]
                                 -3] LockVal = Median(Scaled(RedAve),Scaled(GrnAve),Scaled(BluAve))
                                Where Scaled(Channel Average) depends upon RngLim, Scale, and loTh, and hiTh.

    Scale, default 2           Range 0 -> 2.
                                There is NO SCALING DONE if ALL THREE channels range is less than RngLim, see RngLim, linear render only.
                                If ANY ONE channel input range is less than RngLim and Scale==2, then Scale is (for current frame) knocked down to Scale=1.

                                    where some described for Red Channel only:-
                                         redMin = RedChanMin(ignorePerc=loTh)        # Pixel minimum for red channel, ignoring up to loTh%, ie noise.
                                         redMax = RedChanMax(ignorePerc=hiTh)        # Pixel maximum for red channel, ignoring up to hiTh%, ie noise.
                                         redAve = RedChanAve()                       # Pixel average for red Channel.
                                         redRng = redMax - redMin
                                         inMin  = min(redMin,grnMin,bluMin)          # Min of minimums
                                         inMax  = max(redMax,grnMax,bluMax)          # Max of maximums

                                     0 (Scale==0 || (loTh==-1.0 && hiTh==-1.0))      # No Effect on scale.
                                         scaledAveR = redAve
                                         scaledAveG = grnAve
                                         scaledAveB = bluAve
                                     1) Scales input channel average maximum dynamic range of R,G,B, to 0.0->(ChanAve-inMin)*255.0/(inMax-inMin)
                                         scaler = 255.0 / (inMax - inMin)
                                         scaledAveR = min(max((RedAve - inMin) * scaler,0.0),255.0)
                                         scaledAveG = min(max((GrnAve - inMin) * scaler,0.0),255.0)
                                         scaledAveB = min(max((BluAve - inMin) * scaler,0.0),255.0)
                                     2) Scales input channel average dynamic range of R & G & B, Individually, to 0.0->(ChanAve-Chan_min)*255.0/(ChanMax-ChanMin)
                                         scalerR = 255.0 / (redMax-redMin)
                                         scalerG = 255.0 / (grnMax-grnMin)
                                         scalerB = 255.0 / (bluMax-bluMin)
                                         scaledAveR = min(max((redAve - redMin) * scalerR,0.0),255.0)
                                         scaledAveG = min(max((grnAve - grnMin) * scalerG,0.0),255.0)
                                         scaledAveB = min(max((bluAve - bluMid) * scalerB,0.0),255.0)

    RedMul, default 1.0         Red channel multiplier adjustment.   [0.1 <= RedMul <= 10.0]
    GrnMul, default 1.0         Green channel multiplier adjustment. [0.1 <= GrnMul <= 10.0]
    BluMul, default 1.0         Blue channel multiplier adjustment.  [0.1 <= BluMul <= 10.0]
                                Scaled averages are multiplied by their multiplier then given as args to the gamma estimator.
                                Allow tweaking of R,G,B channels.
                                   Above Multipliers only shown in metrics when at least one is != 1.0 (Always shown when Verbosity=3=FULL).

    Th, Default 0.04           Sets Default for loTh and hiTh. Suggest Default, 0.04(percent).  [-1.0(OFF) , or 0.0 -> 1.0]
    loTh, Default Th           As for Ignore_low in AutoLevels, or Threshold in YPlaneMin.  [-1.0, or 0.0 -> 1.0]
                               Percent, amount of extreme pixels (eg noise) to ignore when finding minimum R, G or B channel values.
                               -1.0 is OFF, input channel minimum is set to 0 as for levels(0,gamma,input_max, ... ).
                               If loTh >=0.0, then will scan frame looking for lowest pixel value whose cumulative sum
                               [including all pixels counts of lower value pixels] is greater than loTh%.
                               loTh, only shown in metrics if greater or equal to 0.0 ie switched ON (Always shown when Verbosity=3=FULL).
    hiTh, Default Th           As for Ignore_high in AutoLevels, or Threshold in YPlaneMax. [-1.0, or 0.0 -> 1.0]
                               Percent, amount of extreme pixels (eg noise) to ignore when finding maximum R, G or B channel values.
                               -1.0 is OFF, input channel maximum set to 255, as in levels(input_min,gamma,255, ... ).
                               If hiTh >=0.0, then will scan frame looking for highest pixel value whose cumulative sum
                               [including all pixels counts of higher value pixels] is greater than hiTh%.
                               hiTh, only shown in metrics if greater or equal to 0.0 ie switched ON (Always shown when Verbosity=3=FULL).

    LockVal, default 128.0     Only used if LockChan = -1. [0.0 < LockVal < 255.0] (set via LockChan if LockChan != -1)
                               There is no restricted range on this (other than 0.0 < LockVal < 255.0), so if you set a stupid value,
                               you will likely get stupid results.

    RngLim, default 11         [1 <= RngLim <= 32]
                               If ALL THREE RAW input channel ranges ie (ChannelMax(max(hiTh,0.0))-ChannelMin(max(loTh,0.0))) are less than RngLim then
                               all scaling is disabled, and remapping is linear without gamma estimation, to range omin -> omax,
                               ie avoid remapping of Black, White frames, or single color frames.

    GamMax, default 10.0       Upper value for guess gamma [2.0 <= GamMax <= 10.0]
                                   Starting guess upper range and limit for gamma estimator (probably best left alone).
                                   The lower guess range and limit will be set to 1.0 / GamMax, by default 0.1.

    dc, default clip c.        Detection clip, Must be same ColorSpace and FrameCount as source clip, no other similarities enforced.
                               (can be different size, denoised etc).

    x,y, Both default 20.      Area of dc Detect clip frame to sample when getting averages and estimating Gamma function, allows to ignore rubbish at frame edges.
    w,h, Both default -20.     Specified as for crop eg x=10,y=20,w=-30,h=-40, as in crop(10,20,-30,-40).

    omin, default 0.           Output limits for all three R, and G, and B channels. [Range 0 -> 16]
    omax, default 255.         [Range 239 -> 255] (extremes 16->239 allow for Studio RGB output).
                               May want to give yourself a little head/foot room by setting eg omin=5, omax=250, so that you leave a little room for
                               further manual color tweaking.

    Show, default true        True, show metrics info on frame.
    Verbosity, default 1       0 = Only upper frame metrics
                               1 = Upper + important ones. (default)
                               2 = Nearly Full metrics.
                               3 = Full Metrics
                               Upper frame metrics shown as eg:- (when Verbosity=3=FULL)

                                  nnnnn] Flags:- 1SR
                                             R         G         B
                                  RAW:     10,253    10,253    10,253
                                  IN:      10,253    10,253    10,253
                                  IN_AVE:  78.466    88.552    78.767
                                  SCALED:  71.847    82.431    72.162
                                  GAMMA:    1.135     1.000     1.123
                                  OUTAVE:  82.431    82.422    82.451

                               where,
                                  nnnnn, is the frame number.
                                  Flags:- (Specific to current frame, can change frame to frame)
                                      '1' = LockChan, as above, channel '1'[ScaleAveG].
                                            Can be, '0', '1', '2' [ScaleAve Channel number LockChan=-3(median) assigns '0', '1' or '2' as appropriate]
                                                    'A'[LockChan=-2, (ScaleAveR+ScaleAveG+ScaleAveB)/3.0]
                                                    'V'[LockChan=-1, Explicit LockVal]
                                      'S' = Scale, mode signified by color.
                                            Greyed out. Scale = 0(No Effect). May be Greyed out if all channels Min/Max are 0,255.
                                            White.  Scale = 1[Scales input channel average maximum dynamic range of R,G,B]
                                            Orange. Scale = 2[Scales input channel average dynamic range of R and G and B, Individually]
                                      'R' = Limited by RngLim, mode signfied by color.
                                            Greyed out. Not Range Limited.
                                            Red, at least 1 channel has remapping disabled.
                                  RAW:    Shows RAW comma separated channel minimum and maximum, eg ChannelMin(max(loTh,0.0)) and (ChannelMax(max(hiTh,0.0)),
                                          only shown if Verbosity>=3 or, if any RAW input range is less than RngLim AND any of the RAW inputs are different
                                          to the equivalent standard input.
                                  IN:     Shows comma separated channel minimum and maximum (dependent upon Scale, loTh, hiTh).
                                  IN_AVE: Input channel averages.
                                  SCALED: Scaled input averages, (dependent upon Scale, loTh, hiTh, channel minimums and maximums).
                                  GAMMA:  Estimated gamma to achieve lockval for channel. (dependent upon pretty much everything).
                                  OUTAVE: Output channel average ie rendered result.

                               ALL metrics derived from the detection clip dc (Including OutAve's).

    Coords, default False.  If True, then shows DC clip with dotted lines showing the x,y,w,h coords plotted on frame. (All other functionality disabled).
__________________
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 October 2016 at 05:27.
StainlessS is offline   Reply With Quote
Old 7th October 2016, 04:53   #60  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,981
GamMac v1.06 Beta 5, new version:- LINK REMOVED

Negative LockChan was broken, fixed. Some metrics mainly S flag color fixed.

Previous post DOCS not changed.

EDIT:
To use coords arg and detection clip not used, (DC defaults to Last)
Code:
Return GamMac(Last,x=x,y=y,w=w,h=h,Coords=True)    # Show Coords only
or with DC detection clip
Code:
Return GamMac(DC,x=x,y=y,w=w,h=h,Coords=True)    # Show Coords only
# or
#Return GamMac(dc=DC,x=x,y=y,w=w,h=h,Coords=True)
EDIT:
How it looks, Verbocity=1


and original with detect coords shown


EDIT:
And coords shown avoiding detect on original subtitles


And result
__________________
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; 15th June 2018 at 14:41.
StainlessS is offline   Reply With Quote
Reply

Tags
color cast, correction, fade, gamma

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.