Point Cloud Library (PCL)
1.15.1
Toggle main menu visibility
Loading...
Searching...
No Matches
pcl
io
image_ir.h
1
/*
2
* Software License Agreement (BSD License)
3
*
4
* Copyright (c) 2011 Willow Garage, Inc.
5
*
6
* All rights reserved.
7
*
8
* Redistribution and use in source and binary forms, with or without
9
* modification, are permitted provided that the following conditions
10
* are met:
11
*
12
* * Redistributions of source code must retain the above copyright
13
* notice, this list of conditions and the following disclaimer.
14
* * Redistributions in binary form must reproduce the above
15
* copyright notice, this list of conditions and the following
16
* disclaimer in the documentation and/or other materials provided
17
* with the distribution.
18
* * Neither the name of the copyright holder(s) nor the names of its
19
* contributors may be used to endorse or promote products derived
20
* from this software without specific prior written permission.
21
*
22
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
* POSSIBILITY OF SUCH DAMAGE.
34
*
35
*/
36
37
#pragma once
38
39
#include <chrono>
40
41
#include <
pcl/memory.h
>
42
#include <
pcl/pcl_macros.h
>
43
44
#include <pcl/io/image_metadata_wrapper.h>
45
46
namespace
pcl
47
{
48
namespace
io
49
{
50
51
/**
52
* @brief Class containing just a reference to IR meta data.
53
*/
54
class
PCL_EXPORTS
IRImage
55
{
56
public
:
57
using
Ptr
= shared_ptr<IRImage>;
58
using
ConstPtr
= shared_ptr<const IRImage>;
59
60
using
Clock
= std::chrono::high_resolution_clock;
61
using
Timestamp
= std::chrono::high_resolution_clock::time_point;
62
63
IRImage
(
FrameWrapper::Ptr
ir_metadata);
64
IRImage
(
FrameWrapper::Ptr
ir_metadata,
Timestamp
time);
65
66
~IRImage
() noexcept = default;
67
68
void
69
fillRaw
(
unsigned
width,
unsigned
height,
unsigned
short
* ir_buffer,
unsigned
line_step = 0) const;
70
71
unsigned
72
getWidth
() const;
73
74
unsigned
75
getHeight
() const;
76
77
unsigned
78
getFrameID
() const;
79
80
std::uint64_t
81
getTimestamp
() const;
82
83
Timestamp
84
getSystemTimestamp
() const;
85
86
// Get a const pointer to the raw depth buffer. If the data is accessed just read-only, then this method is faster than a fillXXX method
87
const
unsigned
short
*
88
getData
();
89
90
// Data buffer size in bytes
91
int
92
getDataSize
() const;
93
94
// Size of each row, including any padding
95
inline
unsigned
96
getStep
()
const
97
{
98
return
(
getDataSize
() /
getHeight
());
99
}
100
101
/** \brief method to access the internal data structure wrapper, which needs to be cast to an
102
* approperate subclass before the getMetadata(..) function is available to access the native data type.
103
*/
104
const
FrameWrapper::Ptr
105
getMetaData
()
const
;
106
107
protected
:
108
FrameWrapper::Ptr
wrapper_
;
109
Timestamp
timestamp_
;
110
};
111
112
}
// namespace
113
}
pcl::io::FrameWrapper::Ptr
shared_ptr< FrameWrapper > Ptr
Definition
image_metadata_wrapper.h:56
pcl::io::IRImage::ConstPtr
shared_ptr< const IRImage > ConstPtr
Definition
image_ir.h:58
pcl::io::IRImage::IRImage
IRImage(FrameWrapper::Ptr ir_metadata)
pcl::io::IRImage::getStep
unsigned getStep() const
Definition
image_ir.h:96
pcl::io::IRImage::getHeight
unsigned getHeight() const
pcl::io::IRImage::IRImage
IRImage(FrameWrapper::Ptr ir_metadata, Timestamp time)
pcl::io::IRImage::getMetaData
const FrameWrapper::Ptr getMetaData() const
method to access the internal data structure wrapper, which needs to be cast to an approperate subcla...
pcl::io::IRImage::Clock
std::chrono::high_resolution_clock Clock
Definition
image_ir.h:60
pcl::io::IRImage::getTimestamp
std::uint64_t getTimestamp() const
pcl::io::IRImage::getFrameID
unsigned getFrameID() const
pcl::io::IRImage::getData
const unsigned short * getData()
pcl::io::IRImage::getWidth
unsigned getWidth() const
pcl::io::IRImage::getSystemTimestamp
Timestamp getSystemTimestamp() const
pcl::io::IRImage::fillRaw
void fillRaw(unsigned width, unsigned height, unsigned short *ir_buffer, unsigned line_step=0) const
pcl::io::IRImage::timestamp_
Timestamp timestamp_
Definition
image_ir.h:109
pcl::io::IRImage::Timestamp
std::chrono::high_resolution_clock::time_point Timestamp
Definition
image_ir.h:61
pcl::io::IRImage::Ptr
shared_ptr< IRImage > Ptr
Definition
image_ir.h:57
pcl::io::IRImage::wrapper_
FrameWrapper::Ptr wrapper_
Definition
image_ir.h:108
pcl::io::IRImage::~IRImage
~IRImage() noexcept=default
pcl::io::IRImage::getDataSize
int getDataSize() const
memory.h
Defines functions, macros and traits for allocating and using memory.
pcl::io
Definition
io.h:517
pcl
Definition
convolution.h:46
pcl_macros.h
Defines all the PCL and non-PCL macros used.