|
@@ -1,3 +1,4 @@
|
|
|
+#include "common/utils.hpp"
|
|
|
#include "nodes/base/base.hpp"
|
|
|
#include "nodes/draw/drawNode.hpp"
|
|
|
#include "nodes/draw/position.hpp"
|
|
@@ -8,16 +9,6 @@
|
|
|
namespace Node
|
|
|
{
|
|
|
|
|
|
-static std::string getTimeString() {
|
|
|
- auto now = std::chrono::system_clock::now();
|
|
|
- auto t = std::chrono::system_clock::to_time_t(now);
|
|
|
- std::tm tm = *std::localtime(&t);
|
|
|
-
|
|
|
- std::ostringstream oss;
|
|
|
- oss << std::put_time(&tm, "%Y_%m_%d_%H_%M_%S");
|
|
|
- return oss.str();
|
|
|
-}
|
|
|
-
|
|
|
static std::tuple<int, int, int> getFontSize(const std::string& text)
|
|
|
{
|
|
|
int baseline = 0;
|
|
@@ -54,8 +45,6 @@ void DrawNode::work()
|
|
|
cv::putText(image, box.label, cv::Point(x, y), cv::FONT_HERSHEY_SIMPLEX, 1, cv::Scalar(0, 255, 0), 2);
|
|
|
}
|
|
|
metaData->draw_image = image;
|
|
|
- std::string image_name = getTimeString() + ".jpg";
|
|
|
- cv::imwrite(image_name, image);
|
|
|
for (auto& output_buffer : output_buffers_)
|
|
|
{
|
|
|
printf("Node %s push data to %s\n", name_.c_str(), output_buffer.first.c_str());
|