segmentation
All Data Structures Namespaces Files Functions Variables Modules Pages
centsur.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
3  * Authors: Andrew Dankers, maintainer Vadim Tikhanoff
4  * email: vadim.tikhanoff@iit.it
5  * website: www.robotcub.org
6  * Permission is granted to copy, distribute, and/or modify this program
7  * under the terms of the GNU General Public License, version 2 or any
8  * later version published by the Free Software Foundation.
9  *
10  * A copy of the license can be found at
11  * http://www.robotcub.org/icub/license/gpl.txt
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16  * Public License for more details
17  */
18 
29 #ifndef __CENTSUR_H__
30 #define __CENTSUR_H__
31 
32 #include <opencv2/opencv.hpp>
33 
34 class CentSur
35 {
36 public:
40  CentSur(cv::Size imsize, int nscale, double sigma = 1.0);
44  ~CentSur();
45 
46  cv::Mat csTot32f, csTot32fTmp, csTot8u;
47 
51  void proc_im_8u(const cv::Mat &im_8u);
52 
56  void proc_im_32f( const cv::Mat &im_32f );
57 
61  cv::Mat get_centsur_32f(){ return csTot32f; }
62 
66  cv::Mat get_centsur_norm8u(){ return csTot8u; }
67 
68 
69 private:
70 
71  cv::Size srcSize, *psize;
72  cv::Rect *proi;
73  cv::Mat pyramid[10], pyramid_gauss[10], gauss[10], img_32f;
74  double sigma;
75  int ngauss;
76  std::vector<cv::Mat> dst;
80  void make_pyramid(const cv::Mat &im_in);
81 };
82 #endif
83 //empty line to make gcc happy
84 
85