估计阅读时长: 2 分钟

imports "clustering" from "MLkit";

require(graphics2D);

multishapes = read.csv("./multishapes.csv");
[x, y] = list(multishapes[, "x"], multishapes[, "y"]);
print(multishapes, max.print = 13);

# detect object shapes
objects = graphics2D::pointVector(multishapes[, "x"], multishapes[, "y"]) |> dbscan_objects();
objects[objects == "-1"] = "noise";
objects = ifelse(objects == "noise", objects, `object_${objects}`);

# show object detection result
bitmap(file = "./object_detection.png") {
    plot(multishapes[, "x"], multishapes[, "y"], 
        class     = objects, 
        grid.fill = "white",
        padding   = "padding: 125px 300px 200px 200px;",
        colorSet  = "paper"
    );
}
谢桂纲
Latest posts by 谢桂纲 (see all)

Attachments

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *

博客文章
June 2025
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930  
  1. […] 在上面的工具调用消息数据结构中,我们可以清楚的看见有需要进行调用的工具名称,以及参数列表。当我们拿到这样子的调用信息后,就可以基于一定的规则找到需要执行的运行时中的函数来完成功能的实现。对于.NET平台上,我们一般是使用自定义属性加反射操作来解析相关的名称绑定结果。在.NET平台上对于这样子的一个根据调用信息来进行运行时解析和调用的方法,可以稍微参考《【Darwinism】Linux平台上的VisualBasic高性能并行计算应用的开发》的反射代码方法。 […]