flower representation

This commit is contained in:
ackimixs
2024-04-08 18:19:14 +02:00
parent 7565ece3b1
commit 8e65039083
2 changed files with 10 additions and 8 deletions

View File

@@ -30,10 +30,12 @@ public:
void setFlowerObjectRepresentation()
{
// 18.96 w
// 19.3 h
this->objectRepresenation = cv::Mat(4, 1, CV_32FC3);
this->objectRepresenation.ptr<cv::Vec3f>(0)[0] = cv::Vec3f(-19.5f/2.f, 20.f/2.f, 0);
this->objectRepresenation.ptr<cv::Vec3f>(0)[1] = cv::Vec3f(19.5f/2.f, 20.f/2.f, 0);
this->objectRepresenation.ptr<cv::Vec3f>(0)[2] = cv::Vec3f(19.f/2.f, -20.f/2.f, 0);
this->objectRepresenation.ptr<cv::Vec3f>(0)[3] = cv::Vec3f(-19.f/2.f, -20.f/2.f, 0);
this->objectRepresenation.ptr<cv::Vec3f>(0)[0] = cv::Vec3f(-19.f/2.f, 19.f/2.f, 0);
this->objectRepresenation.ptr<cv::Vec3f>(0)[1] = cv::Vec3f(19.f/2.f, 19.f/2.f, 0);
this->objectRepresenation.ptr<cv::Vec3f>(0)[2] = cv::Vec3f(19.f/2.f, -19.f/2.f, 0);
this->objectRepresenation.ptr<cv::Vec3f>(0)[3] = cv::Vec3f(-19.f/2.f, -19.f/2.f, 0);
}
};

View File

@@ -58,10 +58,10 @@ int main(int argc, char *argv[])
ArucoDetector detector(robotPose, calibrationPath, BLUE, headless);
auto whiteFlower = ArucoTag(36, "White_flower", 20, FLOWER);
whiteFlower.setFlowerObjectRepresentation();
auto purpleFlower = ArucoTag(13, "Purple_flower", 20, FLOWER);
purpleFlower.setFlowerObjectRepresentation();
auto whiteFlower = ArucoTag(36, "White_flower", 19.6, FLOWER);
// whiteFlower.setFlowerObjectRepresentation();
auto purpleFlower = ArucoTag(13, "Purple_flower", 19.6, FLOWER);
// purpleFlower.setFlowerObjectRepresentation();
auto solarPanel = ArucoTag(47, "Solar_panel", 50, SOLAR_PANEL);