コード例 #1
0
ファイル: main.py プロジェクト: ranBernstein/GaitKinect
def plotAMCCompare(coeffNum):
    period =  getAMCperiod(True, 60, 176)
    period = cleanSeriesBias(period)
    series, coeffs, normalizedCoeffs = getFourier(period, coeffNum)
    plt.scatter(range(len(normalizedCoeffs)),normalizedCoeffs,color='blue')
    
    period =  getAMCperiod(True, 177, 298)
    period = cleanSeriesBias(period)
    series, coeffs, normalizedCoeffs = getFourier(period, coeffNum)
    plt.scatter(range(len(normalizedCoeffs)),normalizedCoeffs,color='red')
    
    plt.show()        
コード例 #2
0
ファイル: main.py プロジェクト: ranBernstein/GaitKinect
def plotNormalizedCoeffsCompare(file, joint, periods):
    maxLength = getMaxLenOfLists(periods);
    for period in periods:
        i= np.random.random(10)
        series, coeffs, normalizedCoeffs = getFourier(period, coeffNum)
        plt.scatter(range(len(normalizedCoeffs)), normalizedCoeffs, c=i, s=500)       
    plt.show()
コード例 #3
0
ファイル: main.py プロジェクト: ranBernstein/GaitKinect
def compareAmcKinect(file, joint, coeffNum, periods):
    series, coeffs, normalizedCoeffs = getFourier(getAMCperiod(), coeffNum)
    vicon = accumulateList(normalizedCoeffs)
    plt.scatter(range(len(vicon)), vicon)
    
    kinect  = accumlateCoeffsCompare(file, joint, periods)
    plt.scatter(range(len(kinect)), kinect)
    plt.legend('vk')
    plt.show()   
コード例 #4
0
ファイル: main.py プロジェクト: ranBernstein/GaitKinect
def accumlateCoeffsCompare(file, joint, periods):
    maxLength = getMaxLenOfLists(periods);
    accumCoeffs=[]
    for period in periods:
        i= np.random.random(10)
        accumulatedCoeffs = []
        series, coeffs, normalizedCoeffs = getFourier(period, coeffNum)
        accumCoeffs.append(normalizedCoeffs)
    meanList = getMeanList(accumCoeffs)
    return accumulateList(meanList)
コード例 #5
0
ファイル: main.py プロジェクト: ranBernstein/GaitKinect
def plotEveryPeriodWithFourier(file, joint):
    periods= plotJointCenteredPeriodicaly(file, joint)
    for period in periods:
        series, coeffs, normalizedCoeffs = getFourier(period, coeffNum)
        plt.plot(range(len(period)), period)
        plt.plot(range(len(period)), series)        
        plt.show()
        plt.scatter(range(len(normalizedCoeffs)), normalizedCoeffs)
        plt.ylim((0,1))
        plt.show()
コード例 #6
0
ファイル: main.py プロジェクト: ranBernstein/GaitKinect
def plotEveryPeriodWithFourierWithoutBias(file, joint):   
    periods= plotJointCenteredPeriodicaly(file, joint)
    periods=cleanPeriodsBias(periods)
    maxLength = getMaxLenOfLists(periods) 
    for period in periods:
        series, coeffs, normalizedCoeffs = getFourier(period, coeffNum)
        plt.plot(range(len(period)), period)
        plt.plot(range(len(period)), series)        
        plt.show()
        plt.scatter(range(len(normalizedCoeffs)), normalizedCoeffs)
        plt.ylim((0,1))
        plt.xlim((0,coeffNum))
        plt.show()