
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)
- 机器学习驱动的生物标志物发现与疾病预测集成工具包 - 2025年10月7日
 - CCL对象检测算法 - 2025年8月11日
 - Boids鸟群模拟算法讲解 - 2025年8月10日
 
                        

No responses yet