35 mid.entityName =
"images";
38 auto&
update = commit.add();
41 update.referencedTime = referenceTime;
45 for (
const auto& i : images)
47 visionx::armem_images::arondto::ImageRGB aron;
49 update.instancesData.push_back(aron.toAron());
60 std::vector<cv::Mat> mats;
61 for (
const auto& i : images)
63 auto& m = mats.emplace_back();
64 if (i.type == CByteImage::ImageType::eRGB24)
66 m = cv::Mat(i.height, i.width, CV_8UC3);
68 else if (i.type == CByteImage::ImageType::eGrayScale)
70 m = cv::Mat(i.height, i.width, CV_8UC1);
74 throw armarx::LocalException(
"Could not convert a CByteImage to cv::Mat. Only RGB "
75 "and Grayscale are allowed.");
81 std::memcpy(m.data, i.pixels, m.rows * m.cols * m.elemSize());
83 return commitRGBImages(mats, referenceTime);