frame_definitions.h
Go to the documentation of this file.
1 /*
2  * BSD 3-Clause License
3  *
4  * Copyright (c) 2019, Analog Devices, Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright notice, this
11  * list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright notice,
14  * this list of conditions and the following disclaimer in the documentation
15  * and/or other materials provided with the distribution.
16  *
17  * 3. Neither the name of the copyright holder nor the names of its
18  * contributors may be used to endorse or promote products derived from
19  * this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 #ifndef FRAME_DEFINITIONS_H
33 #define FRAME_DEFINITIONS_H
34 
35 #include <iostream>
36 #include <string>
37 #include <vector>
38 
42 namespace aditof {
43 
54 
58  unsigned int width;
59 
63  unsigned int height;
64 
71  unsigned int subelementSize;
72 
78  unsigned int subelementsPerElement;
79 
86  unsigned int bytesCount;
87 };
88 
93 struct FrameDetails {
99 
104  std::vector<FrameDataDetails> dataDetails;
105 
110 
114  unsigned int width;
115 
119  unsigned int height;
120 
124  uint8_t totalCaptures;
125 
130 };
131 
136 struct Point3I_sdk {
137  int16_t a;
138  int16_t b;
139  int16_t c;
140 };
141 
142 #pragma pack(push, 1)
143 
147 struct Metadata {
148 
152  uint16_t width;
153 
157  uint16_t height;
158 
171 
175  uint8_t bitsInDepth;
176 
180  uint8_t bitsInAb;
181 
186 
192 
196  uint8_t frequencyIndex;
197 
207 
211  uint32_t frameNumber;
212 
216  uint8_t imagerMode;
217 
222  uint8_t numberOfPhases;
223 
229 
233  uint8_t xyzEnabled;
234 
240 
246 
251 
256 };
257 #pragma pack(pop)
258 
262 inline std::ostream &operator<<(std::ostream &o, const struct Metadata &meta) {
263  o << "\tWidth: " << meta.width << "\tHeight: " << meta.height
264  << "\tOutputConfiguration: "
265  << static_cast<unsigned int>(meta.outputConfiguration)
266  << "\tBitsInDepth: " << static_cast<unsigned int>(meta.bitsInDepth)
267  << "\tBitsInAb: " << static_cast<unsigned int>(meta.bitsInAb)
268  << "\tBitsInConfidenc: "
269  << static_cast<unsigned int>(meta.bitsInConfidence)
270  << "\tInvalidPhaseValue: " << meta.invalidPhaseValue
271  << "\tFrequencyIndex: " << static_cast<unsigned int>(meta.frequencyIndex)
272  << "\tFrameNumber: " << meta.frameNumber
273  << "\tImagerMode: " << static_cast<unsigned int>(meta.imagerMode)
274  << "\tNumberOfPhases: " << static_cast<unsigned int>(meta.numberOfPhases)
275  << "\tNumberOfFrequencies: "
276  << static_cast<unsigned int>(meta.numberOfFrequencies)
277  << "\tXYZEnabled: " << static_cast<unsigned int>(meta.xyzEnabled)
278  << "\tElapsedTimeFractionalValue: " << meta.elapsedTimeFractionalValue
279  << "\tElapsedTimeSecondsValue: " << meta.elapsedTimeSecondsValue
280  << "\tSensorTemperature: " << meta.sensorTemperature
281  << "\tLaserTemperature: " << meta.laserTemperature << "\n";
282  return o;
283 }
284 
285 } // namespace aditof
286 
287 #endif // FRAME_DEFINITIONS_H
aditof::FrameDataDetails::subelementsPerElement
unsigned int subelementsPerElement
The number of sub-elements that an element has. An element is the smallest part of the image (a....
Definition: frame_definitions.h:78
aditof::Metadata::numberOfPhases
uint8_t numberOfPhases
number of phases: Number of phases in the input raw capture fed to the ADSD3500
Definition: frame_definitions.h:222
aditof::operator<<
std::ostream & operator<<(std::ostream &o, const struct Metadata &meta)
prints human readable metadata structure
Definition: frame_definitions.h:262
aditof::Metadata::invalidPhaseValue
uint16_t invalidPhaseValue
invalidPhaseValue: In partial depth case, the host must know the invalid phase value used by the ADSD...
Definition: frame_definitions.h:191
aditof::Metadata::height
uint16_t height
Height of frame.
Definition: frame_definitions.h:157
aditof::FrameDataDetails::type
std::string type
The type of data that can be found in a frame. For example it could be depth data or IR data,...
Definition: frame_definitions.h:53
string
GLsizei const GLchar *const * string
Definition: glcorearb.h:3083
aditof::FrameDataDetails::width
unsigned int width
The width of the frame data.
Definition: frame_definitions.h:58
aditof::Metadata::width
uint16_t width
Width of frame.
Definition: frame_definitions.h:152
aditof::Point3I_sdk
Holds the xyz values of a frame.
Definition: frame_definitions.h:136
aditof::FrameDetails::width
unsigned int width
The width of the frame.
Definition: frame_definitions.h:114
aditof::Metadata::sensorTemperature
int32_t sensorTemperature
Sensor temperature in degrees Celsius.
Definition: frame_definitions.h:250
aditof::FrameDetails::dataDetails
std::vector< FrameDataDetails > dataDetails
A frame can have multiple types of data. For example it could hold data about depth and/or data about...
Definition: frame_definitions.h:104
aditof::FrameDetails
Describes the properties of a frame.
Definition: frame_definitions.h:93
aditof::FrameDetails::height
unsigned int height
The height of the frame.
Definition: frame_definitions.h:119
aditof::Metadata
Contains all of the metadata components.
Definition: frame_definitions.h:147
aditof::Point3I_sdk::b
int16_t b
Y Information.
Definition: frame_definitions.h:138
aditof
Namespace aditof.
Definition: adsd_errs.h:40
aditof::FrameDataDetails::subelementSize
unsigned int subelementSize
The size in bytes of a sub-element. A sub-element is a sub-component of an element....
Definition: frame_definitions.h:71
aditof::FrameDetails::type
std::string type
The type of the frame. Can be one of the types provided by the camera.
Definition: frame_definitions.h:98
aditof::Metadata::imagerMode
uint8_t imagerMode
Imager mode.
Definition: frame_definitions.h:216
aditof::Metadata::elapsedTimeSecondsValue
uint32_t elapsedTimeSecondsValue
elapsedTimeSecondsValue: 32-bit seconds value out of total elapsed time.
Definition: frame_definitions.h:245
aditof::Metadata::elapsedTimeFractionalValue
uint32_t elapsedTimeFractionalValue
elapsedTimeFractionalValue: 32-bit fractional value out of total elapsed time.
Definition: frame_definitions.h:239
aditof::FrameDataDetails
Describes the properties of a data that embedded within the frame.
Definition: frame_definitions.h:48
aditof::FrameDetails::passiveIRCaptured
bool passiveIRCaptured
is a passive IR frame appended
Definition: frame_definitions.h:129
aditof::FrameDetails::totalCaptures
uint8_t totalCaptures
totalCaptures or subframes in a frame
Definition: frame_definitions.h:124
aditof::Metadata::frameNumber
uint32_t frameNumber
Frame number.
Definition: frame_definitions.h:211
aditof::Metadata::bitsInDepth
uint8_t bitsInDepth
Number of bits in depth.
Definition: frame_definitions.h:175
aditof::Metadata::numberOfFrequencies
uint8_t numberOfFrequencies
number of frequencies: Number of frequencies in the input raw capture fed to the ADSD3500.
Definition: frame_definitions.h:228
aditof::Point3I_sdk::c
int16_t c
Z Information.
Definition: frame_definitions.h:139
aditof::Metadata::abFrequencyIndex
uint8_t abFrequencyIndex
abFrequencyIndex: AB Frequency Index: 0 AB of frequency 0 1 AB of frequency 1 2 AB of frequency 2 3 A...
Definition: frame_definitions.h:206
aditof::Metadata::xyzEnabled
uint8_t xyzEnabled
True if xyz is being generated for the current frame. (set by sdk)
Definition: frame_definitions.h:233
aditof::Metadata::laserTemperature
int32_t laserTemperature
Laser temperature in degrees Celsius.
Definition: frame_definitions.h:255
aditof::FrameDetails::cameraMode
std::string cameraMode
The mode the camera was set when the frame was captured.
Definition: frame_definitions.h:109
aditof::Metadata::bitsInAb
uint8_t bitsInAb
Number of bits in AB.
Definition: frame_definitions.h:180
aditof::Metadata::frequencyIndex
uint8_t frequencyIndex
frequencyIndex: Stores index of the frequency for which the phase frame is outputted.
Definition: frame_definitions.h:196
aditof::FrameDataDetails::bytesCount
unsigned int bytesCount
The total number of bytes that the data has. This can be useful when copying data to another location...
Definition: frame_definitions.h:86
aditof::Metadata::bitsInConfidence
uint8_t bitsInConfidence
Number of bits in confidence.
Definition: frame_definitions.h:185
aditof::Metadata::outputConfiguration
uint8_t outputConfiguration
ADSD3500 Output Configuration: 0 Full Depth Frame 1 Phase Frame (Partial Depth) 2 AB Frame 3 Confiden...
Definition: frame_definitions.h:170
aditof::FrameDataDetails::height
unsigned int height
The height of the frame data.
Definition: frame_definitions.h:63
aditof::Point3I_sdk::a
int16_t a
X Information.
Definition: frame_definitions.h:137


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:51