AI Watch A1
Multi-person 3D skeleton detection using Intel RealSense and OpenPose with Kafka support.
|
RealSenseD435Manager class is a class that abstracts the behavior of an Intel RealSense D435 Camera, in order to capture frames, apply post-processing, and so on. More...
#include <RealSenseManager.hpp>
Public Member Functions | |
void | startEnvironment (rs2::pipeline &pipelineStream, struct rs2_intrinsics &color_intrin, float *scale, unsigned short int resX, unsigned short int resY, bool firstBoot) override |
This method is useful to invoke at the boot of the program where we want to initialize the different mangers, start the camera and set up the related environment. This method is specific for D435 Intel RealSense camera. More... | |
void | getVideoFramesRS (unsigned int user_nFrame, rs2::pipeline &pipelineStream, rs2::depth_frame &depthFrame, rs2::frame &colorFrame, rs2::frame &colorizedDepthFrame, const unsigned short int framesToSkip) override |
Get user_nFrame video frames from the pipeline by applying a specific scaling factor. This method is specific for D435 Intel RealSense camera. More... | |
unsigned int | getFrameID (void) |
Get the current frame ID value. More... | |
struct rs2_intrinsics & | get_color_intrin (void) |
Get the color intrinsics object. More... | |
Protected Member Functions | |
void | setFrameID (unsigned int frameID) |
Set the Frame ID value. More... | |
void | set_align (rs2::align align) |
Set the align object. More... | |
void | set_depth_intrin (struct rs2_intrinsics depth_intrin) |
Set the depth intrinsics object. More... | |
void | set_color_intrin (struct rs2_intrinsics &color_intrin) |
Set the color intrinsics object. More... | |
void | set_depth_to_color (struct rs2_extrinsics depth_to_color) |
Set the depth extrinsics object. More... | |
void | set_color_to_depth (struct rs2_extrinsics color_to_depth) |
Set the color extrinsics object. More... | |
rs2::align | get_align (void) |
Get the align object. More... | |
struct rs2_intrinsics | get_depth_intrin (void) |
Get the depth intrinsics object. More... | |
struct rs2_extrinsics | get_depth_to_color (void) |
Get the depth extrinsics object. More... | |
struct rs2_extrinsics | get_color_to_depth (void) |
Get the color extrinsics object. More... | |
Private Attributes | |
unsigned int | frameID |
Current frame counter. More... | |
rs2::align | align |
Auxiliary processing block that performs image alignment using depth data and camera calibration. More... | |
struct rs2_intrinsics | depth_intrin |
Reference to depth stream intrinsics. More... | |
struct rs2_intrinsics | color_intrin |
Reference to color stream intrinsics. More... | |
struct rs2_extrinsics | depth_to_color |
Reference to depth stream extrinsics. More... | |
struct rs2_extrinsics | color_to_depth |
Reference to color stream extrinsics. More... | |
RealSenseD435Manager class is a class that abstracts the behavior of an Intel RealSense D435 Camera, in order to capture frames, apply post-processing, and so on.
Definition at line 178 of file RealSenseManager.hpp.
|
protectedinherited |
Get the align object.
Definition at line 39 of file RealSenseManager.cpp.
References RealSenseManager::align.
Referenced by getVideoFramesRS().
|
inherited |
Get the color intrinsics object.
Definition at line 65 of file RealSenseManager.cpp.
References RealSenseManager::color_intrin.
Referenced by Skeleton::deprojectSkeletonPoints3D().
|
protectedinherited |
Get the color extrinsics object.
Definition at line 51 of file RealSenseManager.cpp.
|
protectedinherited |
Get the depth intrinsics object.
Definition at line 43 of file RealSenseManager.cpp.
|
protectedinherited |
Get the depth extrinsics object.
Definition at line 47 of file RealSenseManager.cpp.
|
inherited |
Get the current frame ID value.
Definition at line 61 of file RealSenseManager.cpp.
References RealSenseManager::frameID.
Referenced by OpenCV_Manager::getVideoFramesCV(), getVideoFramesRS(), FacadeSingleton::sendData(), and OpenCV_Manager::showSkeletonsCV().
|
overridevirtual |
Get user_nFrame video frames from the pipeline by applying a specific scaling factor. This method is specific for D435 Intel RealSense camera.
user_nFrame | frame's number to capture according to user choice. |
pipelineStream | The pipeline simplifies the user interaction with the device and computer vision processing modules. The class abstracts the camera configuration and streaming, and the vision modules triggering and threading. It lets the application focus on the computer vision output of the modules, or the device output data. The pipeline can manage computer vision modules, which are implemented as a processing block. The pipeline is the consumer of the processing block interface, while the application consumes the computer vision interface. |
depthFrame | Reference to depth frame object that will be captured. |
colorFrame | Reference to color frame object that will be captured. |
colorizedDepthFrame | Reference to colorized depth frame object that will be captured. |
framesToSkip | Frames' number to skip in order to ignore a certain amount of frames and extend the recording interval. A '0' value means 'capture each frame'. |
Implements RealSenseManager.
Definition at line 43 of file RealSenseD435Manager.cpp.
References RealSenseManager::get_align(), RealSenseManager::getFrameID(), and RealSenseManager::setFrameID().
|
protectedinherited |
Set the align object.
align | Auxiliary processing block that performs image alignment using depth data and camera calibration. |
Definition at line 19 of file RealSenseManager.cpp.
References RealSenseManager::align.
Referenced by startEnvironment().
|
protectedinherited |
Set the color intrinsics object.
color_intrin | Reference to color stream intrinsics. |
Definition at line 27 of file RealSenseManager.cpp.
References RealSenseManager::color_intrin.
Referenced by startEnvironment().
|
protectedinherited |
Set the color extrinsics object.
color_to_depth | Reference to color stream extrinsics. |
Definition at line 35 of file RealSenseManager.cpp.
References RealSenseManager::color_to_depth.
Referenced by startEnvironment().
|
protectedinherited |
Set the depth intrinsics object.
depth_intrin | Reference to depth stream intrinsics. |
Definition at line 23 of file RealSenseManager.cpp.
References RealSenseManager::depth_intrin.
Referenced by startEnvironment().
|
protectedinherited |
Set the depth extrinsics object.
depth_to_color | Reference to depth stream extrinsics. |
Definition at line 31 of file RealSenseManager.cpp.
References RealSenseManager::depth_to_color.
Referenced by startEnvironment().
|
protectedinherited |
Set the Frame ID value.
frameID | Current frame counter. |
Definition at line 15 of file RealSenseManager.cpp.
References RealSenseManager::frameID.
Referenced by getVideoFramesRS(), and RealSenseManager::RealSenseManager().
|
overridevirtual |
This method is useful to invoke at the boot of the program where we want to initialize the different mangers, start the camera and set up the related environment. This method is specific for D435 Intel RealSense camera.
pipelineStream | The pipeline simplifies the user interaction with the device and computer vision processing modules. The class abstracts the camera configuration and streaming, and the vision modules triggering and threading. It lets the application focus on the computer vision output of the modules, or the device output data. The pipeline can manage computer vision modules, which are implemented as a processing block. The pipeline is the consumer of the processing block interface, while the application consumes the computer vision interface. |
color_intrin | Reference to color video stream intrinsics. |
scale | Pointer to scaling factor. |
resX | x resoultion <->. |
resY | y resolution. |
firstBoot | true if the method is called for the first time (in this case a kind of camera calibration is done), false otherwise. |
Implements RealSenseManager.
Definition at line 15 of file RealSenseD435Manager.cpp.
References RealSenseManager::color_intrin, RealSenseManager::set_align(), RealSenseManager::set_color_intrin(), RealSenseManager::set_color_to_depth(), RealSenseManager::set_depth_intrin(), and RealSenseManager::set_depth_to_color().
|
privateinherited |
Auxiliary processing block that performs image alignment using depth data and camera calibration.
Definition at line 35 of file RealSenseManager.hpp.
Referenced by RealSenseManager::get_align(), and RealSenseManager::set_align().
|
privateinherited |
Reference to color stream intrinsics.
Definition at line 45 of file RealSenseManager.hpp.
Referenced by RealSenseManager::get_color_intrin(), RealSenseManager::set_color_intrin(), and startEnvironment().
|
privateinherited |
Reference to color stream extrinsics.
Definition at line 55 of file RealSenseManager.hpp.
Referenced by RealSenseManager::set_color_to_depth().
|
privateinherited |
Reference to depth stream intrinsics.
Definition at line 40 of file RealSenseManager.hpp.
Referenced by RealSenseManager::set_depth_intrin().
|
privateinherited |
Reference to depth stream extrinsics.
Definition at line 50 of file RealSenseManager.hpp.
Referenced by RealSenseManager::set_depth_to_color().
|
privateinherited |
Current frame counter.
Definition at line 30 of file RealSenseManager.hpp.
Referenced by RealSenseManager::getFrameID(), and RealSenseManager::setFrameID().