sliding_window_object_detector_trainer.h
Go to the documentation of this file.
1 #ifndef _SLIDING_WINDOW_OBJECT_DETECTOR_TRAINER_H_
2 #define _SLIDING_WINDOW_OBJECT_DETECTOR_TRAINER_H_
3 
5 
6 #include <ros/ros.h>
7 #include <ros/console.h>
8 #include <rosbag/bag.h>
9 #include <rosbag/view.h>
10 
11 #include <boost/foreach.hpp>
12 #include <opencv2/opencv.hpp>
13 
14 #include <sensor_msgs/Image.h>
15 #include <sensor_msgs/CameraInfo.h>
18 #include <cv_bridge/cv_bridge.h>
19 
20 #include <vector>
21 #include <string>
22 #include <fstream>
23 
24 namespace jsk_perception
25 {
27  // public LocalBinaryPatterns
28  {
29  private:
31 
36 
37  std::string dataset_path_;
38 
40  std::string object_dataset_topic_;
44  std::string manifest_filename_;
45 
47 #if CV_MAJOR_VERSION >= 3 // http://answers.opencv.org/question/46770/cvknearest-missing-in-300-cvmlknearest-abstract/
48  cv::Ptr<cv::ml::SVM> supportVectorMachine_;
49 #else
51 #endif
52  void writeTrainingManifestToDirectory(cv::FileStorage &);
53  virtual void concatenateCVMat(
54  const cv::Mat &, const cv::Mat &, cv::Mat &, bool = true);
55 
56  public:
58  // :DiagnosticNodelet("SlidingWindowObjectDetectorTrainer");
59 
60  virtual void trainObjectClassifier(
61  std::string, std::string);
62  virtual void readDataset(
63  std::string, std::string, cv::Mat &,
64  cv::Mat &, bool = false, const int = 0);
65  virtual void extractFeatures(
66  cv::Mat &, cv::Mat &);
67  virtual void trainBinaryClassSVM(
68  const cv::Mat &, const cv::Mat &);
69 
70  // temp placed here
71  virtual void computeHSHistogram(
72  cv::Mat &, cv::Mat &, const int = 64, const int = 32, bool = true);
73 
74  };
75 }
76 
77 #endif // _SLIDING_WINDOW_OBJECT_DETECTOR_TRAINER_H_
virtual void concatenateCVMat(const cv::Mat &, const cv::Mat &, cv::Mat &, bool=true)
virtual void readDataset(std::string, std::string, cv::Mat &, cv::Mat &, bool=false, const int=0)
virtual void computeHSHistogram(cv::Mat &, cv::Mat &, const int=64, const int=32, bool=true)


jsk_perception
Author(s): Manabu Saito, Ryohei Ueda
autogenerated on Mon May 3 2021 03:03:27