No nonsense image preview in opencv while using ipython
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
# load the image | |
img = cv2.imread("Lenna.png") | |
# start a new window thread (doesn't block your ipython | |
# prompt since this is on a different thread) | |
cv2.startWindowThread() | |
cv2.namedWindow("preview") | |
# using the window to display an image | |
cv2.imshow("preview", img) | |
# to close all windows | |
cv2.destroyAllWindows() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment