Пример #1
0
def getProcMet(var, input):
        v = var.get()
        settingsCon = singleton.settings()
        settPlay=(float(settingsCon['minSpeed'].get()),float(settingsCon['maxSpeed'].get()),
                  float(settingsCon['minFreq'].get()),float(settingsCon['maxFreq'].get()),
                  float(settingsCon['audioRate'].get()),float(settingsCon['positionBuff'].get()),settingsCon['mute'].get())
        global background
        if v == 1:
                 #print "m1"
                 if background==None:
                        background = input
                 output=manualDetect.manualDetect(input, background, int(settingsCon['debug'].get()))
                 fff=play_move.motion(output[1],settingsCon['ccam'],settPlay)
                 showFreq(fff)
                 return output[0]
        elif v == 2:
                if background!=None:
                        background = None
                #print "m2"
                output=bgSubtraction.bgSubtraction(input, (), int(settingsCon['debug'].get()))
                #print "bilopre"
                #print "calling ", output[1]
                fff=play_move.motion(output[1],settingsCon['ccam'],settPlay)
                #print fff
                showFreq(fff)

                return output[0]

        elif v == 3:
                #print "m3"
                output=haarcascades.haarcascades(input, 1, int(settingsCon['debug'].get()))
                fff=play_move.motion(output[1],settingsCon['ccam'],settPlay)
                showFreq(fff)
                return output[0]
                
        else:
                if background!=None:
                        background = None
                #print "m0"
                output=hogDetect.hogDetect(input, (), ())
                fff=play_move.motion(output[1],settingsCon['ccam'],settPlay)
                showFreq(fff)
                return output[0]
Пример #2
0
def getProcMet(var, input):
        v = var.get()
        settingsCon = singleton.settings()
        settPlay=(float(settingsCon['minSpeed'].get()),float(settingsCon['maxSpeed'].get()),
                  float(settingsCon['minFreq'].get()),float(settingsCon['maxFreq'].get()),
                  float(settingsCon['audioRate'].get()),float(settingsCon['positionBuff'].get()),settingsCon['mute'].get())
        #print v
        if v == 1:
                 output=manualDetect.manualDetect(input, background, debug)
                 fff=play_move.motion(output[1],settingsCon['ccam'],settPlay)
                 showFreq(fff)
                 return output[0]
        elif v == 2:
                output=bgSubtraction.bgSubtraction(input, (), debug)
                #print "bilopre"
                #print "calling ", output[1]
                fff=play_move.motion(output[1],settingsCon['ccam'],settPlay)
                #print fff
                showFreq(fff)
                #else :print "BUG"
                #print "bilosta"
                #if(output[1]==(0,0)):
                #        print "ne sviraj majke ti ga"
                return output[0]

                
                
        elif v == 3:
                output=haarcascades.haarcascades(input, 1, debug)
                fff=play_move.motion(output[1],settingsCon['ccam'],settPlay)
                showFreq(fff)
                return output[0]
                
        else:
                output=hogDetect.hogDetect(input, (), ())
                fff=play_move.motion(output[1],settingsCon['ccam'],settPlay)
                showFreq(fff)
                return output[0]