|
#include <VisionX/libraries/armem/vision/images/client/ImageReader.h>
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 Properties & | properties () 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::Reader & | memoryReader () const |
Definition at line 75 of file ImageReader.h.
Definition at line 78 of file ImageReader.h.
|
default |
|
finalprotectedvirtual |
Implements SimpleReaderBase.
Definition at line 225 of file ImageReader.cpp.
std::optional< visionx::StereoCalibration > getStereoCameraCalibration | ( | const std::string & | providerSegmentName | ) |
|
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.