Exemple #1
0
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()        
Exemple #2
0
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()
Exemple #3
0
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()   
Exemple #4
0
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)
Exemple #5
0
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()
Exemple #6
0
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()