This commit is contained in:
ackimixs
2024-04-16 13:54:18 +02:00
parent 890878e47a
commit 02386c7216
2 changed files with 9 additions and 8 deletions

View File

@@ -34,14 +34,14 @@ ArucoDetector::ArucoDetector(const std::string& calibrationPath, const Team team
cv::namedWindow("ArUco Detection", cv::WINDOW_NORMAL);
}
auto whiteFlower = ArucoTag(36, "White flower", 20, FLOWER);
whiteFlower.setFlowerObjectRepresentation();
this->addArucoTag(whiteFlower);
auto purpleFlower = ArucoTag(13, "Purple flower", 20, FLOWER);
purpleFlower.setFlowerObjectRepresentation();
this->addArucoTag(purpleFlower);
// auto whiteFlower = ArucoTag(36, "White flower", 20, FLOWER);
// whiteFlower.setFlowerObjectRepresentation();
// this->addArucoTag(whiteFlower);
// auto purpleFlower = ArucoTag(13, "Purple flower", 20, FLOWER);
// purpleFlower.setFlowerObjectRepresentation();
// this->addArucoTag(purpleFlower);
this->addArucoTag(ArucoTag(47, "Solar panel", 50, SOLAR_PANEL));
// this->addArucoTag(ArucoTag(47, "Solar panel", 50, SOLAR_PANEL));
cam->startVideo();
}
@@ -64,6 +64,7 @@ void ArucoDetector::readCameraParameters(const std::string& path)
} else {
std::cerr << "Error reading calibration file." << std::endl;
}
std::cout << "Camera matrix: " << cameraMatrix << " " << this->distCoeffs << std::endl;
}
void ArucoDetector::addArucoTag(const ArucoTag& tag)

View File

@@ -42,7 +42,7 @@ int main(int argc, char *argv[])
ArucoDetector detector(calibrationPath, BLUE, headless);
auto whiteFlower = ArucoTag(36, "White_flower", 19.6, FLOWER);
// whiteFlower.setFlowerObjectRepresentation();
// whiteFlower.setFlowerObjectRepresentation();log
auto purpleFlower = ArucoTag(13, "Purple_flower", 19.6, FLOWER);
// purpleFlower.setFlowerObjectRepresentation();