Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Image.SURF() is documented but not implemented (and non-free in pip OpenCV builds)

Aberta
#113 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
62/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
opencv, python

Direção de pesquisa

Start in ImagePointFeatures.py by reading the existing BRISK/AKAZE pattern and _resolve_feature_create, then inspect tests/test_image_point_features.py::test_surf and the Image.SURF listing in docs/source/card-algorithms.rst. Done means either a conditionally tested SURF implementation with a clear non-free-build error and corrected docs, or removal of the unsupported API from both the docs and test.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

tech-debt

Found 2026-10-03 while fixing #51.

docs/source/card-algorithms.rst lists Image.SURF alongside SIFT, BRISK and ORB, but there is no SURF method or SURFFeature class, and there never has been in this repo's git history (no SURF_create or def SURF in any commit). tests/test_image_point_features.py::test_surf called img.SURF() inside a bare try/except: pass, so the AttributeError was swallowed and the test passed without testing anything.

Constraint

SURF is patented/non-free. cv2.xfeatures2d.SURF_create exists in OpenCV 4.14 and 5.0 (opencv-contrib-python), but calling it raises error: (-213) because the pip wheels are not built with OPENCV_ENABLE_NONFREE. So an Image.SURF() would fail on every standard pip install unless OpenCV is built from source.

Fix

Add Image.SURF() and SURFFeature following the existing BRISK/AKAZE pattern in ImagePointFeatures.py (_resolve_feature_create, resolving via cv2.xfeatures2d), raising a clear error that explains the non-free requirement when the build can't provide it. Unskip test_surf conditionally on that availability, and fix the docs line. Alternative if SURF is judged out of scope: remove it from card-algorithms.rst and delete the test.

Related: #51

Linguagem predominante
Python
Estrelas
223
Forks
30
Merge médio
1h 4min
PRs com merge (30d)
9

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de petercorke/machinevision-toolbox-python

Todas as issues de petercorke/machinevision-toolbox-python

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.