|
@@ -139,7 +139,20 @@ void PipelineManager::create_from_json(const std::string& json_path)
|
|
|
else if (node_type == "Analyzer")
|
|
|
{
|
|
|
new_node = std::make_shared<GNode::AnalyzeNode>(node_id);
|
|
|
-
|
|
|
+ std::shared_ptr<meta::AnalyzeConfigData> config_data = std::make_shared<meta::AnalyzeConfigData>();
|
|
|
+ config_data->algorithm_names = params.at("algorithm_names").get<std::vector<std::string>>();
|
|
|
+ for (const auto& [name, points] : params["algorithm_params_fence"].items())
|
|
|
+ {
|
|
|
+ std::vector<cv::Point> fence_points;
|
|
|
+ for (const auto& point : points)
|
|
|
+ {
|
|
|
+ int x = point.at("x").get<int>();
|
|
|
+ int y = point.at("y").get<int>();
|
|
|
+ fence_points.emplace_back(x, y);
|
|
|
+ }
|
|
|
+ config_data->algorithm_params_fence[name] = fence_points;
|
|
|
+ }
|
|
|
+ new_node->set_config_data(config_data);
|
|
|
}
|
|
|
else if (node_type == "Drawer")
|
|
|
{
|