Blobs: build the blob hierarchy as a pgraph graph instead of hand-rolled parent/children + exporters
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Refactoring
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- python
- Bereich
- computer-vision
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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).
- Vorherrschende Sprache
- Python
- Sterne
- 224
- Forks
- 31
- Ø Merge
- 1 T. 6 Std.
- Gemergte PRs (30 T.)
- 19
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus petercorke/machinevision-toolbox-python
-
tech-debt
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 30/100
petercorke/machinevision-toolbox-python#147 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Revert JupyterLite deps=False workaround once spatialmath #250 is released (review by 2026-10-28)Offentech-debt
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 20/100
petercorke/machinevision-toolbox-python#137 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 25/100
petercorke/machinevision-toolbox-python#125 ·
Maintainer antworten meist innerhalb von 1 Tag
-
tech-debt
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
petercorke/machinevision-toolbox-python#122 ·
Maintainer antworten meist innerhalb von 1 Tag
-
tech-debt
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
petercorke/machinevision-toolbox-python#119 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in petercorke/machinevision-toolbox-python
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
aws-samples/sample-per-model-bedrock#243 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
FuRongJun-1999/dsh-memory#404 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug frontend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
PennyLaneAI/catalyst#3337 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Workflow.schedule stops when a cron deadline passes before sleepEvtl. vergeben @HuaTNA hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag