Changed nearest neighbour to mean of nearest neighbours

~ updateObject now uses Flann to calculate the nearest neighbours