Point Cloud Library (PCL)  1.14.1-dev
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 <pcl/point_types.h>
45 #include <pcl/point_cloud.h>
46 
47 namespace pcl
48 {
49  /** \brief class BearingAngleImage is used as an interface to generate Bearing Angle(BA) image.
50  * \author: Qinghua Li (qinghua__li@163.com)
51  */
52  class PCL_EXPORTS BearingAngleImage : public pcl::PointCloud<PointXYZRGBA>
53  {
54  public:
55  // ===== TYPEDEFS =====
57 
58  // =====CONSTRUCTOR & DESTRUCTOR=====
59  /** Constructor */
61 
62  public:
63  /** \brief Reset all values to an empty Bearing Angle image */
64  void
65  reset ();
66 
67  /** \brief Calculate the angle between the laser beam and the segment joining two consecutive
68  * measurement points.
69  * \param point1
70  * \param point2
71  */
72  double
73  getAngle (const PointXYZ &point1, const PointXYZ &point2);
74 
75  /** \brief Transform 3D point cloud into a 2D Bearing Angle(BA) image */
76  void
78 
79  protected:
80  /**< This point is used to be able to return a reference to a unknown gray point */
82  };
83 }
class BearingAngleImage is used as an interface to generate Bearing Angle(BA) image.
void reset()
Reset all values to an empty Bearing Angle image.
PointXYZRGBA unobserved_point_
< This point is used to be able to return a reference to a unknown gray point
BearingAngleImage()
Constructor.
double getAngle(const PointXYZ &point1, const PointXYZ &point2)
Calculate the angle between the laser beam and the segment joining two consecutive measurement points...
void generateBAImage(PointCloud< PointXYZ > &point_cloud)
Transform 3D point cloud into a 2D Bearing Angle(BA) image.
PointCloud represents the base class in PCL for storing collections of 3D points.
Definition: point_cloud.h:173
Defines all the PCL implemented PointT point type structures.
#define PCL_EXPORTS
Definition: pcl_macros.h:323
A point structure representing Euclidean xyz coordinates.
A point structure representing Euclidean xyz coordinates, and the RGBA color.