Point Cloud Library (PCL)
1.7.2
Main Page
Modules
Namespaces
Classes
common
include
pcl
range_image
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
#ifndef PCL_BEARING_ANGLE_IMAGE_H_
43
#define PCL_BEARING_ANGLE_IMAGE_H_
44
45
#include <cmath>
46
#include <pcl/point_types.h>
47
#include <pcl/point_cloud.h>
48
49
namespace
pcl
50
{
51
/** \brief class BearingAngleImage is used as an interface to generate Bearing Angle(BA) image.
52
* \author: Qinghua Li (qinghua__li@163.com)
53
*/
54
class
BearingAngleImage
:
public
pcl::PointCloud
<PointXYZRGBA>
55
{
56
public
:
57
// ===== TYPEDEFS =====
58
typedef
pcl::PointCloud<PointXYZRGBA>
BaseClass
;
59
60
// =====CONSTRUCTOR & DESTRUCTOR=====
61
/** Constructor */
62
BearingAngleImage
();
63
/** Destructor */
64
virtual
~BearingAngleImage
();
65
66
public
:
67
/** \brief Reset all values to an empty Bearing Angle image */
68
void
69
reset
();
70
71
/** \brief Calculate the angle between the laser beam and the segment joining two consecutive
72
* measurement points.
73
* \param point1
74
* \param point2
75
*/
76
double
77
getAngle
(
const
PointXYZ
&point1,
const
PointXYZ
&point2);
78
79
/** \brief Transform 3D point cloud into a 2D Bearing Angle(BA) image */
80
void
81
generateBAImage
(
PointCloud<PointXYZ>
& point_cloud);
82
83
protected
:
84
/**< This point is used to be able to return a reference to a unknown gray point */
85
PointXYZRGBA
unobserved_point_
;
86
};
87
}
88
89
#endif // PCL_BEARING_ANGLE_IMAGE_H_