Skip to content

Toolbar, x/y coordinates, rgb color picker not showing in 4.5.x #516

@donkawechico

Description

@donkawechico

Similar to #213 except I'm not using conda, and my issue does not resolve by installing+uninstalling opencv-contrib-python. (FWIW, I tried installing conda and using conda install -c conda-forge opencv and this also does not resolve the issue.

Expected behaviour

cv2.imshow() should launch a window with a toolbar above the image output, and the x/y coordinates + rgb color picker below the image.

Actual behaviour

cv2.imshow() launches a window with just the image output. Neither the toolbar, the x/y coordinates, nor the rgb color picker are present.

When downgrading to 4.4.0.46, the window launches with the toolbar, x/y, and rgb successfully (but the toolbar has no icons).

opencv-contrib-python 4.5.x (No toolbar, no x/y, no rgb picker)

opencv-contrib-python 4.4.0.46 (Toolbar (but no icons), x/y, rgb picker):

Steps to reproduce

SETUP:

~/code/opencv-test > mkvirtualenv py3cv4
created virtual environment CPython3.9.1.final.0-64 in 4866ms
  creator CPython3Posix(dest=/Users/me/.virtualenvs/p3cv4, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/me/Library/Application Support/virtualenv)
    added seed packages: pip==21.1.3, setuptools==57.1.0, wheel==0.36.2
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
[...]
in .zshenv
(py3cv4) ~/code/opencv-test >
(py3cv4) ~/code/opencv-test > pip install opencv-contrib-python
Collecting opencv-contrib-python
  Using cached opencv_contrib_python-4.5.3.56-cp39-cp39-macosx_10_15_x86_64.whl (51.4 MB)
Requirement already satisfied: numpy>=1.19.3 in /Users/me/.virtualenvs/p3cv4_2/lib/python3.9/site-packages (from opencv-contrib-python) (1.21.1)
Installing collected packages: opencv-contrib-python
Successfully installed opencv-contrib-python-4.5.3.56
(py3cv4) ~/code/opencv-test >
(py3cv4) ~/code/opencv-test >python main.py
(py3cv4) ~/code/opencv-test >

CODE:

# main.py

import cv2
import numpy as np

cv2.namedWindow("Foo")
starting_image = np.ones(shape=(50,50,3)).astype('uint8')
cv2.imshow("Foo", starting_image)
cv2.waitKey()
cv2.destroyAllWindows()
  • operating system: MacOS (Big Sur) 11.4
  • architecture (e.g. x86): x64
  • opencv-python version: 4.5.3.56 (but I tested on all 4.5.x available through pip)
Issue submission checklist
  • This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
  • I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
  • The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
  • I'm using the latest version of opencv-python

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions