frame_operations.cpp
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  */
33 
34 namespace aditof {
35 
36 bool operator==(const FrameDataDetails &lhs, const FrameDataDetails &rhs) {
37  return (lhs.type == rhs.type) && (lhs.width == rhs.width) &&
38  (lhs.height == rhs.height);
39 }
40 
41 bool operator!=(const FrameDataDetails &lhs, const FrameDataDetails &rhs) {
42  return !(lhs == rhs);
43 }
44 
45 bool operator==(const FrameDetails &lhs, const FrameDetails &rhs) {
46  return (lhs.type == rhs.type) && (lhs.cameraMode == rhs.cameraMode) &&
47  (lhs.dataDetails == rhs.dataDetails);
48 }
49 
50 bool operator!=(const FrameDetails &lhs, const FrameDetails &rhs) {
51  return !(lhs == rhs);
52 }
53 
54 } // namespace aditof
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
aditof::FrameDataDetails::width
unsigned int width
The width of the frame data.
Definition: frame_definitions.h:58
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
Namespace aditof.
Definition: adsd_errs.h:40
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::operator!=
SDK_API bool operator!=(const FrameDataDetails &lhs, const FrameDataDetails &rhs)
operator !=
Definition: frame_operations.cpp:41
aditof::FrameDataDetails
Describes the properties of a data that embedded within the frame.
Definition: frame_definitions.h:48
aditof::operator==
SDK_API bool operator==(const FrameDataDetails &lhs, const FrameDataDetails &rhs)
operator ==
Definition: frame_operations.cpp:36
aditof::FrameDetails::cameraMode
std::string cameraMode
The mode the camera was set when the frame was captured.
Definition: frame_definitions.h:109
frame_operations.h
aditof::FrameDataDetails::height
unsigned int height
The height of the frame data.
Definition: frame_definitions.h:63


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