估计阅读时长: 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 *

博客文章
October 2025
S M T W T F S
 1234
567891011
12131415161718
19202122232425
262728293031  
  1. ご提供いただきましたこの研究ツールに心より感謝申し上げます。お示しいただいたサンプルコードから見ますと、この方法は非常に使いやすいようです。しかし、実際のデータに適用する際、アルゴリズムがシングルスレッドであるため、大規模な空間代謝組学の生データを可視化する場合、計算プロセスが非常に長時間に及ぶ可能性があります。マルチスレッド計算を可能にした最適化版をご提供いただければ、使用体験が大幅に向上すると思われます。以上、私の個人的な使用感でございます。

  2. Je pense que cet algorithme présente encore des limitations importantes. Par exemple, sur plusieurs poules présentes sur l'image originale, l'une…