#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc_c.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/objdetect/objdetect.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iterator>
#include <set>
#include <cstdio>
#include <iostream>
#include <ros/ros.h>
#include <sensor_msgs/Image.h>
#include <sensor_msgs/CameraInfo.h>
#include <message_filters/subscriber.h>
#include <message_filters/time_synchronizer.h>
#include <message_filters/synchronizer.h>
#include <message_filters/sync_policies/approximate_time.h>
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/image_encodings.h>
Go to the source code of this file.
|  | 
| void | callback (const sensor_msgs::Image::ConstPtr &rgb_image, const sensor_msgs::Image::ConstPtr &depth_image, const sensor_msgs::CameraInfo::ConstPtr &rgb_camera_info, const sensor_msgs::CameraInfo::ConstPtr &depth_camera_info) | 
|  | 
| cv::Mat | displayQuantized (const cv::Mat &quantized) | 
|  | 
| void | drawResponse (const std::vector< cv::linemod::Template > &templates, int num_modalities, cv::Mat &dst, cv::Point offset, int T) | 
|  | 
| static void | filterPlane (IplImage *ap_depth, std::vector< IplImage * > &a_masks, std::vector< CvPoint > &a_chain, double f) | 
|  | 
| static void | help () | 
|  | 
| int | main (int argc, char **argv) | 
|  | 
| std::vector< CvPoint > | maskFromTemplate (const std::vector< cv::linemod::Template > &templates, int num_modalities, cv::Point offset, cv::Size size, cv::Mat &mask, cv::Mat &dst) | 
|  | 
| static cv::Ptr< cv::linemod::Detector > | readLinemod (const std::string &filename) | 
|  | 
| static void | reprojectPoints (const std::vector< cv::Point3d > &proj, std::vector< cv::Point3d > &real, double f) | 
|  | 
| void | subtractPlane (const cv::Mat &depth, cv::Mat &mask, std::vector< CvPoint > &chain, double f) | 
|  | 
| void | templateConvexHull (const std::vector< cv::linemod::Template > &templates, int num_modalities, cv::Point offset, cv::Size size, cv::Mat &dst) | 
|  | 
| static void | writeLinemod (const cv::Ptr< cv::linemod::Detector > &detector, const std::string &filename) | 
|  | 
◆ SyncPolicy
◆ callback()
      
        
          | void callback | ( | const sensor_msgs::Image::ConstPtr & | rgb_image, | 
        
          |  |  | const sensor_msgs::Image::ConstPtr & | depth_image, | 
        
          |  |  | const sensor_msgs::CameraInfo::ConstPtr & | rgb_camera_info, | 
        
          |  |  | const sensor_msgs::CameraInfo::ConstPtr & | depth_camera_info | 
        
          |  | ) |  |  | 
      
 
- Todo:
- Keys for changing these? 
- Todo:
- Online learning possibly broken by new gradient feature extraction, which assumes an accurate object outline. 
Definition at line 201 of file linemod.cpp.
 
 
◆ displayQuantized()
      
        
          | cv::Mat displayQuantized | ( | const cv::Mat & | quantized | ) |  | 
      
 
 
◆ drawResponse()
      
        
          | void drawResponse | ( | const std::vector< cv::linemod::Template > & | templates, | 
        
          |  |  | int | num_modalities, | 
        
          |  |  | cv::Mat & | dst, | 
        
          |  |  | cv::Point | offset, | 
        
          |  |  | int | T | 
        
          |  | ) |  |  | 
      
 
 
◆ filterPlane()
  
  | 
        
          | static void filterPlane | ( | IplImage * | ap_depth, |  
          |  |  | std::vector< IplImage * > & | a_masks, |  
          |  |  | std::vector< CvPoint > & | a_chain, |  
          |  |  | double | f |  
          |  | ) |  |  |  | static | 
 
 
◆ help()
◆ main()
      
        
          | int main | ( | int | argc, | 
        
          |  |  | char ** | argv | 
        
          |  | ) |  |  | 
      
 
 
◆ maskFromTemplate()
      
        
          | std::vector< CvPoint > maskFromTemplate | ( | const std::vector< cv::linemod::Template > & | templates, | 
        
          |  |  | int | num_modalities, | 
        
          |  |  | cv::Point | offset, | 
        
          |  |  | cv::Size | size, | 
        
          |  |  | cv::Mat & | mask, | 
        
          |  |  | cv::Mat & | dst | 
        
          |  | ) |  |  | 
      
 
- Todo:
- Really need dst at all? Can just as well do this outside 
Definition at line 666 of file linemod.cpp.
 
 
◆ readLinemod()
  
  | 
        
          | static cv::Ptr<cv::linemod::Detector> readLinemod | ( | const std::string & | filename | ) |  |  | static | 
 
 
◆ reprojectPoints()
  
  | 
        
          | static void reprojectPoints | ( | const std::vector< cv::Point3d > & | proj, |  
          |  |  | std::vector< cv::Point3d > & | real, |  
          |  |  | double | f |  
          |  | ) |  |  |  | static | 
 
 
◆ subtractPlane()
      
        
          | void subtractPlane | ( | const cv::Mat & | depth, | 
        
          |  |  | cv::Mat & | mask, | 
        
          |  |  | std::vector< CvPoint > & | chain, | 
        
          |  |  | double | f | 
        
          |  | ) |  |  | 
      
 
 
◆ templateConvexHull()
      
        
          | void templateConvexHull | ( | const std::vector< cv::linemod::Template > & | templates, | 
        
          |  |  | int | num_modalities, | 
        
          |  |  | cv::Point | offset, | 
        
          |  |  | cv::Size | size, | 
        
          |  |  | cv::Mat & | dst | 
        
          |  | ) |  |  | 
      
 
 
◆ writeLinemod()
  
  | 
        
          | static void writeLinemod | ( | const cv::Ptr< cv::linemod::Detector > & | detector, |  
          |  |  | const std::string & | filename |  
          |  | ) |  |  |  | static | 
 
 
◆ detector
      
        
          | cv::Ptr<cv::linemod::Detector> detector | 
      
 
 
◆ filename
◆ matching_threshold
      
        
          | int matching_threshold = 80 | 
      
 
 
◆ num_classes