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)
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)
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)
Beispiel #6
0
def analyze(inputFile):
    extractor = AbstractLabanAnalyzer.getExtractor(inputFile)
    analysis = RiseAndSink(extractor)
    return analysis.extract(inputFile)
        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)
Beispiel #8
0
def analyze(inputFile):
    extractor = AbstractLabanAnalyzer.getExtractor(inputFile)
    analysis = FreeAndBind(extractor)
    return analysis.extract(inputFile)