rgbd_frame.h
Go to the documentation of this file.
00001 
00024 #ifndef CCNY_RGBD_RGBD_FRAME_H
00025 #define CCNY_RGBD_RGBD_FRAME_H
00026 
00027 #include <vector>
00028 #include <cv_bridge/cv_bridge.h>
00029 #include <sensor_msgs/Image.h>
00030 #include <sensor_msgs/CameraInfo.h>
00031 #include <sensor_msgs/image_encodings.h>
00032 #include <image_geometry/pinhole_camera_model.h>
00033 #include <boost/filesystem.hpp>
00034 #include <pcl/io/pcd_io.h>
00035 
00036 #include "ccny_rgbd/types.h"
00037 #include "ccny_rgbd/rgbd_util.h"
00038 
00039 namespace ccny_rgbd {
00040 
00050 class RGBDFrame
00051 {
00052   public:
00053 
00054     EIGEN_MAKE_ALIGNED_OPERATOR_NEW
00055 
00058     RGBDFrame();
00059 
00065     RGBDFrame(const ImageMsg::ConstPtr& rgb_msg,
00066               const ImageMsg::ConstPtr& depth_msg,
00067               const CameraInfoMsg::ConstPtr& info_msg);
00068         
00069     std_msgs::Header header; 
00070     cv::Mat rgb_img;         
00071     cv::Mat depth_img;       
00072 
00078     image_geometry::PinholeCameraModel model;
00079     
00080     KeypointVector keypoints;         
00081     cv::Mat        descriptors;       
00082 
00083     BoolVector     kp_valid;          
00084     Vector3fVector kp_means;          
00085     Matrix3fVector kp_covariances;    
00086 
00087     int n_valid_keypoints;            
00088 
00097     void computeDistributions(
00098       double max_z = 5.5,
00099       double max_stdev_z = 0.03);    
00100 
00104     void constructFeaturePointCloud(PointCloudFeature& cloud);
00105 
00115     void constructDensePointCloud(PointCloudT& cloud,
00116                                   double max_z = 5.5,
00117                                   double max_stdev_z = 0.03) const;
00118     
00131     static bool save(const RGBDFrame& frame, const std::string& path);
00132 
00144     static bool load(RGBDFrame& frame, const std::string& path);
00145     
00146   protected:
00147 
00153     static const double Z_STDEV_CONSTANT = 0.001425;
00154     
00159     double getVarZ(double z) const;
00160     
00165     double getStdDevZ(double z) const;
00166 
00179     void getGaussianDistribution(int u, int v, double& z_mean, double& z_var) const;
00180     
00196     void getGaussianMixtureDistribution(int u, int v, double& z_mean, double& z_var) const;
00197 };
00198 
00199 } // namespace ccny_rgbd
00200 
00201 #endif // CCNY_RGBD_RGBD_FRAME_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends


ccny_rgbd
Author(s): Ivan Dryanovski
autogenerated on Fri Apr 12 2013 20:38:48