Blobs: build the blob hierarchy as a pgraph graph instead of hand-rolled parent/children + exporters
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- computer-vision
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- Python
- Stelle
- 224
- Fork
- 31
- Merge medio
- 1g 20h
- PR unite (30g)
- 28
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di petercorke/machinevision-toolbox-python
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
petercorke/machinevision-toolbox-python#152 ·
I maintainer di solito rispondono entro 1 giorno
-
ROSBag: RealSense bags have a 4-byte depth-units trailer that is guessed, not parsedForse già presa @theluckystrike l’ha presa oggi. Apertabug help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
petercorke/machinevision-toolbox-python#151 ·
I maintainer di solito rispondono entro 1 giorno
-
help wanted tech-debt
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
petercorke/machinevision-toolbox-python#150 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 43/100
petercorke/machinevision-toolbox-python#148 ·
I maintainer di solito rispondono entro 1 giorno
-
tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 30/100
petercorke/machinevision-toolbox-python#147 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di petercorke/machinevision-toolbox-python
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
[Bug] to_ical lexicographical/default sorting moves URL property between two X-WR- propertiesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
collective/icalendar#1968 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Deferred from #1869: Complete the companion pytest guardrail update noted in the PR description...Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
NousResearch/hermes-agent#140958 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug triage/confirmed
Difficoltà 2/5 Mezza giornata Idoneità per principianti 85/100
agentscope-ai/agentscope#3355 ·
I maintainer di solito rispondono entro 2 giorni