class_pinhole_projection.h
Go to the documentation of this file.
1 /**************************************************************************************************
2  Software License Agreement (BSD License)
3 
4  Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
5  All rights reserved.
6 
7  Redistribution and use in source and binary forms, with or without modification, are permitted
8  provided that the following conditions are met:
9 
10  *Redistributions of source code must retain the above copyright notice, this list of
11  conditions and the following disclaimer.
12  *Redistributions in binary form must reproduce the above copyright notice, this list of
13  conditions and the following disclaimer in the documentation and/or other materials provided
14  with the distribution.
15  *Neither the name of the University of Aveiro nor the names of its contributors may be used to
16  endorse or promote products derived from this software without specific prior written permission.
17 
18  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
19  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
21  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 ***************************************************************************************************/
35 #ifndef _CLASS_PINHOLE_PROJECTION_H_
36 #define _CLASS_PINHOLE_PROJECTION_H_
37 
38 #include <ros/ros.h>
39 
40 #include <opencv2/imgproc/imgproc.hpp>
41 #include <opencv2/highgui/highgui.hpp>
42 #include <opencv2/core/core.hpp>
43 
44 #include <sensor_msgs/PointCloud2.h>
45 #include <pcl/ros/conversions.h>
46 #include <pcl/point_cloud.h>
47 #include <pcl/point_types.h>
48 
49 #include <tf/tf.h>
50 
51 #include "camera_parameters.h"
52 
53 #ifndef PFLN
54 #define PFLN {printf("File %s Line %d\n",__FILE__, __LINE__);}
55 #endif
57 {
58  public:
59 
61  {
62  }
63 
65  {
66  }
67 
69  int set_projection_plane(double a, double b, double c, double d);
70 
71 
73  int project_vertex_to_pixel(const pcl::PointCloud<pcl::PointXYZ>::Ptr v, std::vector<pcl::PointXY>* p);
74  int project_pixel_to_vertex(const std::vector<pcl::PointXY>* p, pcl::PointCloud<pcl::PointXYZ>* v);
75 
76  int project_pixel_with_color_to_vertex(const pcl::PointCloud<pcl::PointXYZRGB>* p, pcl::PointCloud<pcl::PointXYZRGB>* v);
77 
78 
81 
83  int print_CvMat(cv::Mat *mat, const char* name);
84 
85 
86 struct
87 {
88  double a,b,c,d;
90 
91 
92  private:
93 
94 
95 };
96 
97 
98 
99 #endif
100 
struct class_pinhole_projection::@1 projection_plane
int project_pixel_to_vertex(const std::vector< pcl::PointXY > *p, pcl::PointCloud< pcl::PointXYZ > *v)
int set_projection_plane(double a, double b, double c, double d)
Sets and gets.
int compute_transformation_matrix(void)
Computation.
Defines a class where the parameters of a camera are stored.
int project_pixel_with_color_to_vertex(const pcl::PointCloud< pcl::PointXYZRGB > *p, pcl::PointCloud< pcl::PointXYZRGB > *v)
int project_vertex_to_pixel(const pcl::PointCloud< pcl::PointXYZ >::Ptr v, std::vector< pcl::PointXY > *p)
Projections.
int print_CvMat(cv::Mat *mat, const char *name)
Prints.


polygon_primitives_extraction
Author(s): Miguel Oliveira
autogenerated on Mon Mar 2 2015 01:32:42