mirror of
https://github.com/modelec/detection_pot.git
synced 2026-03-19 05:50:39 +01:00
flower representation
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user