public static MixtureModel loadMixtureModel(String path, BufferedImage image, int n){
MixtureModel mm = MixtureModel.load(path);
if (mm==null){
PVector[] px = convertColorImageToPointSet3D(image);
Vector<PVector>[] clusters = KMeans.run(px, n);
mm = BregmanSoftClustering.initialize(clusters, new MultivariateGaussian());
mm = BregmanSoftClustering.run(px, mm);
MixtureModel.save(mm, path);
}
return mm;
}