PedestrainCounting
meanshift.h
1 #ifndef MEAN_SHIFT_H
2 #define MEAN_SHIFT_H
3 #pragma once
4 
5 /*meanshift算法实现
6 *@File:meanshift.cpp
7 *@Author:Kan Chen (chenkan0007@gmail.com),
8 *@Last Modified:2013-06-16
9 */
10 
11 #include <iostream>
12 #include "opencv\cv.h"
13 #include <math.h>
14 #include "opencv\highgui.h"
15 #include <windows.h>
16 
17 /*
18 #ifndef NDEBUG
19 #pragma comment(lib, "..\\lib\\opencv_core300d.lib")
20 #pragma comment(lib, "..\\lib\\opencv_highgui300d.lib")
21 #pragma comment(lib, "..\\lib\\opencv_imgproc300d.lib")
22 #else // NDEBUG
23 #pragma comment(lib, "..\\OpenCV\\lib\\opencv_core231.lib")
24 #pragma comment(lib, "..\\OpenCV\\lib\\opencv_highgui231.lib")
25 #pragma comment(lib, "..\\OpenCV\\lib\\opencv_imgproc231.lib")
26 #endif
27 */
28 
29 using namespace std;
30 //using namespace cv;
31 
32 const int MEAN_SHIFT_R = 2;
33 
34 // 将图像数据转换为meanshift算法执行时的数据点IplImage* create_input4meanshift(IplImage* img, int r); // 对每一个小区域进行meanshift聚类,返回中心处的数据 double meanshift(double* serArr, int p, int length); // input image should be color image IplImage* pic_meanshift(IplImage* img, int r); #endif
35 IplImage* create_input4meanshift(IplImage* img, int r);
36 
37 // 对每一个小区域进行meanshift聚类,返回中心处的数据double meanshift(double* serArr, int p, int length); // input image should be color image IplImage* pic_meanshift(IplImage* img, int r); #endif
38 double meanshift(double* serArr, int p, int length);
39 
40 // input image should be color image
41 IplImage* pic_meanshift(IplImage* img, int r);
42 
43 #endif