From 6d4f864267a5f89122069b838fd76dda70c4971b Mon Sep 17 00:00:00 2001 From: anapt Date: Tue, 23 Jan 2018 09:37:41 +0200 Subject: [PATCH] move meanshift function to meanshift.cu --- meanshift_declarations.c | 89 ---------------------------------------- 1 file changed, 89 deletions(-) diff --git a/meanshift_declarations.c b/meanshift_declarations.c index 4fbf8ed..e6a8f89 100644 --- a/meanshift_declarations.c +++ b/meanshift_declarations.c @@ -24,95 +24,6 @@ void get_args(int argc, char **argv, int *h){ LABELS_FILENAME = argv[5]; } -int meanshift(double **original_points, double ***shifted_points, int h - , parameters *opt, int iteration){ - - // allocates space and copies original points on first iteration - if (iteration == 1){ - (*shifted_points) = alloc_2d_double(NUMBER_OF_POINTS, DIMENSIONS); - duplicate(original_points, NUMBER_OF_POINTS, DIMENSIONS, shifted_points); - } - - // mean shift vector - double **mean_shift_vector; - mean_shift_vector = alloc_2d_double(NUMBER_OF_POINTS, DIMENSIONS); - // initialize elements of mean_shift_vector to inf - for (int i=0;i opt->epsilon) { - return meanshift(original_points, shifted_points, h, opt, ++iteration); - } - - return iteration; -} // TODO check why there's is a difference in the norm calculate in matlab double norm(double **matrix, int rows, int cols){