Meanshift  1.0
ms.h
1 /*
2  * Copyright (c) 2019, Damir Demirović <damir.demirovic@untz.ba>
3  * All rights reserved.
4  *
5  * This program is free software: you can use, modify and/or
6  * redistribute it under the terms of the GNU General Public
7  * License as published by the Free Software Foundation, either
8  * version 3 of the License, or (at your option) any later
9  * version. You should have received a copy of this license along
10  * this program. If not, see <http://www.gnu.org/licenses/>.
11  */
12 
13 #ifndef MEANSHIFT_H
14 #define MEANSHIFT_H
15 
16 
17 #include <iostream>
18 #include <cmath>
19 #include <string.h>
20 #include "../image/image.h"
21 
22 
23 using namespace std;
24 
25 /*Structure MSPoint define the stack */
26 struct MSPoint
27 {
28  int x;
29  int y;
30 };
31 
32 uchar* MeanShift(uchar* image, uchar *filtered, int **labels, int width, int height, int spatial_radius, double color_radius, int minRegion, int num_iters);
33 uchar* MS_Filter(uchar* image, int width, int height, int h_spatial, double h_range, int initIters);
34 int MS_Segment(uchar * image, int width, int height, int **labels, double h_range, int minRegion);
35 int MS_Cluster(uchar *image, int width, int height, int **labels,int* modePoints, float *mode, double h_range);
36 
37 
38 #endif /* MEANSHIFT_H */
uchar * MS_Filter(uchar *image, int width, int height, int spatial_radius, double color_radius, int initIters)
Function MS_Filter filter image usign Meanshift algorithm using a circular flat kernel and color dist...
Definition: ms.cpp:103
Definition: ms.h:26
int MS_Cluster(uchar *image, int width, int height, int **labels, int *modePoints, float *mode, double color_radius)
Function MS_Cluster cluster the image using Meanshift.
Definition: ms.cpp:238
int MS_Segment(uchar *image, int width, int height, int **labels, double color_radius, int minRegion)
Function MS_Segment segments the image using Meanshift algorithm.
Definition: ms.cpp:207
uchar * MeanShift(uchar *image, uchar *filtered_luv, int **labels, int width, int height, int spatial_radius, double color_radius, int minRegion, int num_iters)
Function MeanShift runs two phases of Mean shift algorithm Filter and Segment using Meanshift algorit...
Definition: ms.cpp:60