Skip to content

Sync opencv-color-spaces with the updated tutorial - #863

Open
realpython-bot wants to merge 1 commit into
masterfrom
maintenance/python-opencv-color-spaces-20260925
Open

realpython-bot wants to merge 1 commit into
masterfrom
maintenance/python-opencv-color-spaces-20260925

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Maintenance sync for the tutorial Image Segmentation Using Color Spaces in OpenCV + Python.

What changed

  • finding-nemo.py: print flags[84] instead of flags[40]. On OpenCV 5.0 there are 374 COLOR_ flags, and COLOR_BGR2RGB now sits at index 84 (index 40 is COLOR_BAYER_GR2GRAY). This matches the updated article.
  • New requirements.txt with the same pins as the article's updated dependencies: opencv-python==5.0.0.93, numpy==2.5.3, matplotlib==3.11.2.

Article draft: https://realpython.com/pbjt/blog/post/2423/change/
Maintenance card: https://trello.com/c/hFARsVkR

Verification

  • Fresh Python 3.14 venv from requirements.txt, then ran MPLBACKEND=Agg python finding-nemo.py against the bundled images: exits 0 and prints 374 flags total: / COLOR_BGR2RGB.
  • ruff@0.14.1 format --check and ruff@0.14.1 check pass on the folder.

🤖 Generated with Claude Code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant