Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Implement ilabel: fast pixel-based region labelling (from the MATLAB MVTB C extension)

未关闭
#119 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
活跃
技术栈
c, python

调研方向

Start by inspecting wip/ilabel/ilabel.c and wip/ilabel/ilabel.py-unopt, then read the existing blob/label functions and the TODO in tests/test_image_processing.py. Decide and document the Python API and implementation route, with tests comparing shared examples to the contour-based blob code. Done means ilabel is implemented, its return values are tested, and the build and Python-only support implications are addressed.

由索引模型根据 Issue 内容生成。

描述

tech-debt

Parked work, to be implemented later. The files are on branch feat/fast-label under wip/ilabel/ (not in main).

What it is

A pixel-based, rather than contour-based, approach to segmentation / region labelling, based on the ilabel C extension (Copyright 1995-2009 Peter Corke) from the MATLAB Machine Vision Toolbox. The MATLAB signature was [l, m, parents, color] = ilabel(im).

What exists

  • wip/ilabel/ilabel.c: Cython 3.0.11 output (2024-12), 592 KB. It was generated from an ilabel.pyx that is not in the repo, but Cython embeds the source as /* "ilabel.pyx":NN */ comments, so the .pyx can be reconstructed from this file.
  • wip/ilabel/ilabel.py-unopt: unoptimised pure-Python port, produced with Copilot (2024-12).
  • The Python toolbox has no implementation. The only reference is a TODO in tests/test_image_processing.py (# TODO [l,ml,p,c] = ilabel(im);).

To do

  1. Reconstruct ilabel.pyx from the embedded comments in ilabel.c (or port afresh), and decide the implementation route (Cython extension vs numba vs NumPy/SciPy). Note this package is pure Python and builds with hatchling, so a compiled extension changes the build/wheel story (and Pyodide/JupyterLite support); a pure-Python/NumPy route avoids that.
  2. Define the Python API (Image method, return values), consistent with the existing blob/label functions.
  3. Tests, including a comparison with the existing contour-based blob code on shared examples, and the TODO above.

Related: #45

主要语言
Python
星标
223
派生
30
平均合并
1 小时 4 分钟
30 天内合并 PR
9

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

petercorke/machinevision-toolbox-python 的其他 Issue

查看 petercorke/machinevision-toolbox-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。