In [ ]:
import numpy as np
import os
from helper_functions import *
from integral_try import *
from numpy import array
import pandas as pd
data_dir = 'sonic_pi_face/data/'
filename = 'data-18-41-23-5-2017.txt'
data = load_data(data_dir,filename)
# calculate the integral image
iimage = i_image(data[4])
# calculate the integral for the all quarters from the integral image
quarter1 = get_integral(iimage,0,0,19,19)
quarter2 = get_integral(iimage,0,19,19,39)
quarter3 = get_integral(iimage,19,0,39,19)
quarter4 = get_integral(iimage,19,19,39,39)
integral_sample = array([[quarter1, quarter2],[quarter3,quarter4]])
# this requires a 2-d input, which i have to build somehow
#df = pd.DataFrame(integral_sample)
#df.to_csv("datasetfiletry.csv")
In [ ]: