Commit e1bbe0db authored by Alex Kushleyev's avatar Alex Kushleyev
Browse files

remove headers which will be on target

parent 6ea97873
Pipeline #250040982 failed with stage
in 44 seconds
......@@ -65,7 +65,7 @@ catkin_package(
include_directories(
${catkin_INCLUDE_DIRS}
./include
./include/royale/
/usr/include/royale
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -std=c++11 -g -pthread -Wall")
......
/****************************************************************************\
* Copyright (C) 2015 Infineon Technologies
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
\****************************************************************************/
#pragma once
namespace royale
{
/**
* Specifies the type of data which should be captured and returned as callback.
*/
enum class CallbackData : uint16_t
{
None = 0x00, //!< only get the callback but no data delivery
Raw = 0x01, //!< raw frames, if exclusively used no processing pipe is executed (no calibration data is needed)
Depth = 0x02, //!< one depth and grayscale image will be delivered for the complete sequence
Intermediate = 0x04 //!< all intermediate data will be delivered which are generated in the processing pipeline
};
}
/****************************************************************************\
* Copyright (C) 2016 pmdtechnologies ag
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
\****************************************************************************/
#pragma once
namespace royale
{
/**
* This enum defines the access level.
* For Royale >= 3.5 this can be directly cast to unsigned ints
* (Level 1 equals 1, Level 2 equals 2, ...).
*/
enum class CameraAccessLevel
{
L1 = 1, //!< Level 1 access provides depth data using standard, known-working configurations
L2 = 2, //!< Level 2 access provides raw data, e.g. for custom processing pipelines
L3 = 3, //!< Level 3 access enables you to overwrite exposure limits
L4 = 4 //!< Level 4 access is for bringing up new camera modules
};
}
/****************************************************************************\
* Copyright (C) 2015 Infineon Technologies
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
\****************************************************************************/
#pragma once
#ifdef _WIN32
# define ROYALE_API __declspec(dllexport)
#else
# define ROYALE_API
#endif
/****************************************************************************\
* Copyright (C) 2015 Infineon Technologies
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
\****************************************************************************/
#pragma once
#include <royale/Definitions.hpp>
#include <royale/Vector.hpp>
#include <royale/StreamId.hpp>
#include <memory>
#include <cstdint>
#include <cstring>
#include <chrono>
namespace royale
{
/**
* Encapsulates a 3D point in object space, with coordinates in meters. In addition to the
* X/Y/Z coordinate each point also includes a gray value, a noise standard deviation, and a
* depth confidence value.
*/
struct DepthPoint
{
float x; //!< X coordinate [meters]
float y; //!< Y coordinate [meters]
float z; //!< Z coordinate [meters]
float noise; //!< noise value [meters]
uint16_t grayValue; //!< 16-bit gray value
uint8_t depthConfidence; //!< value from 0 (invalid) to 255 (full confidence)
};
/**
* This structure defines the depth data which is delivered through the callback.
* This data comprises a dense 3D point cloud with the size of the depth image (width, height).
* The points vector encodes an array (row-based) with the size of (width x height). Based
* on the `depthConfidence`, the user can decide to use the 3D point or not.
* The point cloud uses a right handed coordinate system (x -> right, y -> down, z -> in viewing direction).
*
* Although the points are provided as a (width * height) array and are arranged in a grid,
* treating them as simple square pixels will provide a distorted image, because they are not
* necessarily in a rectilinear projection; it is more likely that the camera would have a
* wide-angle or even fish-eye lens. Each individual DepthPoint provides x and y coordinates
* in addition to the z cooordinate, these values in the individual DepthPoints will match the
* lens of the camera.
*/
struct DepthData
{
int version; //!< version number of the data format
std::chrono::microseconds timeStamp; //!< timestamp in microseconds precision (time since epoch 1970)
StreamId streamId; //!< stream which produced the data
uint16_t width; //!< width of depth image
uint16_t height; //!< height of depth image
royale::Vector<uint32_t> exposureTimes; //!< exposureTimes retrieved from CapturedUseCase
royale::Vector<royale::DepthPoint> points; //!< array of points
DepthData &operator= (const DepthData &dd)
{
if (this != &dd)
{
this->version = dd.version;
this->timeStamp = dd.timeStamp;
this->streamId = dd.streamId;
this->width = dd.width;
this->height = dd.height;
this->exposureTimes.resize (dd.exposureTimes.size());
memcpy (&this->exposureTimes[0], &dd.exposureTimes[0], dd.exposureTimes.size() * sizeof (uint32_t));
this->points.resize (dd.points.size());
memcpy (&this->points[0], &dd.points[0], dd.points.size() * sizeof (royale::DepthPoint));
}
return *this;
}
};
}
/****************************************************************************\
* Copyright (C) 2019 pmdtechnologies ag
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
\****************************************************************************/
#pragma once
#include<royale/DepthImage.hpp>
#include<royale/IRImage.hpp>
namespace royale
{
/**
* This represents combination of both depth and IR image.
* Provides depth, confidence and IR 8Bit mono information for every pixel.
*/
struct DepthIRImage
{
int64_t timestamp; //!< timestamp for the frame
StreamId streamId; //!< stream which produced the data
uint16_t width; //!< width of depth image
uint16_t height; //!< height of depth image
royale::Vector<uint16_t> dpData; //!< depth and confidence for the pixel
royale::Vector<uint8_t> irData; //!< 8Bit mono IR image
};
}
/****************************************************************************\
* Copyright (C) 2015 pmdtechnologies ag
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
\****************************************************************************/
#pragma once
#include <royale/Definitions.hpp>
#include <royale/Vector.hpp>
#include <royale/StreamId.hpp>
#include <memory>
#include <cstdint>
namespace royale
{
/**
* The depth image represents the depth and confidence for every pixel.
* The least significant 13 bits are the depth (z value along the optical axis) in
* millimeters. 0 stands for invalid measurement / no data.
*
* The most significant 3 bits correspond to a confidence value. 0 is the highest confidence, 7
* the second highest, and 1 the lowest.
*
* *note* The meaning of the confidence bits changed between Royale v3.14.0 and v3.15.0. Before
* v3.15.0, zero was lowest and 7 was highest. Because of this, the member was renamed from
* "data" to "cdData".
*/
struct DepthImage
{
int64_t timestamp; //!< timestamp for the frame
StreamId streamId; //!< stream which produced the data
uint16_t width; //!< width of depth image
uint16_t height; //!< height of depth image
royale::Vector<uint16_t> cdData; //!< depth and confidence for the pixel
};
}
/****************************************************************************\
* Copyright (C) 2015 Infineon Technologies
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
\****************************************************************************/
#pragma once
namespace royale
{
enum class ROYALE_API ExposureMode
{
MANUAL, //!< Camera exposure mode set to manual
AUTOMATIC //!< Camera exposure mode set to automatic
};
}
/****************************************************************************\
* Copyright (C) 2018 pmdtechnologies ag
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
\****************************************************************************/
#pragma once
namespace royale
{
/*!
* Royale allows to set different filter levels. Internally these represent
* different configurations of the processing pipeline.
*/
enum class FilterLevel
{
Off = 0, ///< Turn off all filtering of the data (validation will still be enabled)
Legacy = 200, ///< Standard settings for older cameras
Full = 255, ///< Enable all filters that are available for this camera
Custom = 256 ///< Value returned by getFilterLevel if the processing parameters differ from all of the presets
};
}
This diff is collapsed.
/****************************************************************************\
* Copyright (C) 2015 Infineon Technologies
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
\****************************************************************************/
#pragma once
#include <string>
#include <royale/DepthData.hpp>
namespace royale
{
/*!
* Provides the listener interface for consuming depth data from Royale. A listener needs
* to implement this interface and register itself as a listener to the ICameraDevice.
*/
class IDepthDataListener
{
public:
virtual ~IDepthDataListener() {}
/*!
* Will be called on every frame update by the Royale framework
*
* NOTICE: Calling other framework functions within the data callback
* can lead to undefined behavior and is therefore unsupported.
* Call these framework functions from another thread to avoid problems.
*/
virtual void onNewData (const royale::DepthData *data) = 0;
};
}
\ No newline at end of file
/****************************************************************************\
* Copyright (C) 2019 pmdtechnologies ag
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
\****************************************************************************/
#pragma once
#include <string>
#include <royale/DepthIRImage.hpp>
namespace royale
{
/*!
* Provides a combined listener interface for consuming both depth and IR images from Royale.
* A listener needs to implement this interface and register itself as a listener to the ICameraDevice.
*/
class IDepthIRImageListener
{
public:
virtual ~IDepthIRImageListener() {}
/*!
* Will be called on every frame update by the Royale framework
*
* NOTICE: Calling other framework functions within the data callback
* can lead to undefined behavior and is therefore unsupported.
* Call these framework functions from another thread to avoid problems.
*/
virtual void onNewData (const royale::DepthIRImage *data) = 0;
};
}
/****************************************************************************\
* Copyright (C) 2015 pmdtechnologies ag
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
\****************************************************************************/
#pragma once
#include <string>
#include <royale/DepthImage.hpp>
namespace royale
{
/*!
* Provides a listener interface for consuming depth images from Royale. A listener needs
* to implement this interface and register itself as a listener to the ICameraDevice.
*
* Consider using an IDepthDataListener instead of this listener. This callback provides only
* an array of depth and confidence values. The mapping of pixels to the scene is similar to
* the pixels of a two-dimensional camera, and it is unlikely to be a rectilinear projection
* (although this depends on the exact camera).
*/
class IDepthImageListener
{
public:
virtual ~IDepthImageListener() {}
/*!
* Will be called on every frame update by the Royale framework
*
* NOTICE: Calling other framework functions within the data callback
* can lead to undefined behavior and is therefore unsupported.
* Call these framework functions from another thread to avoid problems.
*/
virtual void onNewData (const royale::DepthImage *data) = 0;
};
}
/****************************************************************************\
* Copyright (C) 2016 Infineon Technologies
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
\****************************************************************************/
#pragma once
#include <royale/Definitions.hpp>
#include <royale/String.hpp>
namespace royale
{
/**
* Severity of an IEvent.
*/
enum class EventSeverity
{
/**
* Information only event.
*/
ROYALE_INFO = 0,
/**
* Potential issue detected (e.g. soft overtemperature limit reached).
*/
ROYALE_WARNING = 1,
/**
* Errors occurred during operation.
* The operation (e.g. recording or stream capture) has failed and was stopped.
*/
ROYALE_ERROR = 2,
/**
* A severe error was detected.
* The corresponding ICameraDevice is no longer in a usable state.
*/
ROYALE_FATAL = 3
};
/**
* Type of an IEvent.
*/
enum class EventType
{
/**
* The event was detected as part of the mechanism to receive image data.
*
* For events of this class, ROYALE_WARNING is likely to indicate dropped frames, and
* ROYALE_ERROR is likely to indicate that no more frames will be captured until after the
* next call to ICameraDevice::startCapture().
*/
ROYALE_CAPTURE_STREAM,
/**
* Royale is no longer able to talk to the camera; this is always severity ROYALE_FATAL.
*/
ROYALE_DEVICE_DISCONNECTED,
/**
* The camera has become hot, likely because of the illumination.
*
* For events of this class, ROYALE_WARNING indicates that the device is still functioning
* but is near to the temperature at which it will be shut down for safety, and ROYALE_ERROR
* indicates that the safety mechanism has been triggered.
*/
ROYALE_OVER_TEMPERATURE,
/**
* This event is sent regularly during capturing. The trigger for sending this event is
* implementation defined and varies for different use cases, but the timing is normally
* around one per second.
*
* If all frames were successfully received then it will be ROYALE_INFO, if any were dropped
* then it will be ROYALE_WARNING.
*/
ROYALE_RAW_FRAME_STATS,
/**
* This event indicates that the camera's internal monitor of the power used by the
* illumination has been triggered, which is never expected to happen with the use cases
* in production devices. The capturing should already been stopped when receiving this event,
* as the illumination will stay turned off and most of the received data will be corrupted.
*
* This is always severity ROYALE_FATAL.
*/
ROYALE_EYE_SAFETY,
/**
* This event is sent if, for example, the backend of the processing is changed.
*/
ROYALE_PROCESSING,
/**
* The event type is for any event for which there is no official API specification.
*/
ROYALE_UNKNOWN,
};
/**
* Interface for anything to be passed via IEventListener.
*/
class IEvent
{
public:
virtual ~IEvent() = default;
/**
* Get the severity of this event. The severity of an event denotes the level of urgency the
* event has. The severity may be used to determine when and where an event description
* should be presented.
* @return the severity of this event.
*/
virtual royale::EventSeverity severity() const = 0;
/**
* Returns debugging information intended for developers using the Royale API. The strings
* returned may change between releases, and are unlikely to be localised, so are neither
* intended to be parsed automatically, nor intended to be shown to end users.
* @return the description of this event.
*/
virtual const royale::String describe() const = 0;
/**
* Get the type of this event.
* @return the type of this event.
*/
virtual royale::EventType type() const = 0;
};
}
/****************************************************************************\
* Copyright (C) 2016 Infineon Technologies
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
\****************************************************************************/
#pragma once
#include <royale/Definitions.hpp>
#include <memory>
namespace royale
{
class IEvent;
/**
* This interface allows observers to receive events.
*/
class IEventListener
{
public:
virtual ~IEventListener() = default;
/**
* Will be called when an event occurs.
*
* Note there are some constraints on what the user is allowed to do
* in the callback.
* - Actually the royale API does not claim to be reentrant (and probably isn't),
* so the user is not supposed to call any API function from this callback
* besides stopCapture
* - Deleting the ICameraDevice from the callback will most certainly
* lead to a deadlock.
* This has the interesting side effect that calling exit() or equivalent
* from the callback may cause issues.
*
* \param event The event.
*/
virtual void onEvent (std::unique_ptr<royale::IEvent> &&event) = 0;
};
}
/****************************************************************************\
* Copyright (C) 2015 Infineon Technologies
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
\****************************************************************************/
#pragma once
#include <royale/Vector.hpp>
#include <royale/Definitions.hpp>
#include <royale/StreamId.hpp>
#include <cstdint>
namespace royale
{
/*!