Point Cloud Library (PCL)  1.11.1
bearing_angle_image.h
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2013, Intelligent Robotics Lab, DLUT.
5  * Author: Qinghua Li, Yan Zhuang, Fei Yan
6  *
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  *
13  * * Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * * Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials provided
18  * with the distribution.
19  * * Neither the name of Intelligent Robotics Lab, DLUT. nor the names
20  * of its contributors may be used to endorse or promote products
21  * derived from this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  */
36 
37 /**
38  * \file bearing_angle_image.h
39  * Created on: July 07, 2012
40  */
41 
42 #pragma once
43 
44 #include <cmath>
45 #include <pcl/point_types.h>
46 #include <pcl/point_cloud.h>
47 
48 namespace pcl
49 {
50  /** \brief class BearingAngleImage is used as an interface to generate Bearing Angle(BA) image.
51  * \author: Qinghua Li (qinghua__li@163.com)
52  */
53  class PCL_EXPORTS BearingAngleImage : public pcl::PointCloud<PointXYZRGBA>
54  {
55  public:
56  // ===== TYPEDEFS =====
58 
59  // =====CONSTRUCTOR & DESTRUCTOR=====
60  /** Constructor */
62 
63  public:
64  /** \brief Reset all values to an empty Bearing Angle image */
65  void
66  reset ();
67 
68  /** \brief Calculate the angle between the laser beam and the segment joining two consecutive
69  * measurement points.
70  * \param point1
71  * \param point2
72  */
73  double
74  getAngle (const PointXYZ &point1, const PointXYZ &point2);
75 
76  /** \brief Transform 3D point cloud into a 2D Bearing Angle(BA) image */
77  void
78  generateBAImage (PointCloud<PointXYZ>& point_cloud);
79 
80  protected:
81  /**< This point is used to be able to return a reference to a unknown gray point */
83  };
84 }
A point structure representing Euclidean xyz coordinates, and the RGBA color.
class BearingAngleImage is used as an interface to generate Bearing Angle(BA) image.
Defines all the PCL implemented PointT point type structures.
A point structure representing Euclidean xyz coordinates.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
Definition: distances.h:55
PointXYZRGBA unobserved_point_
< This point is used to be able to return a reference to a unknown gray point
#define PCL_EXPORTS
Definition: pcl_macros.h:328