Exemplo n.º 1
0
def analyze(inputFile):
    f = open(file, 'r')
    headers = f.readline()
    headers = jm.getFileHeader(headers)
    drops = []
    extractor = AbstractLabanAnalyzer.getExtractor(inputFile)
    jointsIndices = extractor.getJointsIndices(headers)
    for line in f:
        for i in jointsIndices:
            
            lineInFloats=[float(v) for v in line.split()]
            indexHead = headers.index('Head_Y')
            indexSpine = headers.index('SpineShoulder_Y')
            drops.append(lineInFloats[indexHead] - lineInFloats[indexSpine])
    return np.diff(drops)
Exemplo n.º 2
0
def analyze(inputFile):
    extractor = AbstractLabanAnalyzer.getExtractor(inputFile)
    analysis = AdvanceAndRetreate(extractor)
    return analysis.extract(inputFile)
def analyze(inputFile):
    extractor = AbstractLabanAnalyzer.getExtractor(inputFile)
    analysis = SpreadindAndClosing(extractor)
    return analysis.extract(inputFile)
Exemplo n.º 4
0
def analyze(inputFile):
    extractor = AbstractLabanAnalyzer.getExtractor(inputFile)
    analysis = LightAndStrong(extractor)
    return analysis.extract(inputFile)
def analyze(inputFile):
    extractor = AbstractLabanAnalyzer.getExtractor(inputFile)
    analysis = ExpendingCondencing(extractor)
    return analysis.extract(inputFile)
Exemplo n.º 6
0
def analyze(inputFile):
    extractor = AbstractLabanAnalyzer.getExtractor(inputFile)
    analysis = RiseAndSink(extractor)
    return analysis.extract(inputFile)
Exemplo n.º 7
0
        ys = np.diff(ys)
        zs = np.diff(zs)

        # Make movement vectors
        movements = zip(xs, ys, zs)
        dircetness = []
        if firstRun:
            print "directness measurement", jointsHeaders[4 * i], len(vec)
        for i in range(len(movements) - 1):
            first = ae.getUnitVec(movements[i])
            second = ae.getUnitVec(movements[i + 1])
            dircetness.append(np.dot(first, second))
        v, f = analyzeData(time[1:-1], dircetness, "Directness ")
        vec += v
        featuresNames += f
    extractor = aa.getExtractor(fileName)

    def getStatsAndFeaturesNames(advancements, vec, featuresNames, label, firstRun=False):
        if firstRun:
            print label, len(vec)
        v, f = getStats(advancements, label)
        vec += v
        featuresNames += f

    # AdvanceAndRetreate
    advancements = ar.AdvanceAndRetreate(extractor).extract(fileName)
    label = "AdvanceAndRetreate"
    getStatsAndFeaturesNames(advancements, vec, featuresNames, label)

    # RiseAndSink
    advancements = rs.RiseAndSink(extractor).extract(fileName)
Exemplo n.º 8
0
def analyze(inputFile):
    extractor = AbstractLabanAnalyzer.getExtractor(inputFile)
    analysis = FreeAndBind(extractor)
    return analysis.extract(inputFile)