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 #include <stack>
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 
33 void MeanShift(uchar* image, int **labels, int width, int height, int h_spatial, double h_range, int minRegion, double shift, int num_iters);
34 uchar* MS_Filter(uchar* image, int width, int height, int h_spatial, double h_range, double initShift, int initIters);
35 int MS_Segment(uchar * image, int width, int height, int **labels, double h_range, int minRegion);
36 int MS_Cluster(uchar *image, int width, int height, int **labels,int* modePoints, float *mode, double h_range);
37 void AddToStack(std::stack<MSPoint> &nStack, int i, int j);
38 
39 
40 #endif /* MEANSHIFT_H */
Definition: ms.h:26