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()
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()
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()
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)
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()
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()