CameraCalibrationReader Class Reference

#include <VisionX/libraries/armem/vision/images/client/ImageReader.h>

+ Inheritance diagram for CameraCalibrationReader:

Public Types

using Base = armarx::armem::client::util::SimpleReaderBase
 

Public Member Functions

 CameraCalibrationReader ()=default
 
std::optional< visionx::StereoCalibration > getStereoCameraCalibration (const std::string &providerSegmentName)
 
- Public Member Functions inherited from SimpleReaderBase
virtual void connect (armarx::armem::client::MemoryNameSystem &mns)
 
const Propertiesproperties () const
 
void registerPropertyDefinitions (armarx::PropertyDefinitionsPtr &def)
 
void setProperties (const Properties &p)
 
 SimpleReaderBase ()
 
virtual ~SimpleReaderBase ()=default
 

Protected Member Functions

Properties defaultProperties () const final
 
std::string propertyPrefix () const final
 visionx::MonocularCalibration detail::CameraCalibrationReader::getMonoCameraCalibration(const std::string& providerSegmentName) { std::vector<visionx::arondto::MonocularCameraCalibration> calibration; auto mid = armarx::armem::MemoryID(); mid.memoryName = "Vision"; if(providerSegmentName == "AzureKinectPointCloudProvider"){ mid.coreSegmentName = "StereoCameraCalibration"; } else { mid.coreSegmentName = "MonocularCameraCalibration"; } More...
 
- Protected Member Functions inherited from SimpleReaderBase
const armem::client::ReadermemoryReader () const
 

Detailed Description

Definition at line 75 of file ImageReader.h.

Member Typedef Documentation

◆ Base

Constructor & Destructor Documentation

◆ CameraCalibrationReader()

Member Function Documentation

◆ defaultProperties()

armarx::armem::client::util::SimpleReaderBase::Properties defaultProperties ( ) const
finalprotectedvirtual

Implements SimpleReaderBase.

Definition at line 225 of file ImageReader.cpp.

◆ getStereoCameraCalibration()

std::optional< visionx::StereoCalibration > getStereoCameraCalibration ( const std::string &  providerSegmentName)

Definition at line 151 of file ImageReader.cpp.

+ Here is the call graph for this function:

◆ propertyPrefix()

std::string propertyPrefix ( ) const
finalprotectedvirtual

visionx::MonocularCalibration detail::CameraCalibrationReader::getMonoCameraCalibration(const std::string& providerSegmentName) { std::vector<visionx::arondto::MonocularCameraCalibration> calibration; auto mid = armarx::armem::MemoryID(); mid.memoryName = "Vision"; if(providerSegmentName == "AzureKinectPointCloudProvider"){ mid.coreSegmentName = "StereoCameraCalibration"; } else { mid.coreSegmentName = "MonocularCameraCalibration"; }

mid.providerSegmentName = providerSegmentName; mid.entityName = "CameraCalibration";

auto res = this->memoryReader().getLatestSnapshotIn(mid);

if (res.has_value()) { res->forEachInstance( [&calibration](const armarx::armem::wm::EntityInstance& i) { auto data = i.dataAs<visionx::arondto::MonocularCameraCalibration>(); calibration.push_back(data); }); } visionx::MonocularCameraCalibration toReturn; fromAron(&toReturn, &calibration[0]); return toReturn; }

Implements SimpleReaderBase.

Definition at line 219 of file ImageReader.cpp.


The documentation for this class was generated from the following files: