估计阅读时长: 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"
);
}
Working on Engineered bacteria CAD design on its genome from scratch. Writing scientific computing software for Tianhe & Sunway TaihuLight supercomputer. Do scientific computing programming in R/R# language, he is also the programming language designer of the R# language on the .NET runtime.
Views: 1,936
Related
No responses yet