Skip to content

Image opened from REPL hangs - macOS #661

Description

@andymina

Expected behaviour

An image opened from a Python shell should close:

  • after 1 second with cv2.waitKey(1000)
  • with cv2.destroyWindow("<window_name>")
  • with cv2.destroyAllWindows()

Actual behaviour

The image opens, but it hangs when closing in either of the two above cases.

Steps to reproduce

OS: macOS Catalina 10.15.7
opencv-python version - 4.5.5.64
python version: 3.10.4

From within a python shell:

import cv2
img = cv2.imread("<path_to_image>")
cv2.imshow("window", img)

After this, any of the three options listed in the expected behavior will result in a frozen, unresponsive window. I don't think this is expected behavior because I haven't seen anything about this in the docs, but I could be very wrong. Thank you!

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions