Go to the documentation of this file.00001 
00064 #include <ros/ros.h>
00065 #include <pcl/point_types.h>
00066 #include <pcl_ros/point_cloud.h>
00067 #include <pcl/io/pcd_io.h>
00068 #include <cv_bridge/cv_bridge.h>
00069 #include <highgui.h>
00070 #include <iostream>
00071 #include <fstream>
00072 
00073 int main(int argc, char **argv) {
00074   if(argc<3) {
00075     std::cerr<<"please specify *.png -> *.img\n";
00076     return 1;
00077   }
00078 
00079   cv_bridge::CvImage tmp;
00080   tmp.encoding="rgb8";
00081   tmp.image = cv::imread(argv[1],-1);
00082 
00083 
00084 
00085   sensor_msgs::ImageConstPtr last_img_ = tmp.toImageMsg();
00086 
00087 std::ofstream img_stream;
00088 
00089 img_stream << *last_img_;
00090 
00091 img_stream.close();
00092 
00093 
00094 
00095 
00096 
00097 
00098 
00099 
00100 
00101 
00102 
00103 
00104 
00105 
00106 
00107 
00108 
00109 
00110 
00111 
00112   return 0;
00113 }