Question: I’m trying to output an image using cv2.imshow. It doesn’t seem to work cause I can’t see an output or it’s not showing.
# Load an image
img = cv2.imread('epic.jpg')
# Display the image
@samanthaleigarc and welcome to the community!
The link you provided to your repl lead to a 404 page, are you sure you got the right link or is your repl set to private? You can see how to share your code in the post below:
To share your code with others, you can simply link to your repl or paste and format the code into your post!
Linking to a repl
The easiest way to share your code is by linking to your repl. You can find the link by clicking on your repl title, clicking on Cover page, and clicking the button to copy the URL.
NOTE: only share repl join links or use the invite button with people you trust!
Sharing short code samples
Share a snippet of your code by wrapping it in backti…
Edit: I just found your repl
Now, about your problem.
I don’t think Replit supports
cv2.imshow… (needs to be confirmed)
You can try use the file viewer to see the file manually. Or instead of displaying images with
cv2.imshow, you save them using
cv2.imwrite and then view them after that.
You could display the image in a web format using HTML and Python frameworks like Flask or Django.