Blobs: build the blob hierarchy as a pgraph graph instead of hand-rolled parent/children + exporters
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 35/100
- Issue 類型
- 重構
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- python
研究方向
Start with src/machinevisiontoolbox/ImageBlobs.py and the existing test_graph_* tests in tests/test_image_blobs.py; compare the current graph output with the pgraph 1.0 exporters and check compatibility with pgraph 0.6.x. Decide how Blob.parent and Blob.children and filtering behave, then preserve the public signatures and output formats while replacing the hand-written exporters.
由索引模型根據 Issue 內容生成。
描述
Current state
Blobs (src/machinevisiontoolbox/ImageBlobs.py) represents the blob hierarchy with ad-hoc parent / children references on each Blob, built from OpenCV's findContours hierarchy array. Blobs.graph() (and dotfile()) then re-implements graph export by hand: DOT, Mermaid, fenced Mermaid, GraphML and ELK JSON, roughly 150 lines of string building.
pgraph is already a core dependency (it is only used by BundleAdjust today), and pgraph 1.0 ships exporters for exactly these formats (pgraph.exporters.dot/mermaid/graphml/elk, Graph.export(), Graph.dotfile()), plus rendering to images via GraphViz.
Proposal
- Build the blob tree as a
pgraph.DGraph(parent -> child edges), withBlobinstances as vertices (or vertices holding them). - Replace the hand-written exporters in
Blobs.graph()/dotfile()with the pgraph ones, keeping the public signatures and output formats. - Decide whether
Blob.parent/Blob.childrenstay as thin views over the graph or remain stored references (public API, so don't break it). - Gain for free: tree traversal, components, plotting and rendered images, and one place to fix export bugs.
Things to check
- Output compatibility with the existing
test_graph_*tests intests/test_image_blobs.py(node labels, ordering, attributes in GraphML/ELK). - Must work with both pgraph 0.6.x (no
Vertex,edges()is aset, no exporters module) and 1.0, or the minimum pgraph version has to be raised inpyproject.toml. The exporters exist only in 1.0. - Filtering a
Blobsset can leave dangling parent/child references (see the warning in the__getitem__/filter docs); a graph representation should either handle or make explicit this.
Related: pgraph test coverage review (BundleAdjust is currently the only pgraph user).
- 主要語言
- Python
- 星號
- 224
- 分支
- 31
- 平均合併
- 1 天 6 小時
- 30 天內合併 PR
- 19
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
petercorke/machinevision-toolbox-python 的其他 Issue
-
tech-debt
難度 2/5 1-3 小時 新手友好度 30/100
petercorke/machinevision-toolbox-python#147 ·
維護者通常 1 天內回覆
-
Revert JupyterLite deps=False workaround once spatialmath #250 is released (review by 2026-10-28)未關閉tech-debt
難度 2/5 半天 新手友好度 20/100
petercorke/machinevision-toolbox-python#137 ·
維護者通常 1 天內回覆
-
EarthView: read key from GOOGLE_MAPS_API_KEY to avoid clash with Gemini's GOOGLE_API_KEY可能已有人在做 @petercorke 今天認領。 未關閉enhancement
難度 2/5 1-3 小時 新手友好度 25/100
petercorke/machinevision-toolbox-python#125 ·
維護者通常 1 天內回覆
-
tech-debt
難度 5/5 一週以上 新手友好度 25/100
petercorke/machinevision-toolbox-python#122 ·
維護者通常 1 天內回覆
-
tech-debt
難度 5/5 一週以上 新手友好度 25/100
petercorke/machinevision-toolbox-python#119 ·
維護者通常 1 天內回覆
查看 petercorke/machinevision-toolbox-python 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 74/100
cellrishi-code/claude-skills-atlas#165 ·
維護者通常 1 天內回覆
-
bug confirmed issue
難度 2/5 1-3 小時 新手友好度 72/100
open-webui/open-webui#32635 · 1 則留言 ·
維護者通常 1 天內回覆
-
Filters: ?field:ne=null matches NULL rows instead of non-NULL ones可能已有人在做 @rshdhere 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
Netflix/metaflow-service#504 ·
-
needs-triage
難度 2/5 1-3 小時 新手友好度 84/100
gke-labs/kube-agents#3394 ·
維護者通常 1 天內回覆
-
A2A audit timestamps end in +00:00Z (invalid ISO 8601)可能已有人在做 @O1sumitkumar 今天認領。 未關閉bug good first issue help wanted python
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆